cve_id
stringlengths 13
16
| obtain_all_privilege
stringclasses 3
values | obtain_user_privilege
stringclasses 2
values | obtain_other_privilege
stringclasses 2
values | user_interaction_required
stringclasses 3
values | cvss2_vector_string
stringclasses 106
values | cvss2_access_vector
stringclasses 4
values | cvss2_access_complexity
stringclasses 4
values | cvss2_authentication
stringclasses 3
values | cvss2_confidentiality_impact
stringclasses 4
values | cvss2_integrity_impact
stringclasses 4
values | cvss2_availability_impact
stringclasses 4
values | cvss2_base_score
stringclasses 50
values | cvss3_vector_string
stringclasses 226
values | cvss3_attack_vector
stringclasses 5
values | cvss3_attack_complexity
stringclasses 3
values | cvss3_privileges_required
stringclasses 4
values | cvss3_user_interaction
stringclasses 3
values | cvss3_scope
stringclasses 3
values | cvss3_confidentiality_impact
stringclasses 4
values | cvss3_integrity_impact
stringclasses 4
values | cvss3_availability_impact
stringclasses 4
values | cvss3_base_score
stringclasses 55
values | cvss3_base_severity
stringclasses 5
values | exploitability_score
stringclasses 22
values | impact_score
stringclasses 15
values | ac_insuf_info
stringclasses 3
values | reference_json
stringlengths 221
23.3k
| problemtype_json
stringclasses 200
values | severity
stringclasses 4
values | cve_nodes
stringlengths 2
33.1k
| cve_description
stringlengths 64
1.99k
| cve_last_modified_date
stringlengths 17
17
| cve_published_date
stringlengths 17
17
| cwe_name
stringclasses 125
values | cwe_description
stringclasses 124
values | cwe_extended_description
stringclasses 95
values | cwe_url
stringclasses 124
values | cwe_is_category
int64 0
1
| commit_author
stringlengths 0
34
| commit_author_date
stringlengths 25
25
| commit_msg
stringlengths 0
13.3k
| commit_hash
stringlengths 40
40
| commit_is_merge
stringclasses 1
value | repo_name
stringclasses 467
values | repo_description
stringclasses 459
values | repo_date_created
stringclasses 467
values | repo_date_last_push
stringclasses 467
values | repo_homepage
stringclasses 294
values | repo_owner
stringclasses 470
values | repo_stars
stringclasses 406
values | repo_forks
stringclasses 352
values | function_name
stringlengths 3
120
| function_signature
stringlengths 6
640
| function_parameters
stringlengths 2
302
| function
stringlengths 12
114k
| function_token_count
stringlengths 1
5
| function_before_change
stringclasses 1
value | labels
int64 1
1
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CVE-2019-14763 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:C | LOCAL | LOW | NONE | NONE | NONE | COMPLETE | 4.9 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/torvalds/linux/commit/c91815b596245fd7da349ecc43c8def670d2269e', 'name': 'https://github.com/torvalds/linux/commit/c91815b596245fd7da349ecc43c8def670d2269e', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/072684e8c58d17e853f8e8b9f6d9ce2e58d2b036', 'name': 'https://github.com/torvalds/linux/commit/072684e8c58d17e853f8e8b9f6d9ce2e58d2b036', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://www.spinics.net/lists/linux-usb/msg167393.html', 'name': 'https://www.spinics.net/lists/linux-usb/msg167393.html', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.16.4', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.16.4', 'refsource': 'MISC', 'tags': ['Mailing List', 'Vendor Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=072684e8c58d17e853f8e8b9f6d9ce2e58d2b036', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=072684e8c58d17e853f8e8b9f6d9ce2e58d2b036', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'https://www.spinics.net/lists/linux-usb/msg167355.html', 'name': 'https://www.spinics.net/lists/linux-usb/msg167355.html', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Third Party Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c91815b596245fd7da349ecc43c8def670d2269e', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c91815b596245fd7da349ecc43c8def670d2269e', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/4115-1/', 'name': 'USN-4115-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/4118-1/', 'name': 'USN-4118-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-667'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.16.4', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:esm:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In the Linux kernel before 4.16.4, a double-locking error in drivers/usb/dwc3/gadget.c may potentially cause a deadlock with f_hid.'}] | 2022-04-18T16:04Z | 2019-08-07T22:15Z | Improper Locking | The software does not properly acquire or release a lock on a resource, leading to unexpected resource state changes and behaviors. |
Locking is a type of synchronization behavior that ensures that multiple independently-operating processes or threads do not interfere with each other when accessing the same resource. All processes/threads are expected to follow the same steps for locking. If these steps are not followed precisely - or if no locking is done at all - then another process/thread could modify the shared resource in a way that is not visible or predictable to the original process. This can lead to data or memory corruption, denial of service, etc.
| https://cwe.mitre.org/data/definitions/667.html | 0 | Felipe Balbi | 2018-03-26 13:14:47+03:00 | usb: dwc3: gadget: never call ->complete() from ->ep_queue()
This is a requirement which has always existed but, somehow, wasn't
reflected in the documentation and problems weren't found until now
when Tuba Yavuz found a possible deadlock happening between dwc3 and
f_hid. She described the situation as follows:
spin_lock_irqsave(&hidg->write_spinlock, flags); // first acquire
/* we our function has been disabled by host */
if (!hidg->req) {
free_ep_req(hidg->in_ep, hidg->req);
goto try_again;
}
[...]
status = usb_ep_queue(hidg->in_ep, hidg->req, GFP_ATOMIC);
=>
[...]
=> usb_gadget_giveback_request
=>
f_hidg_req_complete
=>
spin_lock_irqsave(&hidg->write_spinlock, flags); // second acquire
Note that this happens because dwc3 would call ->complete() on a
failed usb_ep_queue() due to failed Start Transfer command. This is,
anyway, a theoretical situation because dwc3 currently uses "No
Response Update Transfer" command for Bulk and Interrupt endpoints.
It's still good to make this case impossible to happen even if the "No
Reponse Update Transfer" command is changed.
Reported-by: Tuba Yavuz <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]> | c91815b596245fd7da349ecc43c8def670d2269e | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | __dwc3_gadget_kick_transfer | __dwc3_gadget_kick_transfer( struct dwc3_ep * dep) | ['dep'] | static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep)
{
struct dwc3_gadget_ep_cmd_params params;
struct dwc3_request *req;
int starting;
int ret;
u32 cmd;
if (!dwc3_calc_trbs_left(dep))
return 0;
starting = !(dep->flags & DWC3_EP_BUSY);
dwc3_prepare_trbs(dep);
req = next_request(&dep->started_list);
if (!req) {
dep->flags |= DWC3_EP_PENDING_REQUEST;
return 0;
}
memset(¶ms, 0, sizeof(params));
if (starting) {
params.param0 = upper_32_bits(req->trb_dma);
params.param1 = lower_32_bits(req->trb_dma);
cmd = DWC3_DEPCMD_STARTTRANSFER;
if (usb_endpoint_xfer_isoc(dep->endpoint.desc))
cmd |= DWC3_DEPCMD_PARAM(dep->frame_number);
} else {
cmd = DWC3_DEPCMD_UPDATETRANSFER |
DWC3_DEPCMD_PARAM(dep->resource_index);
}
ret = dwc3_send_gadget_ep_cmd(dep, cmd, ¶ms);
if (ret < 0) {
/*
* FIXME we need to iterate over the list of requests
* here and stop, unmap, free and del each of the linked
* requests instead of what we do now.
*/
if (req->trb)
memset(req->trb, 0, sizeof(struct dwc3_trb));
dep->queued_requests--;
dwc3_gadget_giveback(dep, req, ret);
return ret;
}
dep->flags |= DWC3_EP_BUSY;
if (starting) {
dep->resource_index = dwc3_gadget_ep_get_transfer_index(dep);
WARN_ON_ONCE(!dep->resource_index);
}
return 0;
} | 249 | True | 1 |
|
CVE-2019-14763 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:C | LOCAL | LOW | NONE | NONE | NONE | COMPLETE | 4.9 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/torvalds/linux/commit/c91815b596245fd7da349ecc43c8def670d2269e', 'name': 'https://github.com/torvalds/linux/commit/c91815b596245fd7da349ecc43c8def670d2269e', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/072684e8c58d17e853f8e8b9f6d9ce2e58d2b036', 'name': 'https://github.com/torvalds/linux/commit/072684e8c58d17e853f8e8b9f6d9ce2e58d2b036', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://www.spinics.net/lists/linux-usb/msg167393.html', 'name': 'https://www.spinics.net/lists/linux-usb/msg167393.html', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.16.4', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.16.4', 'refsource': 'MISC', 'tags': ['Mailing List', 'Vendor Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=072684e8c58d17e853f8e8b9f6d9ce2e58d2b036', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=072684e8c58d17e853f8e8b9f6d9ce2e58d2b036', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'https://www.spinics.net/lists/linux-usb/msg167355.html', 'name': 'https://www.spinics.net/lists/linux-usb/msg167355.html', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Third Party Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c91815b596245fd7da349ecc43c8def670d2269e', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c91815b596245fd7da349ecc43c8def670d2269e', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/4115-1/', 'name': 'USN-4115-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/4118-1/', 'name': 'USN-4118-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-667'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.16.4', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:esm:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In the Linux kernel before 4.16.4, a double-locking error in drivers/usb/dwc3/gadget.c may potentially cause a deadlock with f_hid.'}] | 2022-04-18T16:04Z | 2019-08-07T22:15Z | Improper Locking | The software does not properly acquire or release a lock on a resource, leading to unexpected resource state changes and behaviors. |
Locking is a type of synchronization behavior that ensures that multiple independently-operating processes or threads do not interfere with each other when accessing the same resource. All processes/threads are expected to follow the same steps for locking. If these steps are not followed precisely - or if no locking is done at all - then another process/thread could modify the shared resource in a way that is not visible or predictable to the original process. This can lead to data or memory corruption, denial of service, etc.
| https://cwe.mitre.org/data/definitions/667.html | 0 | Felipe Balbi | 2018-03-26 13:14:47+03:00 | usb: dwc3: gadget: never call ->complete() from ->ep_queue()
This is a requirement which has always existed but, somehow, wasn't
reflected in the documentation and problems weren't found until now
when Tuba Yavuz found a possible deadlock happening between dwc3 and
f_hid. She described the situation as follows:
spin_lock_irqsave(&hidg->write_spinlock, flags); // first acquire
/* we our function has been disabled by host */
if (!hidg->req) {
free_ep_req(hidg->in_ep, hidg->req);
goto try_again;
}
[...]
status = usb_ep_queue(hidg->in_ep, hidg->req, GFP_ATOMIC);
=>
[...]
=> usb_gadget_giveback_request
=>
f_hidg_req_complete
=>
spin_lock_irqsave(&hidg->write_spinlock, flags); // second acquire
Note that this happens because dwc3 would call ->complete() on a
failed usb_ep_queue() due to failed Start Transfer command. This is,
anyway, a theoretical situation because dwc3 currently uses "No
Response Update Transfer" command for Bulk and Interrupt endpoints.
It's still good to make this case impossible to happen even if the "No
Reponse Update Transfer" command is changed.
Reported-by: Tuba Yavuz <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]> | c91815b596245fd7da349ecc43c8def670d2269e | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | dwc3_gadget_giveback | dwc3_gadget_giveback( struct dwc3_ep * dep , struct dwc3_request * req , int status) | ['dep', 'req', 'status'] | void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req,
int status)
{
struct dwc3 *dwc = dep->dwc;
req->started = false;
list_del(&req->list);
req->remaining = 0;
if (req->request.status == -EINPROGRESS)
req->request.status = status;
if (req->trb)
usb_gadget_unmap_request_by_dev(dwc->sysdev,
&req->request, req->direction);
req->trb = NULL;
trace_dwc3_gadget_giveback(req);
spin_unlock(&dwc->lock);
usb_gadget_giveback_request(&dep->endpoint, &req->request);
spin_lock(&dwc->lock);
if (dep->number > 1)
pm_runtime_put(dwc->dev);
} | 142 | True | 1 |
|
CVE-2018-18690 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:C | LOCAL | LOW | NONE | NONE | NONE | COMPLETE | 4.9 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/torvalds/linux/commit/7b38460dc8e4eafba06c78f8e37099d3b34d473c', 'name': 'https://github.com/torvalds/linux/commit/7b38460dc8e4eafba06c78f8e37099d3b34d473c', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.suse.com/show_bug.cgi?id=1105025', 'name': 'https://bugzilla.suse.com/show_bug.cgi?id=1105025', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=199119', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=199119', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7b38460dc8e4eafba06c78f8e37099d3b34d473c', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7b38460dc8e4eafba06c78f8e37099d3b34d473c', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/105753', 'name': '105753', 'refsource': 'BID', 'tags': ['VDB Entry', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3849-2/', 'name': 'USN-3849-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3848-2/', 'name': 'USN-3848-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3848-1/', 'name': 'USN-3848-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-3/', 'name': 'USN-3847-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-2/', 'name': 'USN-3847-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-1/', 'name': 'USN-3847-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3849-1/', 'name': 'USN-3849-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00017.html', 'name': '[debian-lts-announce] 20190315 [SECURITY] [DLA 1715-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00034.html', 'name': '[debian-lts-announce] 20190327 [SECURITY] [DLA 1731-1] linux security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/04/msg00004.html', 'name': '[debian-lts-announce] 20190401 [SECURITY] [DLA 1731-2] linux regression update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-754'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.17', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In the Linux kernel before 4.17, a local attacker able to set attributes on an xfs filesystem could make this filesystem non-operational until the next mount by triggering an unchecked error condition during an xfs attribute change, because xfs_attr_shortform_addname in fs/xfs/libxfs/xfs_attr.c mishandles ATTR_REPLACE operations with conversion of an attr from short to long form.'}] | 2019-10-03T00:03Z | 2018-10-26T18:29Z | Improper Check for Unusual or Exceptional Conditions | The software does not check or incorrectly checks for unusual or exceptional conditions that are not expected to occur frequently during day to day operation of the software. |
The programmer may assume that certain events or conditions will never occur or do not need to be worried about, such as low memory conditions, lack of access to resources due to restrictive permissions, or misbehaving clients or components. However, attackers may intentionally trigger these unusual conditions, thus violating the programmer's assumptions, possibly introducing instability, incorrect behavior, or a vulnerability.
Note that this entry is not exclusively about the use of exceptions and exception handling, which are mechanisms for both checking and handling unusual or unexpected conditions.
| https://cwe.mitre.org/data/definitions/754.html | 0 | Darrick J. Wong | 2018-04-17 19:10:15-07:00 | xfs: don't fail when converting shortform attr to long form during ATTR_REPLACE
Kanda Motohiro reported that expanding a tiny xattr into a large xattr
fails on XFS because we remove the tiny xattr from a shortform fork and
then try to re-add it after converting the fork to extents format having
not removed the ATTR_REPLACE flag. This fails because the attr is no
longer present, causing a fs shutdown.
This is derived from the patch in his bug report, but we really
shouldn't ignore a nonzero retval from the remove call.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199119
Reported-by: [email protected]
Reviewed-by: Dave Chinner <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Darrick J. Wong <[email protected]> | 7b38460dc8e4eafba06c78f8e37099d3b34d473c | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | xfs_attr_shortform_addname | xfs_attr_shortform_addname( xfs_da_args_t * args) | ['args'] | xfs_attr_shortform_addname(xfs_da_args_t *args)
{
int newsize, forkoff, retval;
trace_xfs_attr_sf_addname(args);
retval = xfs_attr_shortform_lookup(args);
if ((args->flags & ATTR_REPLACE) && (retval == -ENOATTR)) {
return retval;
} else if (retval == -EEXIST) {
if (args->flags & ATTR_CREATE)
return retval;
retval = xfs_attr_shortform_remove(args);
ASSERT(retval == 0);
}
if (args->namelen >= XFS_ATTR_SF_ENTSIZE_MAX ||
args->valuelen >= XFS_ATTR_SF_ENTSIZE_MAX)
return -ENOSPC;
newsize = XFS_ATTR_SF_TOTSIZE(args->dp);
newsize += XFS_ATTR_SF_ENTSIZE_BYNAME(args->namelen, args->valuelen);
forkoff = xfs_attr_shortform_bytesfit(args->dp, newsize);
if (!forkoff)
return -ENOSPC;
xfs_attr_shortform_add(args, forkoff);
return 0;
} | 154 | True | 1 |
|
CVE-2018-13093 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/torvalds/linux/commit/afca6c5b2595fc44383919fba740c194b0b76aff', 'name': 'https://github.com/torvalds/linux/commit/afca6c5b2595fc44383919fba740c194b0b76aff', 'refsource': 'MISC', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=199367', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=199367', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git/commit/?h=for-next&id=afca6c5b2595fc44383919fba740c194b0b76aff', 'name': 'https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git/commit/?h=for-next&id=afca6c5b2595fc44383919fba740c194b0b76aff', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2043', 'name': 'RHSA-2019:2043', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2029', 'name': 'RHSA-2019:2029', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://usn.ubuntu.com/4094-1/', 'name': 'USN-4094-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4118-1/', 'name': 'USN-4118-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/03/msg00001.html', 'name': '[debian-lts-announce] 20200302 [SECURITY] [DLA 2114-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.17.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in fs/xfs/xfs_icache.c in the Linux kernel through 4.17.3. There is a NULL pointer dereference and panic in lookup_slow() on a NULL inode->i_ops pointer when doing pathwalks on a corrupted xfs image. This occurs because of a lack of proper validation that cached inodes are free during allocation.'}] | 2019-08-06T17:15Z | 2018-07-03T10:29Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Dave Chinner | 2018-04-17 17:17:34-07:00 | xfs: validate cached inodes are free when allocated
A recent fuzzed filesystem image cached random dcache corruption
when the reproducer was run. This often showed up as panics in
lookup_slow() on a null inode->i_ops pointer when doing pathwalks.
BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
....
Call Trace:
lookup_slow+0x44/0x60
walk_component+0x3dd/0x9f0
link_path_walk+0x4a7/0x830
path_lookupat+0xc1/0x470
filename_lookup+0x129/0x270
user_path_at_empty+0x36/0x40
path_listxattr+0x98/0x110
SyS_listxattr+0x13/0x20
do_syscall_64+0xf5/0x280
entry_SYSCALL_64_after_hwframe+0x42/0xb7
but had many different failure modes including deadlocks trying to
lock the inode that was just allocated or KASAN reports of
use-after-free violations.
The cause of the problem was a corrupt INOBT on a v4 fs where the
root inode was marked as free in the inobt record. Hence when we
allocated an inode, it chose the root inode to allocate, found it in
the cache and re-initialised it.
We recently fixed a similar inode allocation issue caused by inobt
record corruption problem in xfs_iget_cache_miss() in commit
ee457001ed6c ("xfs: catch inode allocation state mismatch
corruption"). This change adds similar checks to the cache-hit path
to catch it, and turns the reproducer into a corruption shutdown
situation.
Reported-by: Wen Xu <[email protected]>
Signed-Off-By: Dave Chinner <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Carlos Maiolino <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
[darrick: fix typos in comment]
Signed-off-by: Darrick J. Wong <[email protected]> | afca6c5b2595fc44383919fba740c194b0b76aff | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | __releases | __releases( RCU) | ['RCU'] | int lock_flags) __releases(RCU)
{
struct inode *inode = VFS_I(ip);
struct xfs_mount *mp = ip->i_mount;
int error;
/*
* check for re-use of an inode within an RCU grace period due to the
* radix tree nodes not being updated yet. We monitor for this by
* setting the inode number to zero before freeing the inode structure.
* If the inode has been reallocated and set up, then the inode number
* will not match, so check for that, too.
*/
spin_lock(&ip->i_flags_lock);
if (ip->i_ino != ino) {
trace_xfs_iget_skip(ip);
XFS_STATS_INC(mp, xs_ig_frecycle);
error = -EAGAIN;
goto out_error;
}
/*
* If we are racing with another cache hit that is currently
* instantiating this inode or currently recycling it out of
* reclaimabe state, wait for the initialisation to complete
* before continuing.
*
* XXX(hch): eventually we should do something equivalent to
* wait_on_inode to wait for these flags to be cleared
* instead of polling for it.
*/
if (ip->i_flags & (XFS_INEW|XFS_IRECLAIM)) {
trace_xfs_iget_skip(ip);
XFS_STATS_INC(mp, xs_ig_frecycle);
error = -EAGAIN;
goto out_error;
}
/*
* If lookup is racing with unlink return an error immediately.
*/
if (VFS_I(ip)->i_mode == 0 && !(flags & XFS_IGET_CREATE)) {
error = -ENOENT;
goto out_error;
}
/*
* If IRECLAIMABLE is set, we've torn down the VFS inode already.
* Need to carefully get it back into useable state.
*/
if (ip->i_flags & XFS_IRECLAIMABLE) {
trace_xfs_iget_reclaim(ip);
if (flags & XFS_IGET_INCORE) {
error = -EAGAIN;
goto out_error;
}
/*
* We need to set XFS_IRECLAIM to prevent xfs_reclaim_inode
* from stomping over us while we recycle the inode. We can't
* clear the radix tree reclaimable tag yet as it requires
* pag_ici_lock to be held exclusive.
*/
ip->i_flags |= XFS_IRECLAIM;
spin_unlock(&ip->i_flags_lock);
rcu_read_unlock();
error = xfs_reinit_inode(mp, inode);
if (error) {
bool wake;
/*
* Re-initializing the inode failed, and we are in deep
* trouble. Try to re-add it to the reclaim list.
*/
rcu_read_lock();
spin_lock(&ip->i_flags_lock);
wake = !!__xfs_iflags_test(ip, XFS_INEW);
ip->i_flags &= ~(XFS_INEW | XFS_IRECLAIM);
if (wake)
wake_up_bit(&ip->i_flags, __XFS_INEW_BIT);
ASSERT(ip->i_flags & XFS_IRECLAIMABLE);
trace_xfs_iget_reclaim_fail(ip);
goto out_error;
}
spin_lock(&pag->pag_ici_lock);
spin_lock(&ip->i_flags_lock);
/*
* Clear the per-lifetime state in the inode as we are now
* effectively a new inode and need to return to the initial
* state before reuse occurs.
*/
ip->i_flags &= ~XFS_IRECLAIM_RESET_FLAGS;
ip->i_flags |= XFS_INEW;
xfs_inode_clear_reclaim_tag(pag, ip->i_ino);
inode->i_state = I_NEW;
ASSERT(!rwsem_is_locked(&inode->i_rwsem));
init_rwsem(&inode->i_rwsem);
spin_unlock(&ip->i_flags_lock);
spin_unlock(&pag->pag_ici_lock);
} else {
/* If the VFS inode is being torn down, pause and try again. */
if (!igrab(inode)) {
trace_xfs_iget_skip(ip);
error = -EAGAIN;
goto out_error;
}
/* We've got a live one. */
spin_unlock(&ip->i_flags_lock);
rcu_read_unlock();
trace_xfs_iget_hit(ip);
}
if (lock_flags != 0)
xfs_ilock(ip, lock_flags);
if (!(flags & XFS_IGET_INCORE))
xfs_iflags_clear(ip, XFS_ISTALE | XFS_IDONTCACHE);
XFS_STATS_INC(mp, xs_ig_found);
return 0;
out_error:
spin_unlock(&ip->i_flags_lock);
rcu_read_unlock();
return error;
} | 438 | True | 1 |
|
CVE-2018-13093 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/torvalds/linux/commit/afca6c5b2595fc44383919fba740c194b0b76aff', 'name': 'https://github.com/torvalds/linux/commit/afca6c5b2595fc44383919fba740c194b0b76aff', 'refsource': 'MISC', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=199367', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=199367', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git/commit/?h=for-next&id=afca6c5b2595fc44383919fba740c194b0b76aff', 'name': 'https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git/commit/?h=for-next&id=afca6c5b2595fc44383919fba740c194b0b76aff', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2043', 'name': 'RHSA-2019:2043', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2029', 'name': 'RHSA-2019:2029', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://usn.ubuntu.com/4094-1/', 'name': 'USN-4094-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4118-1/', 'name': 'USN-4118-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/03/msg00001.html', 'name': '[debian-lts-announce] 20200302 [SECURITY] [DLA 2114-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.17.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in fs/xfs/xfs_icache.c in the Linux kernel through 4.17.3. There is a NULL pointer dereference and panic in lookup_slow() on a NULL inode->i_ops pointer when doing pathwalks on a corrupted xfs image. This occurs because of a lack of proper validation that cached inodes are free during allocation.'}] | 2019-08-06T17:15Z | 2018-07-03T10:29Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Dave Chinner | 2018-04-17 17:17:34-07:00 | xfs: validate cached inodes are free when allocated
A recent fuzzed filesystem image cached random dcache corruption
when the reproducer was run. This often showed up as panics in
lookup_slow() on a null inode->i_ops pointer when doing pathwalks.
BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
....
Call Trace:
lookup_slow+0x44/0x60
walk_component+0x3dd/0x9f0
link_path_walk+0x4a7/0x830
path_lookupat+0xc1/0x470
filename_lookup+0x129/0x270
user_path_at_empty+0x36/0x40
path_listxattr+0x98/0x110
SyS_listxattr+0x13/0x20
do_syscall_64+0xf5/0x280
entry_SYSCALL_64_after_hwframe+0x42/0xb7
but had many different failure modes including deadlocks trying to
lock the inode that was just allocated or KASAN reports of
use-after-free violations.
The cause of the problem was a corrupt INOBT on a v4 fs where the
root inode was marked as free in the inobt record. Hence when we
allocated an inode, it chose the root inode to allocate, found it in
the cache and re-initialised it.
We recently fixed a similar inode allocation issue caused by inobt
record corruption problem in xfs_iget_cache_miss() in commit
ee457001ed6c ("xfs: catch inode allocation state mismatch
corruption"). This change adds similar checks to the cache-hit path
to catch it, and turns the reproducer into a corruption shutdown
situation.
Reported-by: Wen Xu <[email protected]>
Signed-Off-By: Dave Chinner <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Carlos Maiolino <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
[darrick: fix typos in comment]
Signed-off-by: Darrick J. Wong <[email protected]> | afca6c5b2595fc44383919fba740c194b0b76aff | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | xfs_iget_cache_miss | xfs_iget_cache_miss( struct xfs_mount * mp , struct xfs_perag * pag , xfs_trans_t * tp , xfs_ino_t ino , struct xfs_inode ** ipp , int flags , int lock_flags) | ['mp', 'pag', 'tp', 'ino', 'ipp', 'flags', 'lock_flags'] | xfs_iget_cache_miss(
struct xfs_mount *mp,
struct xfs_perag *pag,
xfs_trans_t *tp,
xfs_ino_t ino,
struct xfs_inode **ipp,
int flags,
int lock_flags)
{
struct xfs_inode *ip;
int error;
xfs_agino_t agino = XFS_INO_TO_AGINO(mp, ino);
int iflags;
ip = xfs_inode_alloc(mp, ino);
if (!ip)
return -ENOMEM;
error = xfs_iread(mp, tp, ip, flags);
if (error)
goto out_destroy;
if (!xfs_inode_verify_forks(ip)) {
error = -EFSCORRUPTED;
goto out_destroy;
}
trace_xfs_iget_miss(ip);
/*
* If we are allocating a new inode, then check what was returned is
* actually a free, empty inode. If we are not allocating an inode,
* the check we didn't find a free inode.
*/
if (flags & XFS_IGET_CREATE) {
if (VFS_I(ip)->i_mode != 0) {
xfs_warn(mp,
"Corruption detected! Free inode 0x%llx not marked free on disk",
ino);
error = -EFSCORRUPTED;
goto out_destroy;
}
if (ip->i_d.di_nblocks != 0) {
xfs_warn(mp,
"Corruption detected! Free inode 0x%llx has blocks allocated!",
ino);
error = -EFSCORRUPTED;
goto out_destroy;
}
} else if (VFS_I(ip)->i_mode == 0) {
error = -ENOENT;
goto out_destroy;
}
/*
* Preload the radix tree so we can insert safely under the
* write spinlock. Note that we cannot sleep inside the preload
* region. Since we can be called from transaction context, don't
* recurse into the file system.
*/
if (radix_tree_preload(GFP_NOFS)) {
error = -EAGAIN;
goto out_destroy;
}
/*
* Because the inode hasn't been added to the radix-tree yet it can't
* be found by another thread, so we can do the non-sleeping lock here.
*/
if (lock_flags) {
if (!xfs_ilock_nowait(ip, lock_flags))
BUG();
}
/*
* These values must be set before inserting the inode into the radix
* tree as the moment it is inserted a concurrent lookup (allowed by the
* RCU locking mechanism) can find it and that lookup must see that this
* is an inode currently under construction (i.e. that XFS_INEW is set).
* The ip->i_flags_lock that protects the XFS_INEW flag forms the
* memory barrier that ensures this detection works correctly at lookup
* time.
*/
iflags = XFS_INEW;
if (flags & XFS_IGET_DONTCACHE)
iflags |= XFS_IDONTCACHE;
ip->i_udquot = NULL;
ip->i_gdquot = NULL;
ip->i_pdquot = NULL;
xfs_iflags_set(ip, iflags);
/* insert the new inode */
spin_lock(&pag->pag_ici_lock);
error = radix_tree_insert(&pag->pag_ici_root, agino, ip);
if (unlikely(error)) {
WARN_ON(error != -EEXIST);
XFS_STATS_INC(mp, xs_ig_dup);
error = -EAGAIN;
goto out_preload_end;
}
spin_unlock(&pag->pag_ici_lock);
radix_tree_preload_end();
*ipp = ip;
return 0;
out_preload_end:
spin_unlock(&pag->pag_ici_lock);
radix_tree_preload_end();
if (lock_flags)
xfs_iunlock(ip, lock_flags);
out_destroy:
__destroy_inode(VFS_I(ip));
xfs_inode_free(ip);
return error;
} | 396 | True | 1 |
|
CVE-2018-12633 | False | False | False | False | AV:L/AC:M/Au:N/C:C/I:N/A:C | LOCAL | MEDIUM | NONE | COMPLETE | NONE | COMPLETE | 6.3 | CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:H | LOCAL | HIGH | LOW | NONE | UNCHANGED | HIGH | NONE | HIGH | 6.3 | MEDIUM | 1.0 | 5.2 | nan | [{'url': 'https://github.com/torvalds/linux/commit/bd23a7269834dc7c1f93e83535d16ebc44b75eba', 'name': 'https://github.com/torvalds/linux/commit/bd23a7269834dc7c1f93e83535d16ebc44b75eba', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=200131', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=200131', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=bd23a7269834dc7c1f93e83535d16ebc44b75eba', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=bd23a7269834dc7c1f93e83535d16ebc44b75eba', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.17.2', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel through 4.17.2. vbg_misc_device_ioctl() in drivers/virt/vboxguest/vboxguest_linux.c reads the same user data twice with copy_from_user. The header part of the user data is double-fetched, and a malicious user thread can tamper with the critical variables (hdr.size_in and hdr.size_out) in the header between the two fetches because of a race condition, leading to severe kernel errors, such as buffer over-accesses. This bug can cause a local denial of service and information leakage.'}] | 2018-08-21T15:42Z | 2018-06-22T00:29Z | Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') | The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently. |
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider.
A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc.
A race condition violates these properties, which are closely related:
Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution.
Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource.
A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x).
The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
| https://cwe.mitre.org/data/definitions/362.html | 0 | Wenwen Wang | 2018-05-08 08:50:28-05:00 | virt: vbox: Only copy_from_user the request-header once
In vbg_misc_device_ioctl(), the header of the ioctl argument is copied from
the userspace pointer 'arg' and saved to the kernel object 'hdr'. Then the
'version', 'size_in', and 'size_out' fields of 'hdr' are verified.
Before this commit, after the checks a buffer for the entire request would
be allocated and then all data including the verified header would be
copied from the userspace 'arg' pointer again.
Given that the 'arg' pointer resides in userspace, a malicious userspace
process can race to change the data pointed to by 'arg' between the two
copies. By doing so, the user can bypass the verifications on the ioctl
argument.
This commit fixes this by using the already checked copy of the header
to fill the header part of the allocated buffer and only copying the
remainder of the data from userspace.
Signed-off-by: Wenwen Wang <[email protected]>
Reviewed-by: Hans de Goede <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]> | bd23a7269834dc7c1f93e83535d16ebc44b75eba | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | vbg_misc_device_ioctl | vbg_misc_device_ioctl( struct file * filp , unsigned int req , unsigned long arg) | ['filp', 'req', 'arg'] | static long vbg_misc_device_ioctl(struct file *filp, unsigned int req,
unsigned long arg)
{
struct vbg_session *session = filp->private_data;
size_t returned_size, size;
struct vbg_ioctl_hdr hdr;
bool is_vmmdev_req;
int ret = 0;
void *buf;
if (copy_from_user(&hdr, (void *)arg, sizeof(hdr)))
return -EFAULT;
if (hdr.version != VBG_IOCTL_HDR_VERSION)
return -EINVAL;
if (hdr.size_in < sizeof(hdr) ||
(hdr.size_out && hdr.size_out < sizeof(hdr)))
return -EINVAL;
size = max(hdr.size_in, hdr.size_out);
if (_IOC_SIZE(req) && _IOC_SIZE(req) != size)
return -EINVAL;
if (size > SZ_16M)
return -E2BIG;
/*
* IOCTL_VMMDEV_REQUEST needs the buffer to be below 4G to avoid
* the need for a bounce-buffer and another copy later on.
*/
is_vmmdev_req = (req & ~IOCSIZE_MASK) == VBG_IOCTL_VMMDEV_REQUEST(0) ||
req == VBG_IOCTL_VMMDEV_REQUEST_BIG;
if (is_vmmdev_req)
buf = vbg_req_alloc(size, VBG_IOCTL_HDR_TYPE_DEFAULT);
else
buf = kmalloc(size, GFP_KERNEL);
if (!buf)
return -ENOMEM;
if (copy_from_user(buf, (void *)arg, hdr.size_in)) {
ret = -EFAULT;
goto out;
}
if (hdr.size_in < size)
memset(buf + hdr.size_in, 0, size - hdr.size_in);
ret = vbg_core_ioctl(session, req, buf);
if (ret)
goto out;
returned_size = ((struct vbg_ioctl_hdr *)buf)->size_out;
if (returned_size > size) {
vbg_debug("%s: too much output data %zu > %zu\n",
__func__, returned_size, size);
returned_size = size;
}
if (copy_to_user((void *)arg, buf, returned_size) != 0)
ret = -EFAULT;
out:
if (is_vmmdev_req)
vbg_req_free(buf, size);
else
kfree(buf);
return ret;
} | 352 | True | 1 |
|
CVE-2018-25020 | False | False | False | False | AV:L/AC:L/Au:N/C:P/I:P/A:P | LOCAL | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 4.6 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/050fad7c4534c13c8eb1d9c2ba66012e014773cb', 'name': 'https://github.com/torvalds/linux/commit/050fad7c4534c13c8eb1d9c2ba66012e014773cb', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20211229-0005/', 'name': 'https://security.netapp.com/advisory/ntap-20211229-0005/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://packetstormsecurity.com/files/165477/Kernel-Live-Patch-Security-Notice-LSN-0083-1.html', 'name': 'http://packetstormsecurity.com/files/165477/Kernel-Live-Patch-Security-Notice-LSN-0083-1.html', 'refsource': 'MISC', 'tags': ['Third Party Advisory', 'VDB Entry']}] | [{'description': [{'lang': 'en', 'value': 'CWE-120'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.17', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:cloud_backup:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h410c_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h410c:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h300s_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h300s:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h500s_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h500s:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h700s_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h700s:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h300e_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h300e:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h500e_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h500e:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h700e_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h700e:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h410s_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h410s:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}] | [{'lang': 'en', 'value': 'The BPF subsystem in the Linux kernel before 4.17 mishandles situations with a long jump over an instruction sequence where inner instructions require substantial expansions into multiple BPF instructions, leading to an overflow. This affects kernel/bpf/core.c and net/core/filter.c.'}] | 2022-04-05T20:55Z | 2021-12-08T05:15Z | Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') | The program copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow. | A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer. The simplest type of error, and the most common cause of buffer overflows, is the "classic" case in which the program copies the buffer without restricting how much is copied. Other variants exist, but the existence of a classic overflow strongly suggests that the programmer is not considering even the most basic of security protections.
| https://cwe.mitre.org/data/definitions/120.html | 0 | Daniel Borkmann | 2018-05-17 01:44:11+02:00 | bpf: fix truncated jump targets on heavy expansions
Recently during testing, I ran into the following panic:
[ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP
[ 207.901637] Modules linked in: binfmt_misc [...]
[ 207.966530] CPU: 45 PID: 2256 Comm: test_verifier Tainted: G W 4.17.0-rc3+ #7
[ 207.974956] Hardware name: FOXCONN R2-1221R-A4/C2U4N_MB, BIOS G31FB18A 03/31/2017
[ 207.982428] pstate: 60400005 (nZCv daif +PAN -UAO)
[ 207.987214] pc : bpf_skb_load_helper_8_no_cache+0x34/0xc0
[ 207.992603] lr : 0xffff000000bdb754
[ 207.996080] sp : ffff000013703ca0
[ 207.999384] x29: ffff000013703ca0 x28: 0000000000000001
[ 208.004688] x27: 0000000000000001 x26: 0000000000000000
[ 208.009992] x25: ffff000013703ce0 x24: ffff800fb4afcb00
[ 208.015295] x23: ffff00007d2f5038 x22: ffff00007d2f5000
[ 208.020599] x21: fffffffffeff2a6f x20: 000000000000000a
[ 208.025903] x19: ffff000009578000 x18: 0000000000000a03
[ 208.031206] x17: 0000000000000000 x16: 0000000000000000
[ 208.036510] x15: 0000ffff9de83000 x14: 0000000000000000
[ 208.041813] x13: 0000000000000000 x12: 0000000000000000
[ 208.047116] x11: 0000000000000001 x10: ffff0000089e7f18
[ 208.052419] x9 : fffffffffeff2a6f x8 : 0000000000000000
[ 208.057723] x7 : 000000000000000a x6 : 00280c6160000000
[ 208.063026] x5 : 0000000000000018 x4 : 0000000000007db6
[ 208.068329] x3 : 000000000008647a x2 : 19868179b1484500
[ 208.073632] x1 : 0000000000000000 x0 : ffff000009578c08
[ 208.078938] Process test_verifier (pid: 2256, stack limit = 0x0000000049ca7974)
[ 208.086235] Call trace:
[ 208.088672] bpf_skb_load_helper_8_no_cache+0x34/0xc0
[ 208.093713] 0xffff000000bdb754
[ 208.096845] bpf_test_run+0x78/0xf8
[ 208.100324] bpf_prog_test_run_skb+0x148/0x230
[ 208.104758] sys_bpf+0x314/0x1198
[ 208.108064] el0_svc_naked+0x30/0x34
[ 208.111632] Code: 91302260 f9400001 f9001fa1 d2800001 (29500680)
[ 208.117717] ---[ end trace 263cb8a59b5bf29f ]---
The program itself which caused this had a long jump over the whole
instruction sequence where all of the inner instructions required
heavy expansions into multiple BPF instructions. Additionally, I also
had BPF hardening enabled which requires once more rewrites of all
constant values in order to blind them. Each time we rewrite insns,
bpf_adj_branches() would need to potentially adjust branch targets
which cross the patchlet boundary to accommodate for the additional
delta. Eventually that lead to the case where the target offset could
not fit into insn->off's upper 0x7fff limit anymore where then offset
wraps around becoming negative (in s16 universe), or vice versa
depending on the jump direction.
Therefore it becomes necessary to detect and reject any such occasions
in a generic way for native eBPF and cBPF to eBPF migrations. For
the latter we can simply check bounds in the bpf_convert_filter()'s
BPF_EMIT_JMP helper macro and bail out once we surpass limits. The
bpf_patch_insn_single() for native eBPF (and cBPF to eBPF in case
of subsequent hardening) is a bit more complex in that we need to
detect such truncations before hitting the bpf_prog_realloc(). Thus
the latter is split into an extra pass to probe problematic offsets
on the original program in order to fail early. With that in place
and carefully tested I no longer hit the panic and the rewrites are
rejected properly. The above example panic I've seen on bpf-next,
though the issue itself is generic in that a guard against this issue
in bpf seems more appropriate in this case.
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Martin KaFai Lau <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]> | 050fad7c4534c13c8eb1d9c2ba66012e014773cb | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | bpf_adj_branches | bpf_adj_branches( struct bpf_prog * prog , u32 pos , u32 delta) | ['prog', 'pos', 'delta'] | static void bpf_adj_branches(struct bpf_prog *prog, u32 pos, u32 delta)
{
struct bpf_insn *insn = prog->insnsi;
u32 i, insn_cnt = prog->len;
bool pseudo_call;
u8 code;
int off;
for (i = 0; i < insn_cnt; i++, insn++) {
code = insn->code;
if (BPF_CLASS(code) != BPF_JMP)
continue;
if (BPF_OP(code) == BPF_EXIT)
continue;
if (BPF_OP(code) == BPF_CALL) {
if (insn->src_reg == BPF_PSEUDO_CALL)
pseudo_call = true;
else
continue;
} else {
pseudo_call = false;
}
off = pseudo_call ? insn->imm : insn->off;
/* Adjust offset of jmps if we cross boundaries. */
if (i < pos && i + off + 1 > pos)
off += delta;
else if (i > pos + delta && i + off + 1 <= pos + delta)
off -= delta;
if (pseudo_call)
insn->imm = off;
else
insn->off = off;
}
} | 191 | True | 1 |
|
CVE-2018-25020 | False | False | False | False | AV:L/AC:L/Au:N/C:P/I:P/A:P | LOCAL | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 4.6 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/050fad7c4534c13c8eb1d9c2ba66012e014773cb', 'name': 'https://github.com/torvalds/linux/commit/050fad7c4534c13c8eb1d9c2ba66012e014773cb', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20211229-0005/', 'name': 'https://security.netapp.com/advisory/ntap-20211229-0005/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://packetstormsecurity.com/files/165477/Kernel-Live-Patch-Security-Notice-LSN-0083-1.html', 'name': 'http://packetstormsecurity.com/files/165477/Kernel-Live-Patch-Security-Notice-LSN-0083-1.html', 'refsource': 'MISC', 'tags': ['Third Party Advisory', 'VDB Entry']}] | [{'description': [{'lang': 'en', 'value': 'CWE-120'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.17', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:cloud_backup:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h410c_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h410c:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h300s_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h300s:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h500s_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h500s:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h700s_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h700s:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h300e_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h300e:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h500e_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h500e:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h700e_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h700e:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h410s_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h410s:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}] | [{'lang': 'en', 'value': 'The BPF subsystem in the Linux kernel before 4.17 mishandles situations with a long jump over an instruction sequence where inner instructions require substantial expansions into multiple BPF instructions, leading to an overflow. This affects kernel/bpf/core.c and net/core/filter.c.'}] | 2022-04-05T20:55Z | 2021-12-08T05:15Z | Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') | The program copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow. | A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer. The simplest type of error, and the most common cause of buffer overflows, is the "classic" case in which the program copies the buffer without restricting how much is copied. Other variants exist, but the existence of a classic overflow strongly suggests that the programmer is not considering even the most basic of security protections.
| https://cwe.mitre.org/data/definitions/120.html | 0 | Daniel Borkmann | 2018-05-17 01:44:11+02:00 | bpf: fix truncated jump targets on heavy expansions
Recently during testing, I ran into the following panic:
[ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP
[ 207.901637] Modules linked in: binfmt_misc [...]
[ 207.966530] CPU: 45 PID: 2256 Comm: test_verifier Tainted: G W 4.17.0-rc3+ #7
[ 207.974956] Hardware name: FOXCONN R2-1221R-A4/C2U4N_MB, BIOS G31FB18A 03/31/2017
[ 207.982428] pstate: 60400005 (nZCv daif +PAN -UAO)
[ 207.987214] pc : bpf_skb_load_helper_8_no_cache+0x34/0xc0
[ 207.992603] lr : 0xffff000000bdb754
[ 207.996080] sp : ffff000013703ca0
[ 207.999384] x29: ffff000013703ca0 x28: 0000000000000001
[ 208.004688] x27: 0000000000000001 x26: 0000000000000000
[ 208.009992] x25: ffff000013703ce0 x24: ffff800fb4afcb00
[ 208.015295] x23: ffff00007d2f5038 x22: ffff00007d2f5000
[ 208.020599] x21: fffffffffeff2a6f x20: 000000000000000a
[ 208.025903] x19: ffff000009578000 x18: 0000000000000a03
[ 208.031206] x17: 0000000000000000 x16: 0000000000000000
[ 208.036510] x15: 0000ffff9de83000 x14: 0000000000000000
[ 208.041813] x13: 0000000000000000 x12: 0000000000000000
[ 208.047116] x11: 0000000000000001 x10: ffff0000089e7f18
[ 208.052419] x9 : fffffffffeff2a6f x8 : 0000000000000000
[ 208.057723] x7 : 000000000000000a x6 : 00280c6160000000
[ 208.063026] x5 : 0000000000000018 x4 : 0000000000007db6
[ 208.068329] x3 : 000000000008647a x2 : 19868179b1484500
[ 208.073632] x1 : 0000000000000000 x0 : ffff000009578c08
[ 208.078938] Process test_verifier (pid: 2256, stack limit = 0x0000000049ca7974)
[ 208.086235] Call trace:
[ 208.088672] bpf_skb_load_helper_8_no_cache+0x34/0xc0
[ 208.093713] 0xffff000000bdb754
[ 208.096845] bpf_test_run+0x78/0xf8
[ 208.100324] bpf_prog_test_run_skb+0x148/0x230
[ 208.104758] sys_bpf+0x314/0x1198
[ 208.108064] el0_svc_naked+0x30/0x34
[ 208.111632] Code: 91302260 f9400001 f9001fa1 d2800001 (29500680)
[ 208.117717] ---[ end trace 263cb8a59b5bf29f ]---
The program itself which caused this had a long jump over the whole
instruction sequence where all of the inner instructions required
heavy expansions into multiple BPF instructions. Additionally, I also
had BPF hardening enabled which requires once more rewrites of all
constant values in order to blind them. Each time we rewrite insns,
bpf_adj_branches() would need to potentially adjust branch targets
which cross the patchlet boundary to accommodate for the additional
delta. Eventually that lead to the case where the target offset could
not fit into insn->off's upper 0x7fff limit anymore where then offset
wraps around becoming negative (in s16 universe), or vice versa
depending on the jump direction.
Therefore it becomes necessary to detect and reject any such occasions
in a generic way for native eBPF and cBPF to eBPF migrations. For
the latter we can simply check bounds in the bpf_convert_filter()'s
BPF_EMIT_JMP helper macro and bail out once we surpass limits. The
bpf_patch_insn_single() for native eBPF (and cBPF to eBPF in case
of subsequent hardening) is a bit more complex in that we need to
detect such truncations before hitting the bpf_prog_realloc(). Thus
the latter is split into an extra pass to probe problematic offsets
on the original program in order to fail early. With that in place
and carefully tested I no longer hit the panic and the rewrites are
rejected properly. The above example panic I've seen on bpf-next,
though the issue itself is generic in that a guard against this issue
in bpf seems more appropriate in this case.
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Martin KaFai Lau <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]> | 050fad7c4534c13c8eb1d9c2ba66012e014773cb | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | bpf_patch_insn_single | bpf_patch_insn_single( struct bpf_prog * prog , u32 off , const struct bpf_insn * patch , u32 len) | ['prog', 'off', 'patch', 'len'] | struct bpf_prog *bpf_patch_insn_single(struct bpf_prog *prog, u32 off,
const struct bpf_insn *patch, u32 len)
{
u32 insn_adj_cnt, insn_rest, insn_delta = len - 1;
struct bpf_prog *prog_adj;
/* Since our patchlet doesn't expand the image, we're done. */
if (insn_delta == 0) {
memcpy(prog->insnsi + off, patch, sizeof(*patch));
return prog;
}
insn_adj_cnt = prog->len + insn_delta;
/* Several new instructions need to be inserted. Make room
* for them. Likely, there's no need for a new allocation as
* last page could have large enough tailroom.
*/
prog_adj = bpf_prog_realloc(prog, bpf_prog_size(insn_adj_cnt),
GFP_USER);
if (!prog_adj)
return NULL;
prog_adj->len = insn_adj_cnt;
/* Patching happens in 3 steps:
*
* 1) Move over tail of insnsi from next instruction onwards,
* so we can patch the single target insn with one or more
* new ones (patching is always from 1 to n insns, n > 0).
* 2) Inject new instructions at the target location.
* 3) Adjust branch offsets if necessary.
*/
insn_rest = insn_adj_cnt - off - len;
memmove(prog_adj->insnsi + off + len, prog_adj->insnsi + off + 1,
sizeof(*patch) * insn_rest);
memcpy(prog_adj->insnsi + off, patch, sizeof(*patch) * len);
bpf_adj_branches(prog_adj, off, insn_delta);
return prog_adj;
} | 167 | True | 1 |
|
CVE-2018-25020 | False | False | False | False | AV:L/AC:L/Au:N/C:P/I:P/A:P | LOCAL | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 4.6 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/050fad7c4534c13c8eb1d9c2ba66012e014773cb', 'name': 'https://github.com/torvalds/linux/commit/050fad7c4534c13c8eb1d9c2ba66012e014773cb', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20211229-0005/', 'name': 'https://security.netapp.com/advisory/ntap-20211229-0005/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://packetstormsecurity.com/files/165477/Kernel-Live-Patch-Security-Notice-LSN-0083-1.html', 'name': 'http://packetstormsecurity.com/files/165477/Kernel-Live-Patch-Security-Notice-LSN-0083-1.html', 'refsource': 'MISC', 'tags': ['Third Party Advisory', 'VDB Entry']}] | [{'description': [{'lang': 'en', 'value': 'CWE-120'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.17', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:cloud_backup:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h410c_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h410c:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h300s_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h300s:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h500s_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h500s:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h700s_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h700s:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h300e_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h300e:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h500e_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h500e:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h700e_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h700e:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h410s_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h410s:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}] | [{'lang': 'en', 'value': 'The BPF subsystem in the Linux kernel before 4.17 mishandles situations with a long jump over an instruction sequence where inner instructions require substantial expansions into multiple BPF instructions, leading to an overflow. This affects kernel/bpf/core.c and net/core/filter.c.'}] | 2022-04-05T20:55Z | 2021-12-08T05:15Z | Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') | The program copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow. | A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer. The simplest type of error, and the most common cause of buffer overflows, is the "classic" case in which the program copies the buffer without restricting how much is copied. Other variants exist, but the existence of a classic overflow strongly suggests that the programmer is not considering even the most basic of security protections.
| https://cwe.mitre.org/data/definitions/120.html | 0 | Daniel Borkmann | 2018-05-17 01:44:11+02:00 | bpf: fix truncated jump targets on heavy expansions
Recently during testing, I ran into the following panic:
[ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP
[ 207.901637] Modules linked in: binfmt_misc [...]
[ 207.966530] CPU: 45 PID: 2256 Comm: test_verifier Tainted: G W 4.17.0-rc3+ #7
[ 207.974956] Hardware name: FOXCONN R2-1221R-A4/C2U4N_MB, BIOS G31FB18A 03/31/2017
[ 207.982428] pstate: 60400005 (nZCv daif +PAN -UAO)
[ 207.987214] pc : bpf_skb_load_helper_8_no_cache+0x34/0xc0
[ 207.992603] lr : 0xffff000000bdb754
[ 207.996080] sp : ffff000013703ca0
[ 207.999384] x29: ffff000013703ca0 x28: 0000000000000001
[ 208.004688] x27: 0000000000000001 x26: 0000000000000000
[ 208.009992] x25: ffff000013703ce0 x24: ffff800fb4afcb00
[ 208.015295] x23: ffff00007d2f5038 x22: ffff00007d2f5000
[ 208.020599] x21: fffffffffeff2a6f x20: 000000000000000a
[ 208.025903] x19: ffff000009578000 x18: 0000000000000a03
[ 208.031206] x17: 0000000000000000 x16: 0000000000000000
[ 208.036510] x15: 0000ffff9de83000 x14: 0000000000000000
[ 208.041813] x13: 0000000000000000 x12: 0000000000000000
[ 208.047116] x11: 0000000000000001 x10: ffff0000089e7f18
[ 208.052419] x9 : fffffffffeff2a6f x8 : 0000000000000000
[ 208.057723] x7 : 000000000000000a x6 : 00280c6160000000
[ 208.063026] x5 : 0000000000000018 x4 : 0000000000007db6
[ 208.068329] x3 : 000000000008647a x2 : 19868179b1484500
[ 208.073632] x1 : 0000000000000000 x0 : ffff000009578c08
[ 208.078938] Process test_verifier (pid: 2256, stack limit = 0x0000000049ca7974)
[ 208.086235] Call trace:
[ 208.088672] bpf_skb_load_helper_8_no_cache+0x34/0xc0
[ 208.093713] 0xffff000000bdb754
[ 208.096845] bpf_test_run+0x78/0xf8
[ 208.100324] bpf_prog_test_run_skb+0x148/0x230
[ 208.104758] sys_bpf+0x314/0x1198
[ 208.108064] el0_svc_naked+0x30/0x34
[ 208.111632] Code: 91302260 f9400001 f9001fa1 d2800001 (29500680)
[ 208.117717] ---[ end trace 263cb8a59b5bf29f ]---
The program itself which caused this had a long jump over the whole
instruction sequence where all of the inner instructions required
heavy expansions into multiple BPF instructions. Additionally, I also
had BPF hardening enabled which requires once more rewrites of all
constant values in order to blind them. Each time we rewrite insns,
bpf_adj_branches() would need to potentially adjust branch targets
which cross the patchlet boundary to accommodate for the additional
delta. Eventually that lead to the case where the target offset could
not fit into insn->off's upper 0x7fff limit anymore where then offset
wraps around becoming negative (in s16 universe), or vice versa
depending on the jump direction.
Therefore it becomes necessary to detect and reject any such occasions
in a generic way for native eBPF and cBPF to eBPF migrations. For
the latter we can simply check bounds in the bpf_convert_filter()'s
BPF_EMIT_JMP helper macro and bail out once we surpass limits. The
bpf_patch_insn_single() for native eBPF (and cBPF to eBPF in case
of subsequent hardening) is a bit more complex in that we need to
detect such truncations before hitting the bpf_prog_realloc(). Thus
the latter is split into an extra pass to probe problematic offsets
on the original program in order to fail early. With that in place
and carefully tested I no longer hit the panic and the rewrites are
rejected properly. The above example panic I've seen on bpf-next,
though the issue itself is generic in that a guard against this issue
in bpf seems more appropriate in this case.
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Martin KaFai Lau <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]> | 050fad7c4534c13c8eb1d9c2ba66012e014773cb | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | bpf_convert_filter | bpf_convert_filter( struct sock_filter * prog , int len , struct bpf_prog * new_prog , int * new_len) | ['prog', 'len', 'new_prog', 'new_len'] | static int bpf_convert_filter(struct sock_filter *prog, int len,
struct bpf_prog *new_prog, int *new_len)
{
int new_flen = 0, pass = 0, target, i, stack_off;
struct bpf_insn *new_insn, *first_insn = NULL;
struct sock_filter *fp;
int *addrs = NULL;
u8 bpf_src;
BUILD_BUG_ON(BPF_MEMWORDS * sizeof(u32) > MAX_BPF_STACK);
BUILD_BUG_ON(BPF_REG_FP + 1 != MAX_BPF_REG);
if (len <= 0 || len > BPF_MAXINSNS)
return -EINVAL;
if (new_prog) {
first_insn = new_prog->insnsi;
addrs = kcalloc(len, sizeof(*addrs),
GFP_KERNEL | __GFP_NOWARN);
if (!addrs)
return -ENOMEM;
}
do_pass:
new_insn = first_insn;
fp = prog;
/* Classic BPF related prologue emission. */
if (new_prog) {
/* Classic BPF expects A and X to be reset first. These need
* to be guaranteed to be the first two instructions.
*/
*new_insn++ = BPF_ALU32_REG(BPF_XOR, BPF_REG_A, BPF_REG_A);
*new_insn++ = BPF_ALU32_REG(BPF_XOR, BPF_REG_X, BPF_REG_X);
/* All programs must keep CTX in callee saved BPF_REG_CTX.
* In eBPF case it's done by the compiler, here we need to
* do this ourself. Initial CTX is present in BPF_REG_ARG1.
*/
*new_insn++ = BPF_MOV64_REG(BPF_REG_CTX, BPF_REG_ARG1);
} else {
new_insn += 3;
}
for (i = 0; i < len; fp++, i++) {
struct bpf_insn tmp_insns[6] = { };
struct bpf_insn *insn = tmp_insns;
if (addrs)
addrs[i] = new_insn - first_insn;
switch (fp->code) {
/* All arithmetic insns and skb loads map as-is. */
case BPF_ALU | BPF_ADD | BPF_X:
case BPF_ALU | BPF_ADD | BPF_K:
case BPF_ALU | BPF_SUB | BPF_X:
case BPF_ALU | BPF_SUB | BPF_K:
case BPF_ALU | BPF_AND | BPF_X:
case BPF_ALU | BPF_AND | BPF_K:
case BPF_ALU | BPF_OR | BPF_X:
case BPF_ALU | BPF_OR | BPF_K:
case BPF_ALU | BPF_LSH | BPF_X:
case BPF_ALU | BPF_LSH | BPF_K:
case BPF_ALU | BPF_RSH | BPF_X:
case BPF_ALU | BPF_RSH | BPF_K:
case BPF_ALU | BPF_XOR | BPF_X:
case BPF_ALU | BPF_XOR | BPF_K:
case BPF_ALU | BPF_MUL | BPF_X:
case BPF_ALU | BPF_MUL | BPF_K:
case BPF_ALU | BPF_DIV | BPF_X:
case BPF_ALU | BPF_DIV | BPF_K:
case BPF_ALU | BPF_MOD | BPF_X:
case BPF_ALU | BPF_MOD | BPF_K:
case BPF_ALU | BPF_NEG:
case BPF_LD | BPF_ABS | BPF_W:
case BPF_LD | BPF_ABS | BPF_H:
case BPF_LD | BPF_ABS | BPF_B:
case BPF_LD | BPF_IND | BPF_W:
case BPF_LD | BPF_IND | BPF_H:
case BPF_LD | BPF_IND | BPF_B:
/* Check for overloaded BPF extension and
* directly convert it if found, otherwise
* just move on with mapping.
*/
if (BPF_CLASS(fp->code) == BPF_LD &&
BPF_MODE(fp->code) == BPF_ABS &&
convert_bpf_extensions(fp, &insn))
break;
if (fp->code == (BPF_ALU | BPF_DIV | BPF_X) ||
fp->code == (BPF_ALU | BPF_MOD | BPF_X)) {
*insn++ = BPF_MOV32_REG(BPF_REG_X, BPF_REG_X);
/* Error with exception code on div/mod by 0.
* For cBPF programs, this was always return 0.
*/
*insn++ = BPF_JMP_IMM(BPF_JNE, BPF_REG_X, 0, 2);
*insn++ = BPF_ALU32_REG(BPF_XOR, BPF_REG_A, BPF_REG_A);
*insn++ = BPF_EXIT_INSN();
}
*insn = BPF_RAW_INSN(fp->code, BPF_REG_A, BPF_REG_X, 0, fp->k);
break;
/* Jump transformation cannot use BPF block macros
* everywhere as offset calculation and target updates
* require a bit more work than the rest, i.e. jump
* opcodes map as-is, but offsets need adjustment.
*/
#define BPF_EMIT_JMP \
do { \
if (target >= len || target < 0) \
goto err; \
insn->off = addrs ? addrs[target] - addrs[i] - 1 : 0; \
/* Adjust pc relative offset for 2nd or 3rd insn. */ \
insn->off -= insn - tmp_insns; \
} while (0)
case BPF_JMP | BPF_JA:
target = i + fp->k + 1;
insn->code = fp->code;
BPF_EMIT_JMP;
break;
case BPF_JMP | BPF_JEQ | BPF_K:
case BPF_JMP | BPF_JEQ | BPF_X:
case BPF_JMP | BPF_JSET | BPF_K:
case BPF_JMP | BPF_JSET | BPF_X:
case BPF_JMP | BPF_JGT | BPF_K:
case BPF_JMP | BPF_JGT | BPF_X:
case BPF_JMP | BPF_JGE | BPF_K:
case BPF_JMP | BPF_JGE | BPF_X:
if (BPF_SRC(fp->code) == BPF_K && (int) fp->k < 0) {
/* BPF immediates are signed, zero extend
* immediate into tmp register and use it
* in compare insn.
*/
*insn++ = BPF_MOV32_IMM(BPF_REG_TMP, fp->k);
insn->dst_reg = BPF_REG_A;
insn->src_reg = BPF_REG_TMP;
bpf_src = BPF_X;
} else {
insn->dst_reg = BPF_REG_A;
insn->imm = fp->k;
bpf_src = BPF_SRC(fp->code);
insn->src_reg = bpf_src == BPF_X ? BPF_REG_X : 0;
}
/* Common case where 'jump_false' is next insn. */
if (fp->jf == 0) {
insn->code = BPF_JMP | BPF_OP(fp->code) | bpf_src;
target = i + fp->jt + 1;
BPF_EMIT_JMP;
break;
}
/* Convert some jumps when 'jump_true' is next insn. */
if (fp->jt == 0) {
switch (BPF_OP(fp->code)) {
case BPF_JEQ:
insn->code = BPF_JMP | BPF_JNE | bpf_src;
break;
case BPF_JGT:
insn->code = BPF_JMP | BPF_JLE | bpf_src;
break;
case BPF_JGE:
insn->code = BPF_JMP | BPF_JLT | bpf_src;
break;
default:
goto jmp_rest;
}
target = i + fp->jf + 1;
BPF_EMIT_JMP;
break;
}
jmp_rest:
/* Other jumps are mapped into two insns: Jxx and JA. */
target = i + fp->jt + 1;
insn->code = BPF_JMP | BPF_OP(fp->code) | bpf_src;
BPF_EMIT_JMP;
insn++;
insn->code = BPF_JMP | BPF_JA;
target = i + fp->jf + 1;
BPF_EMIT_JMP;
break;
/* ldxb 4 * ([14] & 0xf) is remaped into 6 insns. */
case BPF_LDX | BPF_MSH | BPF_B:
/* tmp = A */
*insn++ = BPF_MOV64_REG(BPF_REG_TMP, BPF_REG_A);
/* A = BPF_R0 = *(u8 *) (skb->data + K) */
*insn++ = BPF_LD_ABS(BPF_B, fp->k);
/* A &= 0xf */
*insn++ = BPF_ALU32_IMM(BPF_AND, BPF_REG_A, 0xf);
/* A <<= 2 */
*insn++ = BPF_ALU32_IMM(BPF_LSH, BPF_REG_A, 2);
/* X = A */
*insn++ = BPF_MOV64_REG(BPF_REG_X, BPF_REG_A);
/* A = tmp */
*insn = BPF_MOV64_REG(BPF_REG_A, BPF_REG_TMP);
break;
/* RET_K is remaped into 2 insns. RET_A case doesn't need an
* extra mov as BPF_REG_0 is already mapped into BPF_REG_A.
*/
case BPF_RET | BPF_A:
case BPF_RET | BPF_K:
if (BPF_RVAL(fp->code) == BPF_K)
*insn++ = BPF_MOV32_RAW(BPF_K, BPF_REG_0,
0, fp->k);
*insn = BPF_EXIT_INSN();
break;
/* Store to stack. */
case BPF_ST:
case BPF_STX:
stack_off = fp->k * 4 + 4;
*insn = BPF_STX_MEM(BPF_W, BPF_REG_FP, BPF_CLASS(fp->code) ==
BPF_ST ? BPF_REG_A : BPF_REG_X,
-stack_off);
/* check_load_and_stores() verifies that classic BPF can
* load from stack only after write, so tracking
* stack_depth for ST|STX insns is enough
*/
if (new_prog && new_prog->aux->stack_depth < stack_off)
new_prog->aux->stack_depth = stack_off;
break;
/* Load from stack. */
case BPF_LD | BPF_MEM:
case BPF_LDX | BPF_MEM:
stack_off = fp->k * 4 + 4;
*insn = BPF_LDX_MEM(BPF_W, BPF_CLASS(fp->code) == BPF_LD ?
BPF_REG_A : BPF_REG_X, BPF_REG_FP,
-stack_off);
break;
/* A = K or X = K */
case BPF_LD | BPF_IMM:
case BPF_LDX | BPF_IMM:
*insn = BPF_MOV32_IMM(BPF_CLASS(fp->code) == BPF_LD ?
BPF_REG_A : BPF_REG_X, fp->k);
break;
/* X = A */
case BPF_MISC | BPF_TAX:
*insn = BPF_MOV64_REG(BPF_REG_X, BPF_REG_A);
break;
/* A = X */
case BPF_MISC | BPF_TXA:
*insn = BPF_MOV64_REG(BPF_REG_A, BPF_REG_X);
break;
/* A = skb->len or X = skb->len */
case BPF_LD | BPF_W | BPF_LEN:
case BPF_LDX | BPF_W | BPF_LEN:
*insn = BPF_LDX_MEM(BPF_W, BPF_CLASS(fp->code) == BPF_LD ?
BPF_REG_A : BPF_REG_X, BPF_REG_CTX,
offsetof(struct sk_buff, len));
break;
/* Access seccomp_data fields. */
case BPF_LDX | BPF_ABS | BPF_W:
/* A = *(u32 *) (ctx + K) */
*insn = BPF_LDX_MEM(BPF_W, BPF_REG_A, BPF_REG_CTX, fp->k);
break;
/* Unknown instruction. */
default:
goto err;
}
insn++;
if (new_prog)
memcpy(new_insn, tmp_insns,
sizeof(*insn) * (insn - tmp_insns));
new_insn += insn - tmp_insns;
}
if (!new_prog) {
/* Only calculating new length. */
*new_len = new_insn - first_insn;
return 0;
}
pass++;
if (new_flen != new_insn - first_insn) {
new_flen = new_insn - first_insn;
if (pass > 2)
goto err;
goto do_pass;
}
kfree(addrs);
BUG_ON(*new_len != new_flen);
return 0;
err:
kfree(addrs);
return -EINVAL;
} | 1405 | True | 1 |
|
CVE-2018-1000204 | False | False | False | False | AV:N/AC:M/Au:S/C:C/I:N/A:N | NETWORK | MEDIUM | SINGLE | COMPLETE | NONE | NONE | 6.3 | CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N | NETWORK | HIGH | LOW | NONE | UNCHANGED | HIGH | NONE | NONE | 5.3 | MEDIUM | 1.6 | 3.6 | False | [{'url': 'https://github.com/torvalds/linux/commit/a45b599ad808c3c982fdcdc12b0b8611c2f92824', 'name': 'https://github.com/torvalds/linux/commit/a45b599ad808c3c982fdcdc12b0b8611c2f92824', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2018/06/26/3', 'name': 'http://www.openwall.com/lists/oss-security/2018/06/26/3', 'refsource': 'MISC', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3696-2/', 'name': 'USN-3696-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3696-1/', 'name': 'USN-3696-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/07/msg00016.html', 'name': '[debian-lts-announce] 20180715 [SECURITY] [DLA 1422-2] linux security update', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/07/msg00015.html', 'name': '[debian-lts-announce] 20180714 [SECURITY] [DLA 1422-1] linux security update', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/07/msg00020.html', 'name': '[debian-lts-announce] 20180718 [SECURITY] [DLA 1423-1] linux-4.9 new package', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3754-1/', 'name': 'USN-3754-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3752-2/', 'name': 'USN-3752-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3752-1/', 'name': 'USN-3752-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3752-3/', 'name': 'USN-3752-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2948', 'name': 'RHSA-2018:2948', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-05/msg00043.html', 'name': 'openSUSE-SU-2019:1407', 'refsource': 'SUSE', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-noinfo'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '3.18', 'versionEndIncluding': '4.16', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': '** DISPUTED ** Linux Kernel version 3.18 to 4.16 incorrectly handles an SG_IO ioctl on /dev/sg0 with dxfer_direction=SG_DXFER_FROM_DEV and an empty 6-byte cmdp. This may lead to copying up to 1000 kernel heap pages to the userspace. This has been fixed upstream in https://github.com/torvalds/linux/commit/a45b599ad808c3c982fdcdc12b0b8611c2f92824 already. The problem has limited scope, as users don\'t usually have permissions to access SCSI devices. On the other hand, e.g. the Nero user manual suggests doing `chmod o+r+w /dev/sg*` to make the devices accessible. NOTE: third parties dispute the relevance of this report, noting that the requirement for an attacker to have both the CAP_SYS_ADMIN and CAP_SYS_RAWIO capabilities makes it "virtually impossible to exploit."'}] | 2019-10-03T00:03Z | 2018-06-26T14:29Z | Insufficient Information | There is insufficient information about the issue to classify it; details are unkown or unspecified. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Alexander Potapenko | 2018-05-18 16:23:18+02:00 | scsi: sg: allocate with __GFP_ZERO in sg_build_indirect()
This shall help avoid copying uninitialized memory to the userspace when
calling ioctl(fd, SG_IO) with an empty command.
Reported-by: [email protected]
Cc: [email protected]
Signed-off-by: Alexander Potapenko <[email protected]>
Acked-by: Douglas Gilbert <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]> | a45b599ad808c3c982fdcdc12b0b8611c2f92824 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | sg_build_indirect | sg_build_indirect( Sg_scatter_hold * schp , Sg_fd * sfp , int buff_size) | ['schp', 'sfp', 'buff_size'] | sg_build_indirect(Sg_scatter_hold * schp, Sg_fd * sfp, int buff_size)
{
int ret_sz = 0, i, k, rem_sz, num, mx_sc_elems;
int sg_tablesize = sfp->parentdp->sg_tablesize;
int blk_size = buff_size, order;
gfp_t gfp_mask = GFP_ATOMIC | __GFP_COMP | __GFP_NOWARN;
struct sg_device *sdp = sfp->parentdp;
if (blk_size < 0)
return -EFAULT;
if (0 == blk_size)
++blk_size; /* don't know why */
/* round request up to next highest SG_SECTOR_SZ byte boundary */
blk_size = ALIGN(blk_size, SG_SECTOR_SZ);
SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sfp->parentdp,
"sg_build_indirect: buff_size=%d, blk_size=%d\n",
buff_size, blk_size));
/* N.B. ret_sz carried into this block ... */
mx_sc_elems = sg_build_sgat(schp, sfp, sg_tablesize);
if (mx_sc_elems < 0)
return mx_sc_elems; /* most likely -ENOMEM */
num = scatter_elem_sz;
if (unlikely(num != scatter_elem_sz_prev)) {
if (num < PAGE_SIZE) {
scatter_elem_sz = PAGE_SIZE;
scatter_elem_sz_prev = PAGE_SIZE;
} else
scatter_elem_sz_prev = num;
}
if (sdp->device->host->unchecked_isa_dma)
gfp_mask |= GFP_DMA;
if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO))
gfp_mask |= __GFP_ZERO;
order = get_order(num);
retry:
ret_sz = 1 << (PAGE_SHIFT + order);
for (k = 0, rem_sz = blk_size; rem_sz > 0 && k < mx_sc_elems;
k++, rem_sz -= ret_sz) {
num = (rem_sz > scatter_elem_sz_prev) ?
scatter_elem_sz_prev : rem_sz;
schp->pages[k] = alloc_pages(gfp_mask, order);
if (!schp->pages[k])
goto out;
if (num == scatter_elem_sz_prev) {
if (unlikely(ret_sz > scatter_elem_sz_prev)) {
scatter_elem_sz = ret_sz;
scatter_elem_sz_prev = ret_sz;
}
}
SCSI_LOG_TIMEOUT(5, sg_printk(KERN_INFO, sfp->parentdp,
"sg_build_indirect: k=%d, num=%d, ret_sz=%d\n",
k, num, ret_sz));
} /* end of for loop */
schp->page_order = order;
schp->k_use_sg = k;
SCSI_LOG_TIMEOUT(5, sg_printk(KERN_INFO, sfp->parentdp,
"sg_build_indirect: k_use_sg=%d, rem_sz=%d\n",
k, rem_sz));
schp->bufflen = blk_size;
if (rem_sz > 0) /* must have failed */
return -ENOMEM;
return 0;
out:
for (i = 0; i < k; i++)
__free_pages(schp->pages[i], order);
if (--order >= 0)
goto retry;
return -ENOMEM;
} | 427 | True | 1 |
|
CVE-2018-11506 | False | False | False | False | AV:L/AC:L/Au:N/C:C/I:C/A:C | LOCAL | LOW | NONE | COMPLETE | COMPLETE | COMPLETE | 7.2 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/f7068114d45ec55996b9040e98111afa56e010fe', 'name': 'https://github.com/torvalds/linux/commit/f7068114d45ec55996b9040e98111afa56e010fe', 'refsource': 'MISC', 'tags': ['Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f7068114d45ec55996b9040e98111afa56e010fe', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f7068114d45ec55996b9040e98111afa56e010fe', 'refsource': 'MISC', 'tags': ['Patch']}, {'url': 'https://twitter.com/efrmv/status/1001574894273007616', 'name': 'https://twitter.com/efrmv/status/1001574894273007616', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/07/msg00016.html', 'name': '[debian-lts-announce] 20180715 [SECURITY] [DLA 1422-2] linux security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/07/msg00015.html', 'name': '[debian-lts-announce] 20180714 [SECURITY] [DLA 1422-1] linux security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/07/msg00020.html', 'name': '[debian-lts-announce] 20180718 [SECURITY] [DLA 1423-1] linux-4.9 new package', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3752-2/', 'name': 'USN-3752-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3752-1/', 'name': 'USN-3752-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3752-3/', 'name': 'USN-3752-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2948', 'name': 'RHSA-2018:2948', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-787'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.16.12', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The sr_do_ioctl function in drivers/scsi/sr_ioctl.c in the Linux kernel through 4.16.12 allows local users to cause a denial of service (stack-based buffer overflow) or possibly have unspecified other impact because sense buffers have different sizes at the CDROM layer and the SCSI layer, as demonstrated by a CDROMREADMODE2 ioctl call.'}] | 2020-08-24T17:37Z | 2018-05-28T04:29Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | Jens Axboe | 2018-05-21 12:21:14-06:00 | sr: pass down correctly sized SCSI sense buffer
We're casting the CDROM layer request_sense to the SCSI sense
buffer, but the former is 64 bytes and the latter is 96 bytes.
As we generally allocate these on the stack, we end up blowing
up the stack.
Fix this by wrapping the scsi_execute() call with a properly
sized sense buffer, and copying back the bits for the CDROM
layer.
Cc: [email protected]
Reported-by: Piotr Gabriel Kosinski <[email protected]>
Reported-by: Daniel Shapira <[email protected]>
Tested-by: Kees Cook <[email protected]>
Fixes: 82ed4db499b8 ("block: split scsi_request out of struct request")
Signed-off-by: Jens Axboe <[email protected]> | f7068114d45ec55996b9040e98111afa56e010fe | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | sr_do_ioctl | sr_do_ioctl( Scsi_CD * cd , struct packet_command * cgc) | ['cd', 'cgc'] | int sr_do_ioctl(Scsi_CD *cd, struct packet_command *cgc)
{
struct scsi_device *SDev;
struct scsi_sense_hdr sshdr;
int result, err = 0, retries = 0;
SDev = cd->device;
retry:
if (!scsi_block_when_processing_errors(SDev)) {
err = -ENODEV;
goto out;
}
result = scsi_execute(SDev, cgc->cmd, cgc->data_direction,
cgc->buffer, cgc->buflen,
(unsigned char *)cgc->sense, &sshdr,
cgc->timeout, IOCTL_RETRIES, 0, 0, NULL);
/* Minimal error checking. Ignore cases we know about, and report the rest. */
if (driver_byte(result) != 0) {
switch (sshdr.sense_key) {
case UNIT_ATTENTION:
SDev->changed = 1;
if (!cgc->quiet)
sr_printk(KERN_INFO, cd,
"disc change detected.\n");
if (retries++ < 10)
goto retry;
err = -ENOMEDIUM;
break;
case NOT_READY: /* This happens if there is no disc in drive */
if (sshdr.asc == 0x04 &&
sshdr.ascq == 0x01) {
/* sense: Logical unit is in process of becoming ready */
if (!cgc->quiet)
sr_printk(KERN_INFO, cd,
"CDROM not ready yet.\n");
if (retries++ < 10) {
/* sleep 2 sec and try again */
ssleep(2);
goto retry;
} else {
/* 20 secs are enough? */
err = -ENOMEDIUM;
break;
}
}
if (!cgc->quiet)
sr_printk(KERN_INFO, cd,
"CDROM not ready. Make sure there "
"is a disc in the drive.\n");
err = -ENOMEDIUM;
break;
case ILLEGAL_REQUEST:
err = -EIO;
if (sshdr.asc == 0x20 &&
sshdr.ascq == 0x00)
/* sense: Invalid command operation code */
err = -EDRIVE_CANT_DO_THIS;
break;
default:
err = -EIO;
}
}
/* Wake up a process waiting for device */
out:
cgc->stat = err;
return err;
} | 300 | True | 1 |
|
CVE-2018-14734 | False | False | False | False | AV:L/AC:L/Au:N/C:P/I:P/A:C | LOCAL | LOW | NONE | PARTIAL | PARTIAL | COMPLETE | 6.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/cb2595c1393b4a5211534e6f0a0fbad369e21ad8', 'name': 'https://github.com/torvalds/linux/commit/cb2595c1393b4a5211534e6f0a0fbad369e21ad8', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=cb2595c1393b4a5211534e6f0a0fbad369e21ad8', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=cb2595c1393b4a5211534e6f0a0fbad369e21ad8', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4308', 'name': 'DSA-4308', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/10/msg00003.html', 'name': '[debian-lts-announce] 20181003 [SECURITY] [DLA 1531-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3797-2/', 'name': 'USN-3797-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3797-1/', 'name': 'USN-3797-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3849-2/', 'name': 'USN-3849-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-3/', 'name': 'USN-3847-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-2/', 'name': 'USN-3847-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-1/', 'name': 'USN-3847-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3849-1/', 'name': 'USN-3849-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:0831', 'name': 'RHSA-2019:0831', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2043', 'name': 'RHSA-2019:2043', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2029', 'name': 'RHSA-2019:2029', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-416'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.17.11', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'drivers/infiniband/core/ucma.c in the Linux kernel through 4.17.11 allows ucma_leave_multicast to access a certain data structure after a cleanup step in ucma_process_join, which allows attackers to cause a denial of service (use-after-free).'}] | 2019-04-23T17:29Z | 2018-07-29T23:29Z | Use After Free | Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. |
The use of previously-freed memory can have any number of adverse consequences, ranging from the corruption of valid data to the execution of arbitrary code, depending on the instantiation and timing of the flaw. The simplest way data corruption may occur involves the system's reuse of the freed memory. Use-after-free errors have two common and sometimes overlapping causes:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for freeing the memory.
In this scenario, the memory in question is allocated to another pointer validly at some point after it has been freed. The original pointer to the freed memory is used again and points to somewhere within the new allocation. As the data is changed, it corrupts the validly used memory; this induces undefined behavior in the process.
If the newly allocated data chances to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.
| https://cwe.mitre.org/data/definitions/416.html | 0 | Cong Wang | 2018-06-01 11:31:44-07:00 | infiniband: fix a possible use-after-free bug
ucma_process_join() will free the new allocated "mc" struct,
if there is any error after that, especially the copy_to_user().
But in parallel, ucma_leave_multicast() could find this "mc"
through idr_find() before ucma_process_join() frees it, since it
is already published.
So "mc" could be used in ucma_leave_multicast() after it is been
allocated and freed in ucma_process_join(), since we don't refcnt
it.
Fix this by separating "publish" from ID allocation, so that we
can get an ID first and publish it later after copy_to_user().
Fixes: c8f6a362bf3e ("RDMA/cma: Add multicast communication support")
Reported-by: Noam Rathaus <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]> | cb2595c1393b4a5211534e6f0a0fbad369e21ad8 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ucma_alloc_multicast | ucma_alloc_multicast( struct ucma_context * ctx) | ['ctx'] | static struct ucma_multicast* ucma_alloc_multicast(struct ucma_context *ctx)
{
struct ucma_multicast *mc;
mc = kzalloc(sizeof(*mc), GFP_KERNEL);
if (!mc)
return NULL;
mutex_lock(&mut);
mc->id = idr_alloc(&multicast_idr, mc, 0, 0, GFP_KERNEL);
mutex_unlock(&mut);
if (mc->id < 0)
goto error;
mc->ctx = ctx;
list_add_tail(&mc->list, &ctx->mc_list);
return mc;
error:
kfree(mc);
return NULL;
} | 108 | True | 1 |
|
CVE-2018-13094 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/torvalds/linux/commit/bb3d48dcf86a97dc25fe9fc2c11938e19cb4399a', 'name': 'https://github.com/torvalds/linux/commit/bb3d48dcf86a97dc25fe9fc2c11938e19cb4399a', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=199969', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=199969', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}, {'url': 'https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git/commit/?h=for-next&id=bb3d48dcf86a97dc25fe9fc2c11938e19cb4399a', 'name': 'https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git/commit/?h=for-next&id=bb3d48dcf86a97dc25fe9fc2c11938e19cb4399a', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3754-1/', 'name': 'USN-3754-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3753-2/', 'name': 'USN-3753-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3753-1/', 'name': 'USN-3753-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3752-2/', 'name': 'USN-3752-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3752-1/', 'name': 'USN-3752-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3752-3/', 'name': 'USN-3752-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:0831', 'name': 'RHSA-2019:0831', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2043', 'name': 'RHSA-2019:2043', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2029', 'name': 'RHSA-2019:2029', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/03/msg00001.html', 'name': '[debian-lts-announce] 20200302 [SECURITY] [DLA 2114-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.17.3', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in fs/xfs/libxfs/xfs_attr_leaf.c in the Linux kernel through 4.17.3. An OOPS may occur for a corrupted xfs image after xfs_da_shrink_inode() is called with a NULL bp.'}] | 2019-04-23T17:29Z | 2018-07-03T10:29Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Eric Sandeen | 2018-06-08 09:53:49-07:00 | xfs: don't call xfs_da_shrink_inode with NULL bp
xfs_attr3_leaf_create may have errored out before instantiating a buffer,
for example if the blkno is out of range. In that case there is no work
to do to remove it, and in fact xfs_da_shrink_inode will lead to an oops
if we try.
This also seems to fix a flaw where the original error from
xfs_attr3_leaf_create gets overwritten in the cleanup case, and it
removes a pointless assignment to bp which isn't used after this.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199969
Reported-by: Xu, Wen <[email protected]>
Tested-by: Xu, Wen <[email protected]>
Signed-off-by: Eric Sandeen <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Signed-off-by: Darrick J. Wong <[email protected]> | bb3d48dcf86a97dc25fe9fc2c11938e19cb4399a | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | xfs_attr_shortform_to_leaf | xfs_attr_shortform_to_leaf( struct xfs_da_args * args , struct xfs_buf ** leaf_bp) | ['args', 'leaf_bp'] | xfs_attr_shortform_to_leaf(
struct xfs_da_args *args,
struct xfs_buf **leaf_bp)
{
xfs_inode_t *dp;
xfs_attr_shortform_t *sf;
xfs_attr_sf_entry_t *sfe;
xfs_da_args_t nargs;
char *tmpbuffer;
int error, i, size;
xfs_dablk_t blkno;
struct xfs_buf *bp;
xfs_ifork_t *ifp;
trace_xfs_attr_sf_to_leaf(args);
dp = args->dp;
ifp = dp->i_afp;
sf = (xfs_attr_shortform_t *)ifp->if_u1.if_data;
size = be16_to_cpu(sf->hdr.totsize);
tmpbuffer = kmem_alloc(size, KM_SLEEP);
ASSERT(tmpbuffer != NULL);
memcpy(tmpbuffer, ifp->if_u1.if_data, size);
sf = (xfs_attr_shortform_t *)tmpbuffer;
xfs_idata_realloc(dp, -size, XFS_ATTR_FORK);
xfs_bmap_local_to_extents_empty(dp, XFS_ATTR_FORK);
bp = NULL;
error = xfs_da_grow_inode(args, &blkno);
if (error) {
/*
* If we hit an IO error middle of the transaction inside
* grow_inode(), we may have inconsistent data. Bail out.
*/
if (error == -EIO)
goto out;
xfs_idata_realloc(dp, size, XFS_ATTR_FORK); /* try to put */
memcpy(ifp->if_u1.if_data, tmpbuffer, size); /* it back */
goto out;
}
ASSERT(blkno == 0);
error = xfs_attr3_leaf_create(args, blkno, &bp);
if (error) {
error = xfs_da_shrink_inode(args, 0, bp);
bp = NULL;
if (error)
goto out;
xfs_idata_realloc(dp, size, XFS_ATTR_FORK); /* try to put */
memcpy(ifp->if_u1.if_data, tmpbuffer, size); /* it back */
goto out;
}
memset((char *)&nargs, 0, sizeof(nargs));
nargs.dp = dp;
nargs.geo = args->geo;
nargs.firstblock = args->firstblock;
nargs.dfops = args->dfops;
nargs.total = args->total;
nargs.whichfork = XFS_ATTR_FORK;
nargs.trans = args->trans;
nargs.op_flags = XFS_DA_OP_OKNOENT;
sfe = &sf->list[0];
for (i = 0; i < sf->hdr.count; i++) {
nargs.name = sfe->nameval;
nargs.namelen = sfe->namelen;
nargs.value = &sfe->nameval[nargs.namelen];
nargs.valuelen = sfe->valuelen;
nargs.hashval = xfs_da_hashname(sfe->nameval,
sfe->namelen);
nargs.flags = XFS_ATTR_NSP_ONDISK_TO_ARGS(sfe->flags);
error = xfs_attr3_leaf_lookup_int(bp, &nargs); /* set a->index */
ASSERT(error == -ENOATTR);
error = xfs_attr3_leaf_add(bp, &nargs);
ASSERT(error != -ENOSPC);
if (error)
goto out;
sfe = XFS_ATTR_SF_NEXTENTRY(sfe);
}
error = 0;
*leaf_bp = bp;
out:
kmem_free(tmpbuffer);
return error;
} | 510 | True | 1 |
|
CVE-2018-12232 | False | False | False | False | AV:N/AC:M/Au:N/C:N/I:N/A:C | NETWORK | MEDIUM | NONE | NONE | NONE | COMPLETE | 7.1 | CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | HIGH | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 5.9 | MEDIUM | 2.2 | 3.6 | nan | [{'url': 'https://patchwork.ozlabs.org/patch/926519/', 'name': 'https://patchwork.ozlabs.org/patch/926519/', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://lkml.org/lkml/2018/6/5/14', 'name': 'https://lkml.org/lkml/2018/6/5/14', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/6d8c50dcb029872b298eea68cc6209c866fd3e14', 'name': 'https://github.com/torvalds/linux/commit/6d8c50dcb029872b298eea68cc6209c866fd3e14', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6d8c50dcb029872b298eea68cc6209c866fd3e14', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6d8c50dcb029872b298eea68cc6209c866fd3e14', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/104453', 'name': '104453', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://usn.ubuntu.com/3752-2/', 'name': 'USN-3752-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3752-1/', 'name': 'USN-3752-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3752-3/', 'name': 'USN-3752-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2948', 'name': 'RHSA-2018:2948', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.17.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': "In net/socket.c in the Linux kernel through 4.17.1, there is a race condition between fchownat and close in cases where they target the same socket file descriptor, related to the sock_close and sockfs_setattr functions. fchownat does not increment the file descriptor reference count, which allows close to set the socket to NULL during fchownat's execution, leading to a NULL pointer dereference and system crash."}] | 2018-10-31T10:30Z | 2018-06-12T12:29Z | Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') | The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently. |
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider.
A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc.
A race condition violates these properties, which are closely related:
Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution.
Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource.
A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x).
The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
| https://cwe.mitre.org/data/definitions/362.html | 0 | Cong Wang | 2018-06-07 13:39:49-07:00 | socket: close race condition between sock_close() and sockfs_setattr()
fchownat() doesn't even hold refcnt of fd until it figures out
fd is really needed (otherwise is ignored) and releases it after
it resolves the path. This means sock_close() could race with
sockfs_setattr(), which leads to a NULL pointer dereference
since typically we set sock->sk to NULL in ->release().
As pointed out by Al, this is unique to sockfs. So we can fix this
in socket layer by acquiring inode_lock in sock_close() and
checking against NULL in sockfs_setattr().
sock_release() is called in many places, only the sock_close()
path matters here. And fortunately, this should not affect normal
sock_close() as it is only called when the last fd refcnt is gone.
It only affects sock_close() with a parallel sockfs_setattr() in
progress, which is not common.
Fixes: 86741ec25462 ("net: core: Add a UID field to struct sock.")
Reported-by: shankarapailoor <[email protected]>
Cc: Tetsuo Handa <[email protected]>
Cc: Lorenzo Colitti <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]> | 6d8c50dcb029872b298eea68cc6209c866fd3e14 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | sock_close | sock_close( struct inode * inode , struct file * filp) | ['inode', 'filp'] | static int sock_close(struct inode *inode, struct file *filp)
{
sock_release(SOCKET_I(inode));
return 0;
} | 25 | True | 1 |
|
CVE-2018-12232 | False | False | False | False | AV:N/AC:M/Au:N/C:N/I:N/A:C | NETWORK | MEDIUM | NONE | NONE | NONE | COMPLETE | 7.1 | CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | HIGH | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 5.9 | MEDIUM | 2.2 | 3.6 | nan | [{'url': 'https://patchwork.ozlabs.org/patch/926519/', 'name': 'https://patchwork.ozlabs.org/patch/926519/', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://lkml.org/lkml/2018/6/5/14', 'name': 'https://lkml.org/lkml/2018/6/5/14', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/6d8c50dcb029872b298eea68cc6209c866fd3e14', 'name': 'https://github.com/torvalds/linux/commit/6d8c50dcb029872b298eea68cc6209c866fd3e14', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6d8c50dcb029872b298eea68cc6209c866fd3e14', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6d8c50dcb029872b298eea68cc6209c866fd3e14', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/104453', 'name': '104453', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://usn.ubuntu.com/3752-2/', 'name': 'USN-3752-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3752-1/', 'name': 'USN-3752-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3752-3/', 'name': 'USN-3752-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2948', 'name': 'RHSA-2018:2948', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.17.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': "In net/socket.c in the Linux kernel through 4.17.1, there is a race condition between fchownat and close in cases where they target the same socket file descriptor, related to the sock_close and sockfs_setattr functions. fchownat does not increment the file descriptor reference count, which allows close to set the socket to NULL during fchownat's execution, leading to a NULL pointer dereference and system crash."}] | 2018-10-31T10:30Z | 2018-06-12T12:29Z | Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') | The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently. |
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider.
A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc.
A race condition violates these properties, which are closely related:
Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution.
Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource.
A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x).
The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
| https://cwe.mitre.org/data/definitions/362.html | 0 | Cong Wang | 2018-06-07 13:39:49-07:00 | socket: close race condition between sock_close() and sockfs_setattr()
fchownat() doesn't even hold refcnt of fd until it figures out
fd is really needed (otherwise is ignored) and releases it after
it resolves the path. This means sock_close() could race with
sockfs_setattr(), which leads to a NULL pointer dereference
since typically we set sock->sk to NULL in ->release().
As pointed out by Al, this is unique to sockfs. So we can fix this
in socket layer by acquiring inode_lock in sock_close() and
checking against NULL in sockfs_setattr().
sock_release() is called in many places, only the sock_close()
path matters here. And fortunately, this should not affect normal
sock_close() as it is only called when the last fd refcnt is gone.
It only affects sock_close() with a parallel sockfs_setattr() in
progress, which is not common.
Fixes: 86741ec25462 ("net: core: Add a UID field to struct sock.")
Reported-by: shankarapailoor <[email protected]>
Cc: Tetsuo Handa <[email protected]>
Cc: Lorenzo Colitti <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]> | 6d8c50dcb029872b298eea68cc6209c866fd3e14 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | sock_release | sock_release( struct socket * sock) | ['sock'] | void sock_release(struct socket *sock)
{
if (sock->ops) {
struct module *owner = sock->ops->owner;
sock->ops->release(sock);
sock->ops = NULL;
module_put(owner);
}
if (rcu_dereference_protected(sock->wq, 1)->fasync_list)
pr_err("%s: fasync list not empty!\n", __func__);
if (!sock->file) {
iput(SOCK_INODE(sock));
return;
}
sock->file = NULL;
} | 93 | True | 1 |
|
CVE-2018-12232 | False | False | False | False | AV:N/AC:M/Au:N/C:N/I:N/A:C | NETWORK | MEDIUM | NONE | NONE | NONE | COMPLETE | 7.1 | CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | HIGH | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 5.9 | MEDIUM | 2.2 | 3.6 | nan | [{'url': 'https://patchwork.ozlabs.org/patch/926519/', 'name': 'https://patchwork.ozlabs.org/patch/926519/', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://lkml.org/lkml/2018/6/5/14', 'name': 'https://lkml.org/lkml/2018/6/5/14', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/6d8c50dcb029872b298eea68cc6209c866fd3e14', 'name': 'https://github.com/torvalds/linux/commit/6d8c50dcb029872b298eea68cc6209c866fd3e14', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6d8c50dcb029872b298eea68cc6209c866fd3e14', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6d8c50dcb029872b298eea68cc6209c866fd3e14', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/104453', 'name': '104453', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://usn.ubuntu.com/3752-2/', 'name': 'USN-3752-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3752-1/', 'name': 'USN-3752-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3752-3/', 'name': 'USN-3752-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:2948', 'name': 'RHSA-2018:2948', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.17.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': "In net/socket.c in the Linux kernel through 4.17.1, there is a race condition between fchownat and close in cases where they target the same socket file descriptor, related to the sock_close and sockfs_setattr functions. fchownat does not increment the file descriptor reference count, which allows close to set the socket to NULL during fchownat's execution, leading to a NULL pointer dereference and system crash."}] | 2018-10-31T10:30Z | 2018-06-12T12:29Z | Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') | The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently. |
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider.
A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc.
A race condition violates these properties, which are closely related:
Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution.
Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource.
A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x).
The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
| https://cwe.mitre.org/data/definitions/362.html | 0 | Cong Wang | 2018-06-07 13:39:49-07:00 | socket: close race condition between sock_close() and sockfs_setattr()
fchownat() doesn't even hold refcnt of fd until it figures out
fd is really needed (otherwise is ignored) and releases it after
it resolves the path. This means sock_close() could race with
sockfs_setattr(), which leads to a NULL pointer dereference
since typically we set sock->sk to NULL in ->release().
As pointed out by Al, this is unique to sockfs. So we can fix this
in socket layer by acquiring inode_lock in sock_close() and
checking against NULL in sockfs_setattr().
sock_release() is called in many places, only the sock_close()
path matters here. And fortunately, this should not affect normal
sock_close() as it is only called when the last fd refcnt is gone.
It only affects sock_close() with a parallel sockfs_setattr() in
progress, which is not common.
Fixes: 86741ec25462 ("net: core: Add a UID field to struct sock.")
Reported-by: shankarapailoor <[email protected]>
Cc: Tetsuo Handa <[email protected]>
Cc: Lorenzo Colitti <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]> | 6d8c50dcb029872b298eea68cc6209c866fd3e14 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | sockfs_setattr | sockfs_setattr( struct dentry * dentry , struct iattr * iattr) | ['dentry', 'iattr'] | static int sockfs_setattr(struct dentry *dentry, struct iattr *iattr)
{
int err = simple_setattr(dentry, iattr);
if (!err && (iattr->ia_valid & ATTR_UID)) {
struct socket *sock = SOCKET_I(d_inode(dentry));
sock->sk->sk_uid = iattr->ia_uid;
}
return err;
} | 65 | True | 1 |
|
CVE-2018-12904 | False | False | False | False | AV:L/AC:M/Au:N/C:P/I:P/A:P | LOCAL | MEDIUM | NONE | PARTIAL | PARTIAL | PARTIAL | 4.4 | CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L | LOCAL | HIGH | NONE | NONE | UNCHANGED | LOW | LOW | LOW | 4.9 | MEDIUM | 1.4 | 3.4 | False | [{'url': 'https://github.com/torvalds/linux/commit/727ba748e110b4de50d142edca9d6a9b7e6111d8', 'name': 'https://github.com/torvalds/linux/commit/727ba748e110b4de50d142edca9d6a9b7e6111d8', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.17.2', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.17.2', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1589', 'name': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1589', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=727ba748e110b4de50d142edca9d6a9b7e6111d8', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=727ba748e110b4de50d142edca9d6a9b7e6111d8', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://www.exploit-db.com/exploits/44944/', 'name': '44944', 'refsource': 'EXPLOIT-DB', 'tags': ['Exploit', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://usn.ubuntu.com/3752-2/', 'name': 'USN-3752-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3752-1/', 'name': 'USN-3752-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3752-3/', 'name': 'USN-3752-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-noinfo'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.17.2', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In arch/x86/kvm/vmx.c in the Linux kernel before 4.17.2, when nested virtualization is used, local attackers could cause L1 KVM guests to VMEXIT, potentially allowing privilege escalations and denial of service attacks due to lack of checking of CPL.'}] | 2019-10-03T00:03Z | 2018-06-27T11:29Z | Insufficient Information | There is insufficient information about the issue to classify it; details are unkown or unspecified. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Felix Wilhelm | 2018-06-11 09:43:44+02:00 | kvm: nVMX: Enforce cpl=0 for VMX instructions
VMX instructions executed inside a L1 VM will always trigger a VM exit
even when executed with cpl 3. This means we must perform the
privilege check in software.
Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks")
Cc: [email protected]
Signed-off-by: Felix Wilhelm <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]> | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | handle_vmptrst | handle_vmptrst( struct kvm_vcpu * vcpu) | ['vcpu'] | static int handle_vmptrst(struct kvm_vcpu *vcpu)
{
unsigned long exit_qualification = vmcs_readl(EXIT_QUALIFICATION);
u32 vmx_instruction_info = vmcs_read32(VMX_INSTRUCTION_INFO);
gva_t vmcs_gva;
struct x86_exception e;
if (!nested_vmx_check_permission(vcpu))
return 1;
if (get_vmx_mem_address(vcpu, exit_qualification,
vmx_instruction_info, true, &vmcs_gva))
return 1;
/* ok to use *_system, as hardware has verified cpl=0 */
if (kvm_write_guest_virt_system(&vcpu->arch.emulate_ctxt, vmcs_gva,
(void *)&to_vmx(vcpu)->nested.current_vmptr,
sizeof(u64), &e)) {
kvm_inject_page_fault(vcpu, &e);
return 1;
}
nested_vmx_succeed(vcpu);
return kvm_skip_emulated_instruction(vcpu);
} | 123 | True | 1 |
|
CVE-2018-12904 | False | False | False | False | AV:L/AC:M/Au:N/C:P/I:P/A:P | LOCAL | MEDIUM | NONE | PARTIAL | PARTIAL | PARTIAL | 4.4 | CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L | LOCAL | HIGH | NONE | NONE | UNCHANGED | LOW | LOW | LOW | 4.9 | MEDIUM | 1.4 | 3.4 | False | [{'url': 'https://github.com/torvalds/linux/commit/727ba748e110b4de50d142edca9d6a9b7e6111d8', 'name': 'https://github.com/torvalds/linux/commit/727ba748e110b4de50d142edca9d6a9b7e6111d8', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.17.2', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.17.2', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1589', 'name': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1589', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=727ba748e110b4de50d142edca9d6a9b7e6111d8', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=727ba748e110b4de50d142edca9d6a9b7e6111d8', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://www.exploit-db.com/exploits/44944/', 'name': '44944', 'refsource': 'EXPLOIT-DB', 'tags': ['Exploit', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://usn.ubuntu.com/3752-2/', 'name': 'USN-3752-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3752-1/', 'name': 'USN-3752-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3752-3/', 'name': 'USN-3752-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-noinfo'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.17.2', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In arch/x86/kvm/vmx.c in the Linux kernel before 4.17.2, when nested virtualization is used, local attackers could cause L1 KVM guests to VMEXIT, potentially allowing privilege escalations and denial of service attacks due to lack of checking of CPL.'}] | 2019-10-03T00:03Z | 2018-06-27T11:29Z | Insufficient Information | There is insufficient information about the issue to classify it; details are unkown or unspecified. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Felix Wilhelm | 2018-06-11 09:43:44+02:00 | kvm: nVMX: Enforce cpl=0 for VMX instructions
VMX instructions executed inside a L1 VM will always trigger a VM exit
even when executed with cpl 3. This means we must perform the
privilege check in software.
Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks")
Cc: [email protected]
Signed-off-by: Felix Wilhelm <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]> | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | handle_vmread | handle_vmread( struct kvm_vcpu * vcpu) | ['vcpu'] | static int handle_vmread(struct kvm_vcpu *vcpu)
{
unsigned long field;
u64 field_value;
unsigned long exit_qualification = vmcs_readl(EXIT_QUALIFICATION);
u32 vmx_instruction_info = vmcs_read32(VMX_INSTRUCTION_INFO);
gva_t gva = 0;
if (!nested_vmx_check_permission(vcpu))
return 1;
if (!nested_vmx_check_vmcs12(vcpu))
return kvm_skip_emulated_instruction(vcpu);
/* Decode instruction info and find the field to read */
field = kvm_register_readl(vcpu, (((vmx_instruction_info) >> 28) & 0xf));
/* Read the field, zero-extended to a u64 field_value */
if (vmcs12_read_any(vcpu, field, &field_value) < 0) {
nested_vmx_failValid(vcpu, VMXERR_UNSUPPORTED_VMCS_COMPONENT);
return kvm_skip_emulated_instruction(vcpu);
}
/*
* Now copy part of this value to register or memory, as requested.
* Note that the number of bits actually copied is 32 or 64 depending
* on the guest's mode (32 or 64 bit), not on the given field's length.
*/
if (vmx_instruction_info & (1u << 10)) {
kvm_register_writel(vcpu, (((vmx_instruction_info) >> 3) & 0xf),
field_value);
} else {
if (get_vmx_mem_address(vcpu, exit_qualification,
vmx_instruction_info, true, &gva))
return 1;
/* _system ok, as hardware has verified cpl=0 */
kvm_write_guest_virt_system(&vcpu->arch.emulate_ctxt, gva,
&field_value, (is_long_mode(vcpu) ? 8 : 4), NULL);
}
nested_vmx_succeed(vcpu);
return kvm_skip_emulated_instruction(vcpu);
} | 206 | True | 1 |
|
CVE-2018-13406 | False | False | False | False | AV:L/AC:L/Au:N/C:C/I:C/A:C | LOCAL | LOW | NONE | COMPLETE | COMPLETE | COMPLETE | 7.2 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/9f645bcc566a1e9f921bdae7528a01ced5bc3713', 'name': 'https://github.com/torvalds/linux/commit/9f645bcc566a1e9f921bdae7528a01ced5bc3713', 'refsource': 'MISC', 'tags': ['Patch']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.17.4', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.17.4', 'refsource': 'MISC', 'tags': ['Release Notes']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9f645bcc566a1e9f921bdae7528a01ced5bc3713', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9f645bcc566a1e9f921bdae7528a01ced5bc3713', 'refsource': 'MISC', 'tags': ['Patch']}, {'url': 'http://www.securityfocus.com/bid/104685', 'name': '104685', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securitytracker.com/id/1041355', 'name': '1041355', 'refsource': 'SECTRACK', 'tags': ['VDB Entry', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3754-1/', 'name': 'USN-3754-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3753-2/', 'name': 'USN-3753-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3753-1/', 'name': 'USN-3753-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3752-2/', 'name': 'USN-3752-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3752-1/', 'name': 'USN-3752-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3752-3/', 'name': 'USN-3752-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00017.html', 'name': '[debian-lts-announce] 20190315 [SECURITY] [DLA 1715-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.17.4', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An integer overflow in the uvesafb_setcmap function in drivers/video/fbdev/uvesafb.c in the Linux kernel before 4.17.4 could result in local attackers being able to crash the kernel or potentially elevate privileges because kmalloc_array is not used.'}] | 2019-03-27T19:31Z | 2018-07-06T14:29Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Kees Cook | 2018-05-11 18:24:12+10:00 | video: uvesafb: Fix integer overflow in allocation
cmap->len can get close to INT_MAX/2, allowing for an integer overflow in
allocation. This uses kmalloc_array() instead to catch the condition.
Reported-by: Dr Silvio Cesare of InfoSect <[email protected]>
Fixes: 8bdb3a2d7df48 ("uvesafb: the driver core")
Cc: [email protected]
Signed-off-by: Kees Cook <[email protected]> | 9f645bcc566a1e9f921bdae7528a01ced5bc3713 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | uvesafb_setcmap | uvesafb_setcmap( struct fb_cmap * cmap , struct fb_info * info) | ['cmap', 'info'] | static int uvesafb_setcmap(struct fb_cmap *cmap, struct fb_info *info)
{
struct uvesafb_pal_entry *entries;
int shift = 16 - dac_width;
int i, err = 0;
if (info->var.bits_per_pixel == 8) {
if (cmap->start + cmap->len > info->cmap.start +
info->cmap.len || cmap->start < info->cmap.start)
return -EINVAL;
entries = kmalloc(sizeof(*entries) * cmap->len, GFP_KERNEL);
if (!entries)
return -ENOMEM;
for (i = 0; i < cmap->len; i++) {
entries[i].red = cmap->red[i] >> shift;
entries[i].green = cmap->green[i] >> shift;
entries[i].blue = cmap->blue[i] >> shift;
entries[i].pad = 0;
}
err = uvesafb_setpalette(entries, cmap->len, cmap->start, info);
kfree(entries);
} else {
/*
* For modes with bpp > 8, we only set the pseudo palette in
* the fb_info struct. We rely on uvesafb_setcolreg to do all
* sanity checking.
*/
for (i = 0; i < cmap->len; i++) {
err |= uvesafb_setcolreg(cmap->start + i, cmap->red[i],
cmap->green[i], cmap->blue[i],
0, info);
}
}
return err;
} | 265 | True | 1 |
|
CVE-2018-13095 | False | False | False | True | AV:N/AC:M/Au:N/C:N/I:N/A:P | NETWORK | MEDIUM | NONE | NONE | NONE | PARTIAL | 4.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://github.com/torvalds/linux/commit/23fcb3340d033d9f081e21e6c12c2db7eaa541d3', 'name': 'https://github.com/torvalds/linux/commit/23fcb3340d033d9f081e21e6c12c2db7eaa541d3', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=199915', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=199915', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git/commit/?h=for-next&id=23fcb3340d033d9f081e21e6c12c2db7eaa541d3', 'name': 'https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git/commit/?h=for-next&id=23fcb3340d033d9f081e21e6c12c2db7eaa541d3', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:1350', 'name': 'RHSA-2019:1350', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2043', 'name': 'RHSA-2019:2043', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2029', 'name': 'RHSA-2019:2029', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-787'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.17.3', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in fs/xfs/libxfs/xfs_inode_buf.c in the Linux kernel through 4.17.3. A denial of service (memory corruption and BUG) can occur for a corrupted xfs image upon encountering an inode that is in extent format, but has more extents than fit in the inode fork.'}] | 2020-08-24T17:37Z | 2018-07-03T10:29Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | Dave Chinner | 2018-06-21 23:25:57-07:00 | xfs: More robust inode extent count validation
When the inode is in extent format, it can't have more extents that
fit in the inode fork. We don't currenty check this, and so this
corruption goes unnoticed by the inode verifiers. This can lead to
crashes operating on invalid in-memory structures.
Attempts to access such a inode will now error out in the verifier
rather than allowing modification operations to proceed.
Reported-by: Wen Xu <[email protected]>
Signed-off-by: Dave Chinner <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
[darrick: fix a typedef, add some braces and breaks to shut up compiler warnings]
Signed-off-by: Darrick J. Wong <[email protected]> | 23fcb3340d033d9f081e21e6c12c2db7eaa541d3 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | xfs_dinode_verify | xfs_dinode_verify( struct xfs_mount * mp , xfs_ino_t ino , struct xfs_dinode * dip) | ['mp', 'ino', 'dip'] | xfs_dinode_verify(
struct xfs_mount *mp,
xfs_ino_t ino,
struct xfs_dinode *dip)
{
xfs_failaddr_t fa;
uint16_t mode;
uint16_t flags;
uint64_t flags2;
uint64_t di_size;
if (dip->di_magic != cpu_to_be16(XFS_DINODE_MAGIC))
return __this_address;
/* Verify v3 integrity information first */
if (dip->di_version >= 3) {
if (!xfs_sb_version_hascrc(&mp->m_sb))
return __this_address;
if (!xfs_verify_cksum((char *)dip, mp->m_sb.sb_inodesize,
XFS_DINODE_CRC_OFF))
return __this_address;
if (be64_to_cpu(dip->di_ino) != ino)
return __this_address;
if (!uuid_equal(&dip->di_uuid, &mp->m_sb.sb_meta_uuid))
return __this_address;
}
/* don't allow invalid i_size */
di_size = be64_to_cpu(dip->di_size);
if (di_size & (1ULL << 63))
return __this_address;
mode = be16_to_cpu(dip->di_mode);
if (mode && xfs_mode_to_ftype(mode) == XFS_DIR3_FT_UNKNOWN)
return __this_address;
/* No zero-length symlinks/dirs. */
if ((S_ISLNK(mode) || S_ISDIR(mode)) && di_size == 0)
return __this_address;
/* Fork checks carried over from xfs_iformat_fork */
if (mode &&
be32_to_cpu(dip->di_nextents) + be16_to_cpu(dip->di_anextents) >
be64_to_cpu(dip->di_nblocks))
return __this_address;
if (mode && XFS_DFORK_BOFF(dip) > mp->m_sb.sb_inodesize)
return __this_address;
flags = be16_to_cpu(dip->di_flags);
if (mode && (flags & XFS_DIFLAG_REALTIME) && !mp->m_rtdev_targp)
return __this_address;
/* Do we have appropriate data fork formats for the mode? */
switch (mode & S_IFMT) {
case S_IFIFO:
case S_IFCHR:
case S_IFBLK:
case S_IFSOCK:
if (dip->di_format != XFS_DINODE_FMT_DEV)
return __this_address;
break;
case S_IFREG:
case S_IFLNK:
case S_IFDIR:
switch (dip->di_format) {
case XFS_DINODE_FMT_LOCAL:
/*
* no local regular files yet
*/
if (S_ISREG(mode))
return __this_address;
if (di_size > XFS_DFORK_DSIZE(dip, mp))
return __this_address;
if (dip->di_nextents)
return __this_address;
/* fall through */
case XFS_DINODE_FMT_EXTENTS:
case XFS_DINODE_FMT_BTREE:
break;
default:
return __this_address;
}
break;
case 0:
/* Uninitialized inode ok. */
break;
default:
return __this_address;
}
if (XFS_DFORK_Q(dip)) {
switch (dip->di_aformat) {
case XFS_DINODE_FMT_LOCAL:
if (dip->di_anextents)
return __this_address;
/* fall through */
case XFS_DINODE_FMT_EXTENTS:
case XFS_DINODE_FMT_BTREE:
break;
default:
return __this_address;
}
} else {
/*
* If there is no fork offset, this may be a freshly-made inode
* in a new disk cluster, in which case di_aformat is zeroed.
* Otherwise, such an inode must be in EXTENTS format; this goes
* for freed inodes as well.
*/
switch (dip->di_aformat) {
case 0:
case XFS_DINODE_FMT_EXTENTS:
break;
default:
return __this_address;
}
if (dip->di_anextents)
return __this_address;
}
/* extent size hint validation */
fa = xfs_inode_validate_extsize(mp, be32_to_cpu(dip->di_extsize),
mode, flags);
if (fa)
return fa;
/* only version 3 or greater inodes are extensively verified here */
if (dip->di_version < 3)
return NULL;
flags2 = be64_to_cpu(dip->di_flags2);
/* don't allow reflink/cowextsize if we don't have reflink */
if ((flags2 & (XFS_DIFLAG2_REFLINK | XFS_DIFLAG2_COWEXTSIZE)) &&
!xfs_sb_version_hasreflink(&mp->m_sb))
return __this_address;
/* only regular files get reflink */
if ((flags2 & XFS_DIFLAG2_REFLINK) && (mode & S_IFMT) != S_IFREG)
return __this_address;
/* don't let reflink and realtime mix */
if ((flags2 & XFS_DIFLAG2_REFLINK) && (flags & XFS_DIFLAG_REALTIME))
return __this_address;
/* don't let reflink and dax mix */
if ((flags2 & XFS_DIFLAG2_REFLINK) && (flags2 & XFS_DIFLAG2_DAX))
return __this_address;
/* COW extent size hint validation */
fa = xfs_inode_validate_cowextsize(mp, be32_to_cpu(dip->di_cowextsize),
mode, flags, flags2);
if (fa)
return fa;
return NULL;
} | 606 | True | 1 |
|
CVE-2018-12896 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/torvalds/linux/commit/78c9c4dfbf8c04883941445a195276bb4bb92c76', 'name': 'https://github.com/torvalds/linux/commit/78c9c4dfbf8c04883941445a195276bb4bb92c76', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/lcytxw/bug_repro/tree/master/bug_200189', 'name': 'https://github.com/lcytxw/bug_repro/tree/master/bug_200189', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=200189', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=200189', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3849-2/', 'name': 'USN-3849-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3848-2/', 'name': 'USN-3848-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3848-1/', 'name': 'USN-3848-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-3/', 'name': 'USN-3847-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-2/', 'name': 'USN-3847-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-1/', 'name': 'USN-3847-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3849-1/', 'name': 'USN-3849-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00017.html', 'name': '[debian-lts-announce] 20190315 [SECURITY] [DLA 1715-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00034.html', 'name': '[debian-lts-announce] 20190327 [SECURITY] [DLA 1731-1] linux security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/04/msg00004.html', 'name': '[debian-lts-announce] 20190401 [SECURITY] [DLA 1731-2] linux regression update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.17.3', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel through 4.17.3. An Integer Overflow in kernel/time/posix-timers.c in the POSIX timer code is caused by the way the overrun accounting works. Depending on interval and expiry time values, the overrun can be larger than INT_MAX, but the accounting is int based. This basically makes the accounting values, which are visible to user space via timer_getoverrun(2) and siginfo::si_overrun, random. For example, a local user can cause a denial of service (signed integer overflow) via crafted mmap, futex, timer_create, and timer_settime system calls.'}] | 2019-04-03T12:04Z | 2018-07-02T17:29Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Thomas Gleixner | 2018-06-26 15:21:32+02:00 | 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] | 78c9c4dfbf8c04883941445a195276bb4bb92c76 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | bump_cpu_timer | bump_cpu_timer( struct k_itimer * timer , u64 now) | ['timer', 'now'] | static void bump_cpu_timer(struct k_itimer *timer, u64 now)
{
int i;
u64 delta, incr;
if (timer->it.cpu.incr == 0)
return;
if (now < timer->it.cpu.expires)
return;
incr = timer->it.cpu.incr;
delta = now + incr - timer->it.cpu.expires;
/* Don't use (incr*2 < delta), incr*2 might overflow. */
for (i = 0; incr < delta - incr; i++)
incr = incr << 1;
for (; i >= 0; incr >>= 1, i--) {
if (delta < incr)
continue;
timer->it.cpu.expires += incr;
timer->it_overrun += 1 << i;
delta -= incr;
}
} | 141 | True | 1 |
|
CVE-2018-12896 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/torvalds/linux/commit/78c9c4dfbf8c04883941445a195276bb4bb92c76', 'name': 'https://github.com/torvalds/linux/commit/78c9c4dfbf8c04883941445a195276bb4bb92c76', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/lcytxw/bug_repro/tree/master/bug_200189', 'name': 'https://github.com/lcytxw/bug_repro/tree/master/bug_200189', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=200189', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=200189', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3849-2/', 'name': 'USN-3849-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3848-2/', 'name': 'USN-3848-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3848-1/', 'name': 'USN-3848-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-3/', 'name': 'USN-3847-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-2/', 'name': 'USN-3847-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-1/', 'name': 'USN-3847-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3849-1/', 'name': 'USN-3849-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00017.html', 'name': '[debian-lts-announce] 20190315 [SECURITY] [DLA 1715-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00034.html', 'name': '[debian-lts-announce] 20190327 [SECURITY] [DLA 1731-1] linux security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/04/msg00004.html', 'name': '[debian-lts-announce] 20190401 [SECURITY] [DLA 1731-2] linux regression update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.17.3', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel through 4.17.3. An Integer Overflow in kernel/time/posix-timers.c in the POSIX timer code is caused by the way the overrun accounting works. Depending on interval and expiry time values, the overrun can be larger than INT_MAX, but the accounting is int based. This basically makes the accounting values, which are visible to user space via timer_getoverrun(2) and siginfo::si_overrun, random. For example, a local user can cause a denial of service (signed integer overflow) via crafted mmap, futex, timer_create, and timer_settime system calls.'}] | 2019-04-03T12:04Z | 2018-07-02T17:29Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Thomas Gleixner | 2018-06-26 15:21:32+02:00 | 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] | 78c9c4dfbf8c04883941445a195276bb4bb92c76 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | SYSCALL_DEFINE1 | SYSCALL_DEFINE1( timer_getoverrun , timer_t , timer_id) | ['timer_getoverrun', 'timer_t', 'timer_id'] | SYSCALL_DEFINE1(timer_getoverrun, timer_t, timer_id)
{
struct k_itimer *timr;
int overrun;
unsigned long flags;
timr = lock_timer(timer_id, &flags);
if (!timr)
return -EINVAL;
overrun = timr->it_overrun_last;
unlock_timer(timr, flags);
return overrun;
} | 57 | True | 1 |
|
CVE-2018-12896 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/torvalds/linux/commit/78c9c4dfbf8c04883941445a195276bb4bb92c76', 'name': 'https://github.com/torvalds/linux/commit/78c9c4dfbf8c04883941445a195276bb4bb92c76', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/lcytxw/bug_repro/tree/master/bug_200189', 'name': 'https://github.com/lcytxw/bug_repro/tree/master/bug_200189', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=200189', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=200189', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3849-2/', 'name': 'USN-3849-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3848-2/', 'name': 'USN-3848-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3848-1/', 'name': 'USN-3848-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-3/', 'name': 'USN-3847-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-2/', 'name': 'USN-3847-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-1/', 'name': 'USN-3847-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3849-1/', 'name': 'USN-3849-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00017.html', 'name': '[debian-lts-announce] 20190315 [SECURITY] [DLA 1715-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00034.html', 'name': '[debian-lts-announce] 20190327 [SECURITY] [DLA 1731-1] linux security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/04/msg00004.html', 'name': '[debian-lts-announce] 20190401 [SECURITY] [DLA 1731-2] linux regression update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.17.3', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel through 4.17.3. An Integer Overflow in kernel/time/posix-timers.c in the POSIX timer code is caused by the way the overrun accounting works. Depending on interval and expiry time values, the overrun can be larger than INT_MAX, but the accounting is int based. This basically makes the accounting values, which are visible to user space via timer_getoverrun(2) and siginfo::si_overrun, random. For example, a local user can cause a denial of service (signed integer overflow) via crafted mmap, futex, timer_create, and timer_settime system calls.'}] | 2019-04-03T12:04Z | 2018-07-02T17:29Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Thomas Gleixner | 2018-06-26 15:21:32+02:00 | 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] | 78c9c4dfbf8c04883941445a195276bb4bb92c76 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | common_hrtimer_rearm | common_hrtimer_rearm( struct k_itimer * timr) | ['timr'] | static void common_hrtimer_rearm(struct k_itimer *timr)
{
struct hrtimer *timer = &timr->it.real.timer;
if (!timr->it_interval)
return;
timr->it_overrun += (unsigned int) hrtimer_forward(timer,
timer->base->get_time(),
timr->it_interval);
hrtimer_restart(timer);
} | 62 | True | 1 |
|
CVE-2018-12896 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/torvalds/linux/commit/78c9c4dfbf8c04883941445a195276bb4bb92c76', 'name': 'https://github.com/torvalds/linux/commit/78c9c4dfbf8c04883941445a195276bb4bb92c76', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/lcytxw/bug_repro/tree/master/bug_200189', 'name': 'https://github.com/lcytxw/bug_repro/tree/master/bug_200189', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=200189', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=200189', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3849-2/', 'name': 'USN-3849-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3848-2/', 'name': 'USN-3848-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3848-1/', 'name': 'USN-3848-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-3/', 'name': 'USN-3847-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-2/', 'name': 'USN-3847-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-1/', 'name': 'USN-3847-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3849-1/', 'name': 'USN-3849-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00017.html', 'name': '[debian-lts-announce] 20190315 [SECURITY] [DLA 1715-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00034.html', 'name': '[debian-lts-announce] 20190327 [SECURITY] [DLA 1731-1] linux security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/04/msg00004.html', 'name': '[debian-lts-announce] 20190401 [SECURITY] [DLA 1731-2] linux regression update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.17.3', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel through 4.17.3. An Integer Overflow in kernel/time/posix-timers.c in the POSIX timer code is caused by the way the overrun accounting works. Depending on interval and expiry time values, the overrun can be larger than INT_MAX, but the accounting is int based. This basically makes the accounting values, which are visible to user space via timer_getoverrun(2) and siginfo::si_overrun, random. For example, a local user can cause a denial of service (signed integer overflow) via crafted mmap, futex, timer_create, and timer_settime system calls.'}] | 2019-04-03T12:04Z | 2018-07-02T17:29Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Thomas Gleixner | 2018-06-26 15:21:32+02:00 | 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] | 78c9c4dfbf8c04883941445a195276bb4bb92c76 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | common_timer_get | common_timer_get( struct k_itimer * timr , struct itimerspec64 * cur_setting) | ['timr', 'cur_setting'] | void common_timer_get(struct k_itimer *timr, struct itimerspec64 *cur_setting)
{
const struct k_clock *kc = timr->kclock;
ktime_t now, remaining, iv;
struct timespec64 ts64;
bool sig_none;
sig_none = timr->it_sigev_notify == SIGEV_NONE;
iv = timr->it_interval;
/* interval timer ? */
if (iv) {
cur_setting->it_interval = ktime_to_timespec64(iv);
} else if (!timr->it_active) {
/*
* SIGEV_NONE oneshot timers are never queued. Check them
* below.
*/
if (!sig_none)
return;
}
/*
* The timespec64 based conversion is suboptimal, but it's not
* worth to implement yet another callback.
*/
kc->clock_get(timr->it_clock, &ts64);
now = timespec64_to_ktime(ts64);
/*
* When a requeue is pending or this is a SIGEV_NONE timer move the
* expiry time forward by intervals, so expiry is > now.
*/
if (iv && (timr->it_requeue_pending & REQUEUE_PENDING || sig_none))
timr->it_overrun += (int)kc->timer_forward(timr, now);
remaining = kc->timer_remaining(timr, now);
/* Return 0 only, when the timer is expired and not pending */
if (remaining <= 0) {
/*
* A single shot SIGEV_NONE timer must return 0, when
* it is expired !
*/
if (!sig_none)
cur_setting->it_value.tv_nsec = 1;
} else {
cur_setting->it_value = ktime_to_timespec64(remaining);
}
} | 177 | True | 1 |
|
CVE-2018-12896 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/torvalds/linux/commit/78c9c4dfbf8c04883941445a195276bb4bb92c76', 'name': 'https://github.com/torvalds/linux/commit/78c9c4dfbf8c04883941445a195276bb4bb92c76', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/lcytxw/bug_repro/tree/master/bug_200189', 'name': 'https://github.com/lcytxw/bug_repro/tree/master/bug_200189', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=200189', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=200189', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3849-2/', 'name': 'USN-3849-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3848-2/', 'name': 'USN-3848-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3848-1/', 'name': 'USN-3848-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-3/', 'name': 'USN-3847-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-2/', 'name': 'USN-3847-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-1/', 'name': 'USN-3847-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3849-1/', 'name': 'USN-3849-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00017.html', 'name': '[debian-lts-announce] 20190315 [SECURITY] [DLA 1715-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00034.html', 'name': '[debian-lts-announce] 20190327 [SECURITY] [DLA 1731-1] linux security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/04/msg00004.html', 'name': '[debian-lts-announce] 20190401 [SECURITY] [DLA 1731-2] linux regression update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.17.3', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel through 4.17.3. An Integer Overflow in kernel/time/posix-timers.c in the POSIX timer code is caused by the way the overrun accounting works. Depending on interval and expiry time values, the overrun can be larger than INT_MAX, but the accounting is int based. This basically makes the accounting values, which are visible to user space via timer_getoverrun(2) and siginfo::si_overrun, random. For example, a local user can cause a denial of service (signed integer overflow) via crafted mmap, futex, timer_create, and timer_settime system calls.'}] | 2019-04-03T12:04Z | 2018-07-02T17:29Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Thomas Gleixner | 2018-06-26 15:21:32+02:00 | 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] | 78c9c4dfbf8c04883941445a195276bb4bb92c76 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | do_timer_create | do_timer_create( clockid_t which_clock , struct sigevent * event , timer_t __user * created_timer_id) | ['which_clock', 'event', 'created_timer_id'] | static int do_timer_create(clockid_t which_clock, struct sigevent *event,
timer_t __user *created_timer_id)
{
const struct k_clock *kc = clockid_to_kclock(which_clock);
struct k_itimer *new_timer;
int error, new_timer_id;
int it_id_set = IT_ID_NOT_SET;
if (!kc)
return -EINVAL;
if (!kc->timer_create)
return -EOPNOTSUPP;
new_timer = alloc_posix_timer();
if (unlikely(!new_timer))
return -EAGAIN;
spin_lock_init(&new_timer->it_lock);
new_timer_id = posix_timer_add(new_timer);
if (new_timer_id < 0) {
error = new_timer_id;
goto out;
}
it_id_set = IT_ID_SET;
new_timer->it_id = (timer_t) new_timer_id;
new_timer->it_clock = which_clock;
new_timer->kclock = kc;
new_timer->it_overrun = -1;
if (event) {
rcu_read_lock();
new_timer->it_pid = get_pid(good_sigevent(event));
rcu_read_unlock();
if (!new_timer->it_pid) {
error = -EINVAL;
goto out;
}
new_timer->it_sigev_notify = event->sigev_notify;
new_timer->sigq->info.si_signo = event->sigev_signo;
new_timer->sigq->info.si_value = event->sigev_value;
} else {
new_timer->it_sigev_notify = SIGEV_SIGNAL;
new_timer->sigq->info.si_signo = SIGALRM;
memset(&new_timer->sigq->info.si_value, 0, sizeof(sigval_t));
new_timer->sigq->info.si_value.sival_int = new_timer->it_id;
new_timer->it_pid = get_pid(task_tgid(current));
}
new_timer->sigq->info.si_tid = new_timer->it_id;
new_timer->sigq->info.si_code = SI_TIMER;
if (copy_to_user(created_timer_id,
&new_timer_id, sizeof (new_timer_id))) {
error = -EFAULT;
goto out;
}
error = kc->timer_create(new_timer);
if (error)
goto out;
spin_lock_irq(¤t->sighand->siglock);
new_timer->it_signal = current->signal;
list_add(&new_timer->list, ¤t->signal->posix_timers);
spin_unlock_irq(¤t->sighand->siglock);
return 0;
/*
* In the case of the timer belonging to another task, after
* the task is unlocked, the timer is owned by the other task
* and may cease to exist at any time. Don't use or modify
* new_timer after the unlock call.
*/
out:
release_posix_timer(new_timer, it_id_set);
return error;
} | 403 | True | 1 |
|
CVE-2018-12896 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/torvalds/linux/commit/78c9c4dfbf8c04883941445a195276bb4bb92c76', 'name': 'https://github.com/torvalds/linux/commit/78c9c4dfbf8c04883941445a195276bb4bb92c76', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/lcytxw/bug_repro/tree/master/bug_200189', 'name': 'https://github.com/lcytxw/bug_repro/tree/master/bug_200189', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=200189', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=200189', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3849-2/', 'name': 'USN-3849-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3848-2/', 'name': 'USN-3848-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3848-1/', 'name': 'USN-3848-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-3/', 'name': 'USN-3847-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-2/', 'name': 'USN-3847-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-1/', 'name': 'USN-3847-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3849-1/', 'name': 'USN-3849-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00017.html', 'name': '[debian-lts-announce] 20190315 [SECURITY] [DLA 1715-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00034.html', 'name': '[debian-lts-announce] 20190327 [SECURITY] [DLA 1731-1] linux security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/04/msg00004.html', 'name': '[debian-lts-announce] 20190401 [SECURITY] [DLA 1731-2] linux regression update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.17.3', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel through 4.17.3. An Integer Overflow in kernel/time/posix-timers.c in the POSIX timer code is caused by the way the overrun accounting works. Depending on interval and expiry time values, the overrun can be larger than INT_MAX, but the accounting is int based. This basically makes the accounting values, which are visible to user space via timer_getoverrun(2) and siginfo::si_overrun, random. For example, a local user can cause a denial of service (signed integer overflow) via crafted mmap, futex, timer_create, and timer_settime system calls.'}] | 2019-04-03T12:04Z | 2018-07-02T17:29Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Thomas Gleixner | 2018-06-26 15:21:32+02:00 | 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] | 78c9c4dfbf8c04883941445a195276bb4bb92c76 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | posix_timer_fn | posix_timer_fn( struct hrtimer * timer) | ['timer'] | static enum hrtimer_restart posix_timer_fn(struct hrtimer *timer)
{
struct k_itimer *timr;
unsigned long flags;
int si_private = 0;
enum hrtimer_restart ret = HRTIMER_NORESTART;
timr = container_of(timer, struct k_itimer, it.real.timer);
spin_lock_irqsave(&timr->it_lock, flags);
timr->it_active = 0;
if (timr->it_interval != 0)
si_private = ++timr->it_requeue_pending;
if (posix_timer_event(timr, si_private)) {
/*
* signal was not sent because of sig_ignor
* we will not get a call back to restart it AND
* it should be restarted.
*/
if (timr->it_interval != 0) {
ktime_t now = hrtimer_cb_get_time(timer);
/*
* FIXME: What we really want, is to stop this
* timer completely and restart it in case the
* SIG_IGN is removed. This is a non trivial
* change which involves sighand locking
* (sigh !), which we don't want to do late in
* the release cycle.
*
* For now we just let timers with an interval
* less than a jiffie expire every jiffie to
* avoid softirq starvation in case of SIG_IGN
* and a very small interval, which would put
* the timer right back on the softirq pending
* list. By moving now ahead of time we trick
* hrtimer_forward() to expire the timer
* later, while we still maintain the overrun
* accuracy, but have some inconsistency in
* the timer_gettime() case. This is at least
* better than a starved softirq. A more
* complex fix which solves also another related
* inconsistency is already in the pipeline.
*/
#ifdef CONFIG_HIGH_RES_TIMERS
{
ktime_t kj = NSEC_PER_SEC / HZ;
if (timr->it_interval < kj)
now = ktime_add(now, kj);
}
#endif
timr->it_overrun += (unsigned int)
hrtimer_forward(timer, now,
timr->it_interval);
ret = HRTIMER_RESTART;
++timr->it_requeue_pending;
timr->it_active = 1;
}
}
unlock_timer(timr, flags);
return ret;
} | 175 | True | 1 |
|
CVE-2018-12896 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/torvalds/linux/commit/78c9c4dfbf8c04883941445a195276bb4bb92c76', 'name': 'https://github.com/torvalds/linux/commit/78c9c4dfbf8c04883941445a195276bb4bb92c76', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/lcytxw/bug_repro/tree/master/bug_200189', 'name': 'https://github.com/lcytxw/bug_repro/tree/master/bug_200189', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=200189', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=200189', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3849-2/', 'name': 'USN-3849-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3848-2/', 'name': 'USN-3848-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3848-1/', 'name': 'USN-3848-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-3/', 'name': 'USN-3847-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-2/', 'name': 'USN-3847-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-1/', 'name': 'USN-3847-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3849-1/', 'name': 'USN-3849-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00017.html', 'name': '[debian-lts-announce] 20190315 [SECURITY] [DLA 1715-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00034.html', 'name': '[debian-lts-announce] 20190327 [SECURITY] [DLA 1731-1] linux security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/04/msg00004.html', 'name': '[debian-lts-announce] 20190401 [SECURITY] [DLA 1731-2] linux regression update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-190'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.17.3', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel through 4.17.3. An Integer Overflow in kernel/time/posix-timers.c in the POSIX timer code is caused by the way the overrun accounting works. Depending on interval and expiry time values, the overrun can be larger than INT_MAX, but the accounting is int based. This basically makes the accounting values, which are visible to user space via timer_getoverrun(2) and siginfo::si_overrun, random. For example, a local user can cause a denial of service (signed integer overflow) via crafted mmap, futex, timer_create, and timer_settime system calls.'}] | 2019-04-03T12:04Z | 2018-07-02T17:29Z | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | An integer overflow or wraparound occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may wrap to become a very small or negative number. While this may be intended behavior in circumstances that rely on wrapping, it can have security consequences if the wrap is unexpected. This is especially the case if the integer overflow can be triggered using user-supplied inputs. This becomes security-critical when the result is used to control looping, make a security decision, or determine the offset or size in behaviors such as memory allocation, copying, concatenation, etc.
| https://cwe.mitre.org/data/definitions/190.html | 0 | Thomas Gleixner | 2018-06-26 15:21:32+02:00 | 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] | 78c9c4dfbf8c04883941445a195276bb4bb92c76 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | posixtimer_rearm | posixtimer_rearm( struct siginfo * info) | ['info'] | void posixtimer_rearm(struct siginfo *info)
{
struct k_itimer *timr;
unsigned long flags;
timr = lock_timer(info->si_tid, &flags);
if (!timr)
return;
if (timr->it_requeue_pending == info->si_sys_private) {
timr->kclock->timer_rearm(timr);
timr->it_active = 1;
timr->it_overrun_last = timr->it_overrun;
timr->it_overrun = -1;
++timr->it_requeue_pending;
info->si_overrun += timr->it_overrun_last;
}
unlock_timer(timr, flags);
} | 99 | True | 1 |
|
CVE-2018-16276 | False | False | False | False | AV:L/AC:L/Au:N/C:C/I:C/A:C | LOCAL | LOW | NONE | COMPLETE | COMPLETE | COMPLETE | 7.2 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/f1e255d60ae66a9f672ff9a207ee6cd8e33d2679', 'name': 'https://github.com/torvalds/linux/commit/f1e255d60ae66a9f672ff9a207ee6cd8e33d2679', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.17.7', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.17.7', 'refsource': 'MISC', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f1e255d60ae66a9f672ff9a207ee6cd8e33d2679', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f1e255d60ae66a9f672ff9a207ee6cd8e33d2679', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4308', 'name': 'DSA-4308', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3776-2/', 'name': 'USN-3776-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3776-1/', 'name': 'USN-3776-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/10/msg00003.html', 'name': '[debian-lts-announce] 20181003 [SECURITY] [DLA 1531-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://bugzilla.suse.com/show_bug.cgi?id=1115593', 'name': 'https://bugzilla.suse.com/show_bug.cgi?id=1115593', 'refsource': 'MISC', 'tags': ['Issue Tracking']}, {'url': 'https://bugzilla.suse.com/show_bug.cgi?id=1106095', 'name': 'https://bugzilla.suse.com/show_bug.cgi?id=1106095', 'refsource': 'MISC', 'tags': ['Issue Tracking']}, {'url': 'https://usn.ubuntu.com/3849-2/', 'name': 'USN-3849-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-3/', 'name': 'USN-3847-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-2/', 'name': 'USN-3847-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-1/', 'name': 'USN-3847-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3849-1/', 'name': 'USN-3849-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.17.7', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in yurex_read in drivers/usb/misc/yurex.c in the Linux kernel before 4.17.7. Local attackers could use user access read/writes with incorrect bounds checking in the yurex USB driver to crash the kernel or potentially escalate privileges.'}] | 2019-03-08T17:06Z | 2018-08-31T16:29Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Jann Horn | 2018-07-06 17:12:56+02:00 | USB: yurex: fix out-of-bounds uaccess in read handler
In general, accessing userspace memory beyond the length of the supplied
buffer in VFS read/write handlers can lead to both kernel memory corruption
(via kernel_read()/kernel_write(), which can e.g. be triggered via
sys_splice()) and privilege escalation inside userspace.
Fix it by using simple_read_from_buffer() instead of custom logic.
Fixes: 6bc235a2e24a ("USB: add driver for Meywa-Denki & Kayac YUREX")
Signed-off-by: Jann Horn <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]> | f1e255d60ae66a9f672ff9a207ee6cd8e33d2679 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | yurex_read | yurex_read( struct file * file , char __user * buffer , size_t count , loff_t * ppos) | ['file', 'buffer', 'count', 'ppos'] | static ssize_t yurex_read(struct file *file, char __user *buffer, size_t count,
loff_t *ppos)
{
struct usb_yurex *dev;
int retval = 0;
int bytes_read = 0;
char in_buffer[20];
unsigned long flags;
dev = file->private_data;
mutex_lock(&dev->io_mutex);
if (!dev->interface) { /* already disconnected */
retval = -ENODEV;
goto exit;
}
spin_lock_irqsave(&dev->lock, flags);
bytes_read = snprintf(in_buffer, 20, "%lld\n", dev->bbu);
spin_unlock_irqrestore(&dev->lock, flags);
if (*ppos < bytes_read) {
if (copy_to_user(buffer, in_buffer + *ppos, bytes_read - *ppos))
retval = -EFAULT;
else {
retval = bytes_read - *ppos;
*ppos += bytes_read;
}
}
exit:
mutex_unlock(&dev->io_mutex);
return retval;
} | 171 | True | 1 |
|
CVE-2018-15572 | False | False | False | False | AV:L/AC:L/Au:N/C:P/I:N/A:N | LOCAL | LOW | NONE | PARTIAL | NONE | NONE | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | LOCAL | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.5 | MEDIUM | 2.0 | 4.0 | nan | [{'url': 'https://github.com/torvalds/linux/commit/fdf82a7856b32d905c39afc85e34364491e46346', 'name': 'https://github.com/torvalds/linux/commit/fdf82a7856b32d905c39afc85e34364491e46346', 'refsource': 'MISC', 'tags': ['Mitigation', 'Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.18.1', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.18.1', 'refsource': 'MISC', 'tags': ['Mitigation', 'Patch', 'Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=fdf82a7856b32d905c39afc85e34364491e46346', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=fdf82a7856b32d905c39afc85e34364491e46346', 'refsource': 'MISC', 'tags': ['Mitigation', 'Patch', 'Vendor Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4308', 'name': 'DSA-4308', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3777-2/', 'name': 'USN-3777-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3777-1/', 'name': 'USN-3777-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3776-2/', 'name': 'USN-3776-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3776-1/', 'name': 'USN-3776-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3775-2/', 'name': 'USN-3775-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3775-1/', 'name': 'USN-3775-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/10/msg00003.html', 'name': '[debian-lts-announce] 20181003 [SECURITY] [DLA 1531-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3777-3/', 'name': 'USN-3777-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-noinfo'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.18.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The spectre_v2_select_mitigation function in arch/x86/kernel/cpu/bugs.c in the Linux kernel before 4.18.1 does not always fill RSB upon a context switch, which makes it easier for attackers to conduct userspace-userspace spectreRSB attacks.'}] | 2019-10-03T00:03Z | 2018-08-20T02:29Z | Insufficient Information | There is insufficient information about the issue to classify it; details are unkown or unspecified. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Jiri Kosina | 2018-07-26 13:14:55+02:00 | x86/speculation: Protect against userspace-userspace spectreRSB
The article "Spectre Returns! Speculation Attacks using the Return Stack
Buffer" [1] describes two new (sub-)variants of spectrev2-like attacks,
making use solely of the RSB contents even on CPUs that don't fallback to
BTB on RSB underflow (Skylake+).
Mitigate userspace-userspace attacks by always unconditionally filling RSB on
context switch when the generic spectrev2 mitigation has been enabled.
[1] https://arxiv.org/pdf/1807.07940.pdf
Signed-off-by: Jiri Kosina <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Josh Poimboeuf <[email protected]>
Acked-by: Tim Chen <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected] | fdf82a7856b32d905c39afc85e34364491e46346 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | is_skylake_era | is_skylake_era( void) | ['void'] | static bool __init is_skylake_era(void)
{
if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL &&
boot_cpu_data.x86 == 6) {
switch (boot_cpu_data.x86_model) {
case INTEL_FAM6_SKYLAKE_MOBILE:
case INTEL_FAM6_SKYLAKE_DESKTOP:
case INTEL_FAM6_SKYLAKE_X:
case INTEL_FAM6_KABYLAKE_MOBILE:
case INTEL_FAM6_KABYLAKE_DESKTOP:
return true;
}
}
return false;
} | 51 | True | 1 |
|
CVE-2018-15572 | False | False | False | False | AV:L/AC:L/Au:N/C:P/I:N/A:N | LOCAL | LOW | NONE | PARTIAL | NONE | NONE | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N | LOCAL | LOW | LOW | NONE | CHANGED | HIGH | NONE | NONE | 6.5 | MEDIUM | 2.0 | 4.0 | nan | [{'url': 'https://github.com/torvalds/linux/commit/fdf82a7856b32d905c39afc85e34364491e46346', 'name': 'https://github.com/torvalds/linux/commit/fdf82a7856b32d905c39afc85e34364491e46346', 'refsource': 'MISC', 'tags': ['Mitigation', 'Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.18.1', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.18.1', 'refsource': 'MISC', 'tags': ['Mitigation', 'Patch', 'Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=fdf82a7856b32d905c39afc85e34364491e46346', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=fdf82a7856b32d905c39afc85e34364491e46346', 'refsource': 'MISC', 'tags': ['Mitigation', 'Patch', 'Vendor Advisory']}, {'url': 'https://www.debian.org/security/2018/dsa-4308', 'name': 'DSA-4308', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3777-2/', 'name': 'USN-3777-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3777-1/', 'name': 'USN-3777-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3776-2/', 'name': 'USN-3776-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3776-1/', 'name': 'USN-3776-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3775-2/', 'name': 'USN-3775-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3775-1/', 'name': 'USN-3775-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/10/msg00003.html', 'name': '[debian-lts-announce] 20181003 [SECURITY] [DLA 1531-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3777-3/', 'name': 'USN-3777-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-noinfo'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.18.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The spectre_v2_select_mitigation function in arch/x86/kernel/cpu/bugs.c in the Linux kernel before 4.18.1 does not always fill RSB upon a context switch, which makes it easier for attackers to conduct userspace-userspace spectreRSB attacks.'}] | 2019-10-03T00:03Z | 2018-08-20T02:29Z | Insufficient Information | There is insufficient information about the issue to classify it; details are unkown or unspecified. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Jiri Kosina | 2018-07-26 13:14:55+02:00 | x86/speculation: Protect against userspace-userspace spectreRSB
The article "Spectre Returns! Speculation Attacks using the Return Stack
Buffer" [1] describes two new (sub-)variants of spectrev2-like attacks,
making use solely of the RSB contents even on CPUs that don't fallback to
BTB on RSB underflow (Skylake+).
Mitigate userspace-userspace attacks by always unconditionally filling RSB on
context switch when the generic spectrev2 mitigation has been enabled.
[1] https://arxiv.org/pdf/1807.07940.pdf
Signed-off-by: Jiri Kosina <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Josh Poimboeuf <[email protected]>
Acked-by: Tim Chen <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected] | fdf82a7856b32d905c39afc85e34364491e46346 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | spectre_v2_select_mitigation | spectre_v2_select_mitigation( void) | ['void'] | static void __init spectre_v2_select_mitigation(void)
{
enum spectre_v2_mitigation_cmd cmd = spectre_v2_parse_cmdline();
enum spectre_v2_mitigation mode = SPECTRE_V2_NONE;
/*
* If the CPU is not affected and the command line mode is NONE or AUTO
* then nothing to do.
*/
if (!boot_cpu_has_bug(X86_BUG_SPECTRE_V2) &&
(cmd == SPECTRE_V2_CMD_NONE || cmd == SPECTRE_V2_CMD_AUTO))
return;
switch (cmd) {
case SPECTRE_V2_CMD_NONE:
return;
case SPECTRE_V2_CMD_FORCE:
case SPECTRE_V2_CMD_AUTO:
if (IS_ENABLED(CONFIG_RETPOLINE))
goto retpoline_auto;
break;
case SPECTRE_V2_CMD_RETPOLINE_AMD:
if (IS_ENABLED(CONFIG_RETPOLINE))
goto retpoline_amd;
break;
case SPECTRE_V2_CMD_RETPOLINE_GENERIC:
if (IS_ENABLED(CONFIG_RETPOLINE))
goto retpoline_generic;
break;
case SPECTRE_V2_CMD_RETPOLINE:
if (IS_ENABLED(CONFIG_RETPOLINE))
goto retpoline_auto;
break;
}
pr_err("Spectre mitigation: kernel not compiled with retpoline; no mitigation available!");
return;
retpoline_auto:
if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) {
retpoline_amd:
if (!boot_cpu_has(X86_FEATURE_LFENCE_RDTSC)) {
pr_err("Spectre mitigation: LFENCE not serializing, switching to generic retpoline\n");
goto retpoline_generic;
}
mode = retp_compiler() ? SPECTRE_V2_RETPOLINE_AMD :
SPECTRE_V2_RETPOLINE_MINIMAL_AMD;
setup_force_cpu_cap(X86_FEATURE_RETPOLINE_AMD);
setup_force_cpu_cap(X86_FEATURE_RETPOLINE);
} else {
retpoline_generic:
mode = retp_compiler() ? SPECTRE_V2_RETPOLINE_GENERIC :
SPECTRE_V2_RETPOLINE_MINIMAL;
setup_force_cpu_cap(X86_FEATURE_RETPOLINE);
}
spectre_v2_enabled = mode;
pr_info("%s\n", spectre_v2_strings[mode]);
/*
* If neither SMEP nor PTI are available, there is a risk of
* hitting userspace addresses in the RSB after a context switch
* from a shallow call stack to a deeper one. To prevent this fill
* the entire RSB, even when using IBRS.
*
* Skylake era CPUs have a separate issue with *underflow* of the
* RSB, when they will predict 'ret' targets from the generic BTB.
* The proper mitigation for this is IBRS. If IBRS is not supported
* or deactivated in favour of retpolines the RSB fill on context
* switch is required.
*/
if ((!boot_cpu_has(X86_FEATURE_PTI) &&
!boot_cpu_has(X86_FEATURE_SMEP)) || is_skylake_era()) {
setup_force_cpu_cap(X86_FEATURE_RSB_CTXSW);
pr_info("Spectre v2 mitigation: Filling RSB on context switch\n");
}
/* Initialize Indirect Branch Prediction Barrier if supported */
if (boot_cpu_has(X86_FEATURE_IBPB)) {
setup_force_cpu_cap(X86_FEATURE_USE_IBPB);
pr_info("Spectre v2 mitigation: Enabling Indirect Branch Prediction Barrier\n");
}
/*
* Retpoline means the kernel is safe because it has no indirect
* branches. But firmware isn't, so use IBRS to protect that.
*/
if (boot_cpu_has(X86_FEATURE_IBRS)) {
setup_force_cpu_cap(X86_FEATURE_USE_IBRS_FW);
pr_info("Enabling Restricted Speculation for firmware calls\n");
}
} | 277 | True | 1 |
|
CVE-2018-15594 | False | False | False | False | AV:L/AC:L/Au:N/C:P/I:N/A:N | LOCAL | LOW | NONE | PARTIAL | NONE | NONE | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N | LOCAL | LOW | LOW | NONE | UNCHANGED | HIGH | NONE | NONE | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://twitter.com/grsecurity/status/1029324426142199808', 'name': 'https://twitter.com/grsecurity/status/1029324426142199808', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/5800dc5c19f34e6e03b5adab1282535cb102fafd', 'name': 'https://github.com/torvalds/linux/commit/5800dc5c19f34e6e03b5adab1282535cb102fafd', 'refsource': 'MISC', 'tags': ['Mitigation', 'Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.18.1', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.18.1', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5800dc5c19f34e6e03b5adab1282535cb102fafd', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5800dc5c19f34e6e03b5adab1282535cb102fafd', 'refsource': 'MISC', 'tags': ['Mitigation', 'Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/105120', 'name': '105120', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securitytracker.com/id/1041601', 'name': '1041601', 'refsource': 'SECTRACK', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://www.debian.org/security/2018/dsa-4308', 'name': 'DSA-4308', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3777-2/', 'name': 'USN-3777-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3777-1/', 'name': 'USN-3777-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3776-2/', 'name': 'USN-3776-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3776-1/', 'name': 'USN-3776-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3775-2/', 'name': 'USN-3775-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3775-1/', 'name': 'USN-3775-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/10/msg00003.html', 'name': '[debian-lts-announce] 20181003 [SECURITY] [DLA 1531-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3777-3/', 'name': 'USN-3777-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-05/msg00043.html', 'name': 'openSUSE-SU-2019:1407', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2043', 'name': 'RHSA-2019:2043', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2029', 'name': 'RHSA-2019:2029', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-200'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.18.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'arch/x86/kernel/paravirt.c in the Linux kernel before 4.18.1 mishandles certain indirect calls, which makes it easier for attackers to conduct Spectre-v2 attacks against paravirtual guests.'}] | 2019-10-03T00:03Z | 2018-08-20T08:29Z | Exposure of Sensitive Information to an Unauthorized Actor | The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. |
There are many different kinds of mistakes that introduce information exposures. The severity of the error can range widely, depending on the context in which the product operates, the type of sensitive information that is revealed, and the benefits it may provide to an attacker. Some kinds of sensitive information include:
private, personal information, such as personal messages, financial data, health records, geographic location, or contact details
system status and environment, such as the operating system and installed packages
business secrets and intellectual property
network status and configuration
the product's own code or internal state
metadata, e.g. logging of connections or message headers
indirect information, such as a discrepancy between two internal operations that can be observed by an outsider
Information might be sensitive to different parties, each of which may have their own expectations for whether the information should be protected. These parties include:
the product's own users
people or organizations whose information is created or used by the product, even if they are not direct product users
the product's administrators, including the admins of the system(s) and/or networks on which the product operates
the developer
Information exposures can occur in different ways:
the code explicitly inserts sensitive information into resources or messages that are intentionally made accessible to unauthorized actors, but should not contain the information - i.e., the information should have been "scrubbed" or "sanitized"
a different weakness or mistake indirectly inserts the sensitive information into resources, such as a web script error revealing the full system path of the program.
the code manages resources that intentionally contain sensitive information, but the resources are unintentionally made accessible to unauthorized actors. In this case, the information exposure is resultant - i.e., a different weakness enabled the access to the information in the first place.
It is common practice to describe any loss of confidentiality as an "information exposure," but this can lead to overuse of CWE-200 in CWE mapping. From the CWE perspective, loss of confidentiality is a technical impact that can arise from dozens of different weaknesses, such as insecure file permissions or out-of-bounds read. CWE-200 and its lower-level descendants are intended to cover the mistakes that occur in behaviors that explicitly manage, store, transfer, or cleanse sensitive information.
| https://cwe.mitre.org/data/definitions/200.html | 0 | Peter Zijlstra | 2018-08-03 16:41:39+02:00 | x86/paravirt: Fix spectre-v2 mitigations for paravirt guests
Nadav reported that on guests we're failing to rewrite the indirect
calls to CALLEE_SAVE paravirt functions. In particular the
pv_queued_spin_unlock() call is left unpatched and that is all over the
place. This obviously wrecks Spectre-v2 mitigation (for paravirt
guests) which relies on not actually having indirect calls around.
The reason is an incorrect clobber test in paravirt_patch_call(); this
function rewrites an indirect call with a direct call to the _SAME_
function, there is no possible way the clobbers can be different
because of this.
Therefore remove this clobber check. Also put WARNs on the other patch
failure case (not enough room for the instruction) which I've not seen
trigger in my (limited) testing.
Three live kernel image disassemblies for lock_sock_nested (as a small
function that illustrates the problem nicely). PRE is the current
situation for guests, POST is with this patch applied and NATIVE is with
or without the patch for !guests.
PRE:
(gdb) disassemble lock_sock_nested
Dump of assembler code for function lock_sock_nested:
0xffffffff817be970 <+0>: push %rbp
0xffffffff817be971 <+1>: mov %rdi,%rbp
0xffffffff817be974 <+4>: push %rbx
0xffffffff817be975 <+5>: lea 0x88(%rbp),%rbx
0xffffffff817be97c <+12>: callq 0xffffffff819f7160 <_cond_resched>
0xffffffff817be981 <+17>: mov %rbx,%rdi
0xffffffff817be984 <+20>: callq 0xffffffff819fbb00 <_raw_spin_lock_bh>
0xffffffff817be989 <+25>: mov 0x8c(%rbp),%eax
0xffffffff817be98f <+31>: test %eax,%eax
0xffffffff817be991 <+33>: jne 0xffffffff817be9ba <lock_sock_nested+74>
0xffffffff817be993 <+35>: movl $0x1,0x8c(%rbp)
0xffffffff817be99d <+45>: mov %rbx,%rdi
0xffffffff817be9a0 <+48>: callq *0xffffffff822299e8
0xffffffff817be9a7 <+55>: pop %rbx
0xffffffff817be9a8 <+56>: pop %rbp
0xffffffff817be9a9 <+57>: mov $0x200,%esi
0xffffffff817be9ae <+62>: mov $0xffffffff817be993,%rdi
0xffffffff817be9b5 <+69>: jmpq 0xffffffff81063ae0 <__local_bh_enable_ip>
0xffffffff817be9ba <+74>: mov %rbp,%rdi
0xffffffff817be9bd <+77>: callq 0xffffffff817be8c0 <__lock_sock>
0xffffffff817be9c2 <+82>: jmp 0xffffffff817be993 <lock_sock_nested+35>
End of assembler dump.
POST:
(gdb) disassemble lock_sock_nested
Dump of assembler code for function lock_sock_nested:
0xffffffff817be970 <+0>: push %rbp
0xffffffff817be971 <+1>: mov %rdi,%rbp
0xffffffff817be974 <+4>: push %rbx
0xffffffff817be975 <+5>: lea 0x88(%rbp),%rbx
0xffffffff817be97c <+12>: callq 0xffffffff819f7160 <_cond_resched>
0xffffffff817be981 <+17>: mov %rbx,%rdi
0xffffffff817be984 <+20>: callq 0xffffffff819fbb00 <_raw_spin_lock_bh>
0xffffffff817be989 <+25>: mov 0x8c(%rbp),%eax
0xffffffff817be98f <+31>: test %eax,%eax
0xffffffff817be991 <+33>: jne 0xffffffff817be9ba <lock_sock_nested+74>
0xffffffff817be993 <+35>: movl $0x1,0x8c(%rbp)
0xffffffff817be99d <+45>: mov %rbx,%rdi
0xffffffff817be9a0 <+48>: callq 0xffffffff810a0c20 <__raw_callee_save___pv_queued_spin_unlock>
0xffffffff817be9a5 <+53>: xchg %ax,%ax
0xffffffff817be9a7 <+55>: pop %rbx
0xffffffff817be9a8 <+56>: pop %rbp
0xffffffff817be9a9 <+57>: mov $0x200,%esi
0xffffffff817be9ae <+62>: mov $0xffffffff817be993,%rdi
0xffffffff817be9b5 <+69>: jmpq 0xffffffff81063aa0 <__local_bh_enable_ip>
0xffffffff817be9ba <+74>: mov %rbp,%rdi
0xffffffff817be9bd <+77>: callq 0xffffffff817be8c0 <__lock_sock>
0xffffffff817be9c2 <+82>: jmp 0xffffffff817be993 <lock_sock_nested+35>
End of assembler dump.
NATIVE:
(gdb) disassemble lock_sock_nested
Dump of assembler code for function lock_sock_nested:
0xffffffff817be970 <+0>: push %rbp
0xffffffff817be971 <+1>: mov %rdi,%rbp
0xffffffff817be974 <+4>: push %rbx
0xffffffff817be975 <+5>: lea 0x88(%rbp),%rbx
0xffffffff817be97c <+12>: callq 0xffffffff819f7160 <_cond_resched>
0xffffffff817be981 <+17>: mov %rbx,%rdi
0xffffffff817be984 <+20>: callq 0xffffffff819fbb00 <_raw_spin_lock_bh>
0xffffffff817be989 <+25>: mov 0x8c(%rbp),%eax
0xffffffff817be98f <+31>: test %eax,%eax
0xffffffff817be991 <+33>: jne 0xffffffff817be9ba <lock_sock_nested+74>
0xffffffff817be993 <+35>: movl $0x1,0x8c(%rbp)
0xffffffff817be99d <+45>: mov %rbx,%rdi
0xffffffff817be9a0 <+48>: movb $0x0,(%rdi)
0xffffffff817be9a3 <+51>: nopl 0x0(%rax)
0xffffffff817be9a7 <+55>: pop %rbx
0xffffffff817be9a8 <+56>: pop %rbp
0xffffffff817be9a9 <+57>: mov $0x200,%esi
0xffffffff817be9ae <+62>: mov $0xffffffff817be993,%rdi
0xffffffff817be9b5 <+69>: jmpq 0xffffffff81063ae0 <__local_bh_enable_ip>
0xffffffff817be9ba <+74>: mov %rbp,%rdi
0xffffffff817be9bd <+77>: callq 0xffffffff817be8c0 <__lock_sock>
0xffffffff817be9c2 <+82>: jmp 0xffffffff817be993 <lock_sock_nested+35>
End of assembler dump.
Fixes: 63f70270ccd9 ("[PATCH] i386: PARAVIRT: add common patching machinery")
Fixes: 3010a0663fd9 ("x86/paravirt, objtool: Annotate indirect calls")
Reported-by: Nadav Amit <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Juergen Gross <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Boris Ostrovsky <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: [email protected] | 5800dc5c19f34e6e03b5adab1282535cb102fafd | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | paravirt_patch_call | paravirt_patch_call( void * insnbuf , const void * target , u16 tgt_clobbers , unsigned long addr , u16 site_clobbers , unsigned len) | ['insnbuf', 'target', 'tgt_clobbers', 'addr', 'site_clobbers', 'len'] | unsigned paravirt_patch_call(void *insnbuf,
const void *target, u16 tgt_clobbers,
unsigned long addr, u16 site_clobbers,
unsigned len)
{
struct branch *b = insnbuf;
unsigned long delta = (unsigned long)target - (addr+5);
if (tgt_clobbers & ~site_clobbers)
return len; /* target would clobber too much for this site */
if (len < 5)
return len; /* call too long for patch site */
b->opcode = 0xe8; /* call */
b->delta = delta;
BUILD_BUG_ON(sizeof(*b) != 5);
return 5;
} | 93 | True | 1 |
|
CVE-2018-15594 | False | False | False | False | AV:L/AC:L/Au:N/C:P/I:N/A:N | LOCAL | LOW | NONE | PARTIAL | NONE | NONE | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N | LOCAL | LOW | LOW | NONE | UNCHANGED | HIGH | NONE | NONE | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'https://twitter.com/grsecurity/status/1029324426142199808', 'name': 'https://twitter.com/grsecurity/status/1029324426142199808', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/5800dc5c19f34e6e03b5adab1282535cb102fafd', 'name': 'https://github.com/torvalds/linux/commit/5800dc5c19f34e6e03b5adab1282535cb102fafd', 'refsource': 'MISC', 'tags': ['Mitigation', 'Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.18.1', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.18.1', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5800dc5c19f34e6e03b5adab1282535cb102fafd', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5800dc5c19f34e6e03b5adab1282535cb102fafd', 'refsource': 'MISC', 'tags': ['Mitigation', 'Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/105120', 'name': '105120', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securitytracker.com/id/1041601', 'name': '1041601', 'refsource': 'SECTRACK', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://www.debian.org/security/2018/dsa-4308', 'name': 'DSA-4308', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3777-2/', 'name': 'USN-3777-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3777-1/', 'name': 'USN-3777-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3776-2/', 'name': 'USN-3776-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3776-1/', 'name': 'USN-3776-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3775-2/', 'name': 'USN-3775-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3775-1/', 'name': 'USN-3775-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/10/msg00003.html', 'name': '[debian-lts-announce] 20181003 [SECURITY] [DLA 1531-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3777-3/', 'name': 'USN-3777-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-05/msg00043.html', 'name': 'openSUSE-SU-2019:1407', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2043', 'name': 'RHSA-2019:2043', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2029', 'name': 'RHSA-2019:2029', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-200'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.18.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'arch/x86/kernel/paravirt.c in the Linux kernel before 4.18.1 mishandles certain indirect calls, which makes it easier for attackers to conduct Spectre-v2 attacks against paravirtual guests.'}] | 2019-10-03T00:03Z | 2018-08-20T08:29Z | Exposure of Sensitive Information to an Unauthorized Actor | The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. |
There are many different kinds of mistakes that introduce information exposures. The severity of the error can range widely, depending on the context in which the product operates, the type of sensitive information that is revealed, and the benefits it may provide to an attacker. Some kinds of sensitive information include:
private, personal information, such as personal messages, financial data, health records, geographic location, or contact details
system status and environment, such as the operating system and installed packages
business secrets and intellectual property
network status and configuration
the product's own code or internal state
metadata, e.g. logging of connections or message headers
indirect information, such as a discrepancy between two internal operations that can be observed by an outsider
Information might be sensitive to different parties, each of which may have their own expectations for whether the information should be protected. These parties include:
the product's own users
people or organizations whose information is created or used by the product, even if they are not direct product users
the product's administrators, including the admins of the system(s) and/or networks on which the product operates
the developer
Information exposures can occur in different ways:
the code explicitly inserts sensitive information into resources or messages that are intentionally made accessible to unauthorized actors, but should not contain the information - i.e., the information should have been "scrubbed" or "sanitized"
a different weakness or mistake indirectly inserts the sensitive information into resources, such as a web script error revealing the full system path of the program.
the code manages resources that intentionally contain sensitive information, but the resources are unintentionally made accessible to unauthorized actors. In this case, the information exposure is resultant - i.e., a different weakness enabled the access to the information in the first place.
It is common practice to describe any loss of confidentiality as an "information exposure," but this can lead to overuse of CWE-200 in CWE mapping. From the CWE perspective, loss of confidentiality is a technical impact that can arise from dozens of different weaknesses, such as insecure file permissions or out-of-bounds read. CWE-200 and its lower-level descendants are intended to cover the mistakes that occur in behaviors that explicitly manage, store, transfer, or cleanse sensitive information.
| https://cwe.mitre.org/data/definitions/200.html | 0 | Peter Zijlstra | 2018-08-03 16:41:39+02:00 | x86/paravirt: Fix spectre-v2 mitigations for paravirt guests
Nadav reported that on guests we're failing to rewrite the indirect
calls to CALLEE_SAVE paravirt functions. In particular the
pv_queued_spin_unlock() call is left unpatched and that is all over the
place. This obviously wrecks Spectre-v2 mitigation (for paravirt
guests) which relies on not actually having indirect calls around.
The reason is an incorrect clobber test in paravirt_patch_call(); this
function rewrites an indirect call with a direct call to the _SAME_
function, there is no possible way the clobbers can be different
because of this.
Therefore remove this clobber check. Also put WARNs on the other patch
failure case (not enough room for the instruction) which I've not seen
trigger in my (limited) testing.
Three live kernel image disassemblies for lock_sock_nested (as a small
function that illustrates the problem nicely). PRE is the current
situation for guests, POST is with this patch applied and NATIVE is with
or without the patch for !guests.
PRE:
(gdb) disassemble lock_sock_nested
Dump of assembler code for function lock_sock_nested:
0xffffffff817be970 <+0>: push %rbp
0xffffffff817be971 <+1>: mov %rdi,%rbp
0xffffffff817be974 <+4>: push %rbx
0xffffffff817be975 <+5>: lea 0x88(%rbp),%rbx
0xffffffff817be97c <+12>: callq 0xffffffff819f7160 <_cond_resched>
0xffffffff817be981 <+17>: mov %rbx,%rdi
0xffffffff817be984 <+20>: callq 0xffffffff819fbb00 <_raw_spin_lock_bh>
0xffffffff817be989 <+25>: mov 0x8c(%rbp),%eax
0xffffffff817be98f <+31>: test %eax,%eax
0xffffffff817be991 <+33>: jne 0xffffffff817be9ba <lock_sock_nested+74>
0xffffffff817be993 <+35>: movl $0x1,0x8c(%rbp)
0xffffffff817be99d <+45>: mov %rbx,%rdi
0xffffffff817be9a0 <+48>: callq *0xffffffff822299e8
0xffffffff817be9a7 <+55>: pop %rbx
0xffffffff817be9a8 <+56>: pop %rbp
0xffffffff817be9a9 <+57>: mov $0x200,%esi
0xffffffff817be9ae <+62>: mov $0xffffffff817be993,%rdi
0xffffffff817be9b5 <+69>: jmpq 0xffffffff81063ae0 <__local_bh_enable_ip>
0xffffffff817be9ba <+74>: mov %rbp,%rdi
0xffffffff817be9bd <+77>: callq 0xffffffff817be8c0 <__lock_sock>
0xffffffff817be9c2 <+82>: jmp 0xffffffff817be993 <lock_sock_nested+35>
End of assembler dump.
POST:
(gdb) disassemble lock_sock_nested
Dump of assembler code for function lock_sock_nested:
0xffffffff817be970 <+0>: push %rbp
0xffffffff817be971 <+1>: mov %rdi,%rbp
0xffffffff817be974 <+4>: push %rbx
0xffffffff817be975 <+5>: lea 0x88(%rbp),%rbx
0xffffffff817be97c <+12>: callq 0xffffffff819f7160 <_cond_resched>
0xffffffff817be981 <+17>: mov %rbx,%rdi
0xffffffff817be984 <+20>: callq 0xffffffff819fbb00 <_raw_spin_lock_bh>
0xffffffff817be989 <+25>: mov 0x8c(%rbp),%eax
0xffffffff817be98f <+31>: test %eax,%eax
0xffffffff817be991 <+33>: jne 0xffffffff817be9ba <lock_sock_nested+74>
0xffffffff817be993 <+35>: movl $0x1,0x8c(%rbp)
0xffffffff817be99d <+45>: mov %rbx,%rdi
0xffffffff817be9a0 <+48>: callq 0xffffffff810a0c20 <__raw_callee_save___pv_queued_spin_unlock>
0xffffffff817be9a5 <+53>: xchg %ax,%ax
0xffffffff817be9a7 <+55>: pop %rbx
0xffffffff817be9a8 <+56>: pop %rbp
0xffffffff817be9a9 <+57>: mov $0x200,%esi
0xffffffff817be9ae <+62>: mov $0xffffffff817be993,%rdi
0xffffffff817be9b5 <+69>: jmpq 0xffffffff81063aa0 <__local_bh_enable_ip>
0xffffffff817be9ba <+74>: mov %rbp,%rdi
0xffffffff817be9bd <+77>: callq 0xffffffff817be8c0 <__lock_sock>
0xffffffff817be9c2 <+82>: jmp 0xffffffff817be993 <lock_sock_nested+35>
End of assembler dump.
NATIVE:
(gdb) disassemble lock_sock_nested
Dump of assembler code for function lock_sock_nested:
0xffffffff817be970 <+0>: push %rbp
0xffffffff817be971 <+1>: mov %rdi,%rbp
0xffffffff817be974 <+4>: push %rbx
0xffffffff817be975 <+5>: lea 0x88(%rbp),%rbx
0xffffffff817be97c <+12>: callq 0xffffffff819f7160 <_cond_resched>
0xffffffff817be981 <+17>: mov %rbx,%rdi
0xffffffff817be984 <+20>: callq 0xffffffff819fbb00 <_raw_spin_lock_bh>
0xffffffff817be989 <+25>: mov 0x8c(%rbp),%eax
0xffffffff817be98f <+31>: test %eax,%eax
0xffffffff817be991 <+33>: jne 0xffffffff817be9ba <lock_sock_nested+74>
0xffffffff817be993 <+35>: movl $0x1,0x8c(%rbp)
0xffffffff817be99d <+45>: mov %rbx,%rdi
0xffffffff817be9a0 <+48>: movb $0x0,(%rdi)
0xffffffff817be9a3 <+51>: nopl 0x0(%rax)
0xffffffff817be9a7 <+55>: pop %rbx
0xffffffff817be9a8 <+56>: pop %rbp
0xffffffff817be9a9 <+57>: mov $0x200,%esi
0xffffffff817be9ae <+62>: mov $0xffffffff817be993,%rdi
0xffffffff817be9b5 <+69>: jmpq 0xffffffff81063ae0 <__local_bh_enable_ip>
0xffffffff817be9ba <+74>: mov %rbp,%rdi
0xffffffff817be9bd <+77>: callq 0xffffffff817be8c0 <__lock_sock>
0xffffffff817be9c2 <+82>: jmp 0xffffffff817be993 <lock_sock_nested+35>
End of assembler dump.
Fixes: 63f70270ccd9 ("[PATCH] i386: PARAVIRT: add common patching machinery")
Fixes: 3010a0663fd9 ("x86/paravirt, objtool: Annotate indirect calls")
Reported-by: Nadav Amit <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Juergen Gross <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Boris Ostrovsky <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: [email protected] | 5800dc5c19f34e6e03b5adab1282535cb102fafd | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | paravirt_patch_jmp | paravirt_patch_jmp( void * insnbuf , const void * target , unsigned long addr , unsigned len) | ['insnbuf', 'target', 'addr', 'len'] | unsigned paravirt_patch_jmp(void *insnbuf, const void *target,
unsigned long addr, unsigned len)
{
struct branch *b = insnbuf;
unsigned long delta = (unsigned long)target - (addr+5);
if (len < 5)
return len; /* call too long for patch site */
b->opcode = 0xe9; /* jmp */
b->delta = delta;
return 5;
} | 67 | True | 1 |
|
CVE-2018-20855 | False | False | False | False | AV:L/AC:L/Au:N/C:P/I:N/A:N | LOCAL | LOW | NONE | PARTIAL | NONE | NONE | 2.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N | LOCAL | LOW | LOW | NONE | UNCHANGED | LOW | NONE | NONE | 3.3 | LOW | 1.8 | 1.4 | False | [{'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=0625b4ba1a5d4703c7fb01c497bd6c156908af00', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=0625b4ba1a5d4703c7fb01c497bd6c156908af00', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/0625b4ba1a5d4703c7fb01c497bd6c156908af00', 'name': 'https://github.com/torvalds/linux/commit/0625b4ba1a5d4703c7fb01c497bd6c156908af00', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.18.7', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.18.7', 'refsource': 'MISC', 'tags': ['Mailing List', 'Release Notes', 'Vendor Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-08/msg00056.html', 'name': 'openSUSE-SU-2019:1923', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-08/msg00055.html', 'name': 'openSUSE-SU-2019:1924', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20190905-0002/', 'name': 'https://security.netapp.com/advisory/ntap-20190905-0002/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.18.7', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:15.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:15.1:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:element_software:-:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:active_iq_performance_analytics_services:-:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:active_iq_unified_manager:*:*:*:*:*:vmware_vsphere:*:*', 'versionStartIncluding': '9.5', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:data_availability_services:-:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel before 4.18.7. In create_qp_common in drivers/infiniband/hw/mlx5/qp.c, mlx5_ib_create_qp_resp was never initialized, resulting in a leak of stack memory to userspace.'}] | 2019-11-20T15:31Z | 2019-07-26T05:15Z | Improper Restriction of Operations within the Bounds of a Memory Buffer | The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. |
Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data.
As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.
| https://cwe.mitre.org/data/definitions/119.html | 0 | Jason Gunthorpe | 2018-08-14 15:33:52-06:00 | IB/mlx5: Fix leaking stack memory to userspace
mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes
were written.
Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp")
Cc: <[email protected]>
Acked-by: Leon Romanovsky <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]> | 0625b4ba1a5d4703c7fb01c497bd6c156908af00 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | create_qp_common | create_qp_common( struct mlx5_ib_dev * dev , struct ib_pd * pd , struct ib_qp_init_attr * init_attr , struct ib_udata * udata , struct mlx5_ib_qp * qp) | ['dev', 'pd', 'init_attr', 'udata', 'qp'] | static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,
struct ib_qp_init_attr *init_attr,
struct ib_udata *udata, struct mlx5_ib_qp *qp)
{
struct mlx5_ib_resources *devr = &dev->devr;
int inlen = MLX5_ST_SZ_BYTES(create_qp_in);
struct mlx5_core_dev *mdev = dev->mdev;
struct mlx5_ib_create_qp_resp resp;
struct mlx5_ib_cq *send_cq;
struct mlx5_ib_cq *recv_cq;
unsigned long flags;
u32 uidx = MLX5_IB_DEFAULT_UIDX;
struct mlx5_ib_create_qp ucmd;
struct mlx5_ib_qp_base *base;
int mlx5_st;
void *qpc;
u32 *in;
int err;
mutex_init(&qp->mutex);
spin_lock_init(&qp->sq.lock);
spin_lock_init(&qp->rq.lock);
mlx5_st = to_mlx5_st(init_attr->qp_type);
if (mlx5_st < 0)
return -EINVAL;
if (init_attr->rwq_ind_tbl) {
if (!udata)
return -ENOSYS;
err = create_rss_raw_qp_tir(dev, qp, pd, init_attr, udata);
return err;
}
if (init_attr->create_flags & IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK) {
if (!MLX5_CAP_GEN(mdev, block_lb_mc)) {
mlx5_ib_dbg(dev, "block multicast loopback isn't supported\n");
return -EINVAL;
} else {
qp->flags |= MLX5_IB_QP_BLOCK_MULTICAST_LOOPBACK;
}
}
if (init_attr->create_flags &
(IB_QP_CREATE_CROSS_CHANNEL |
IB_QP_CREATE_MANAGED_SEND |
IB_QP_CREATE_MANAGED_RECV)) {
if (!MLX5_CAP_GEN(mdev, cd)) {
mlx5_ib_dbg(dev, "cross-channel isn't supported\n");
return -EINVAL;
}
if (init_attr->create_flags & IB_QP_CREATE_CROSS_CHANNEL)
qp->flags |= MLX5_IB_QP_CROSS_CHANNEL;
if (init_attr->create_flags & IB_QP_CREATE_MANAGED_SEND)
qp->flags |= MLX5_IB_QP_MANAGED_SEND;
if (init_attr->create_flags & IB_QP_CREATE_MANAGED_RECV)
qp->flags |= MLX5_IB_QP_MANAGED_RECV;
}
if (init_attr->qp_type == IB_QPT_UD &&
(init_attr->create_flags & IB_QP_CREATE_IPOIB_UD_LSO))
if (!MLX5_CAP_GEN(mdev, ipoib_basic_offloads)) {
mlx5_ib_dbg(dev, "ipoib UD lso qp isn't supported\n");
return -EOPNOTSUPP;
}
if (init_attr->create_flags & IB_QP_CREATE_SCATTER_FCS) {
if (init_attr->qp_type != IB_QPT_RAW_PACKET) {
mlx5_ib_dbg(dev, "Scatter FCS is supported only for Raw Packet QPs");
return -EOPNOTSUPP;
}
if (!MLX5_CAP_GEN(dev->mdev, eth_net_offloads) ||
!MLX5_CAP_ETH(dev->mdev, scatter_fcs)) {
mlx5_ib_dbg(dev, "Scatter FCS isn't supported\n");
return -EOPNOTSUPP;
}
qp->flags |= MLX5_IB_QP_CAP_SCATTER_FCS;
}
if (init_attr->sq_sig_type == IB_SIGNAL_ALL_WR)
qp->sq_signal_bits = MLX5_WQE_CTRL_CQ_UPDATE;
if (init_attr->create_flags & IB_QP_CREATE_CVLAN_STRIPPING) {
if (!(MLX5_CAP_GEN(dev->mdev, eth_net_offloads) &&
MLX5_CAP_ETH(dev->mdev, vlan_cap)) ||
(init_attr->qp_type != IB_QPT_RAW_PACKET))
return -EOPNOTSUPP;
qp->flags |= MLX5_IB_QP_CVLAN_STRIPPING;
}
if (pd && pd->uobject) {
if (ib_copy_from_udata(&ucmd, udata, sizeof(ucmd))) {
mlx5_ib_dbg(dev, "copy failed\n");
return -EFAULT;
}
err = get_qp_user_index(to_mucontext(pd->uobject->context),
&ucmd, udata->inlen, &uidx);
if (err)
return err;
qp->wq_sig = !!(ucmd.flags & MLX5_QP_FLAG_SIGNATURE);
qp->scat_cqe = !!(ucmd.flags & MLX5_QP_FLAG_SCATTER_CQE);
if (ucmd.flags & MLX5_QP_FLAG_TUNNEL_OFFLOADS) {
if (init_attr->qp_type != IB_QPT_RAW_PACKET ||
!tunnel_offload_supported(mdev)) {
mlx5_ib_dbg(dev, "Tunnel offload isn't supported\n");
return -EOPNOTSUPP;
}
qp->tunnel_offload_en = true;
}
if (init_attr->create_flags & IB_QP_CREATE_SOURCE_QPN) {
if (init_attr->qp_type != IB_QPT_UD ||
(MLX5_CAP_GEN(dev->mdev, port_type) !=
MLX5_CAP_PORT_TYPE_IB) ||
!mlx5_get_flow_namespace(dev->mdev, MLX5_FLOW_NAMESPACE_BYPASS)) {
mlx5_ib_dbg(dev, "Source QP option isn't supported\n");
return -EOPNOTSUPP;
}
qp->flags |= MLX5_IB_QP_UNDERLAY;
qp->underlay_qpn = init_attr->source_qpn;
}
} else {
qp->wq_sig = !!wq_signature;
}
base = (init_attr->qp_type == IB_QPT_RAW_PACKET ||
qp->flags & MLX5_IB_QP_UNDERLAY) ?
&qp->raw_packet_qp.rq.base :
&qp->trans_qp.base;
qp->has_rq = qp_has_rq(init_attr);
err = set_rq_size(dev, &init_attr->cap, qp->has_rq,
qp, (pd && pd->uobject) ? &ucmd : NULL);
if (err) {
mlx5_ib_dbg(dev, "err %d\n", err);
return err;
}
if (pd) {
if (pd->uobject) {
__u32 max_wqes =
1 << MLX5_CAP_GEN(mdev, log_max_qp_sz);
mlx5_ib_dbg(dev, "requested sq_wqe_count (%d)\n", ucmd.sq_wqe_count);
if (ucmd.rq_wqe_shift != qp->rq.wqe_shift ||
ucmd.rq_wqe_count != qp->rq.wqe_cnt) {
mlx5_ib_dbg(dev, "invalid rq params\n");
return -EINVAL;
}
if (ucmd.sq_wqe_count > max_wqes) {
mlx5_ib_dbg(dev, "requested sq_wqe_count (%d) > max allowed (%d)\n",
ucmd.sq_wqe_count, max_wqes);
return -EINVAL;
}
if (init_attr->create_flags &
mlx5_ib_create_qp_sqpn_qp1()) {
mlx5_ib_dbg(dev, "user-space is not allowed to create UD QPs spoofing as QP1\n");
return -EINVAL;
}
err = create_user_qp(dev, pd, qp, udata, init_attr, &in,
&resp, &inlen, base);
if (err)
mlx5_ib_dbg(dev, "err %d\n", err);
} else {
err = create_kernel_qp(dev, init_attr, qp, &in, &inlen,
base);
if (err)
mlx5_ib_dbg(dev, "err %d\n", err);
}
if (err)
return err;
} else {
in = kvzalloc(inlen, GFP_KERNEL);
if (!in)
return -ENOMEM;
qp->create_type = MLX5_QP_EMPTY;
}
if (is_sqp(init_attr->qp_type))
qp->port = init_attr->port_num;
qpc = MLX5_ADDR_OF(create_qp_in, in, qpc);
MLX5_SET(qpc, qpc, st, mlx5_st);
MLX5_SET(qpc, qpc, pm_state, MLX5_QP_PM_MIGRATED);
if (init_attr->qp_type != MLX5_IB_QPT_REG_UMR)
MLX5_SET(qpc, qpc, pd, to_mpd(pd ? pd : devr->p0)->pdn);
else
MLX5_SET(qpc, qpc, latency_sensitive, 1);
if (qp->wq_sig)
MLX5_SET(qpc, qpc, wq_signature, 1);
if (qp->flags & MLX5_IB_QP_BLOCK_MULTICAST_LOOPBACK)
MLX5_SET(qpc, qpc, block_lb_mc, 1);
if (qp->flags & MLX5_IB_QP_CROSS_CHANNEL)
MLX5_SET(qpc, qpc, cd_master, 1);
if (qp->flags & MLX5_IB_QP_MANAGED_SEND)
MLX5_SET(qpc, qpc, cd_slave_send, 1);
if (qp->flags & MLX5_IB_QP_MANAGED_RECV)
MLX5_SET(qpc, qpc, cd_slave_receive, 1);
if (qp->scat_cqe && is_connected(init_attr->qp_type)) {
int rcqe_sz;
int scqe_sz;
rcqe_sz = mlx5_ib_get_cqe_size(dev, init_attr->recv_cq);
scqe_sz = mlx5_ib_get_cqe_size(dev, init_attr->send_cq);
if (rcqe_sz == 128)
MLX5_SET(qpc, qpc, cs_res, MLX5_RES_SCAT_DATA64_CQE);
else
MLX5_SET(qpc, qpc, cs_res, MLX5_RES_SCAT_DATA32_CQE);
if (init_attr->sq_sig_type == IB_SIGNAL_ALL_WR) {
if (scqe_sz == 128)
MLX5_SET(qpc, qpc, cs_req, MLX5_REQ_SCAT_DATA64_CQE);
else
MLX5_SET(qpc, qpc, cs_req, MLX5_REQ_SCAT_DATA32_CQE);
}
}
if (qp->rq.wqe_cnt) {
MLX5_SET(qpc, qpc, log_rq_stride, qp->rq.wqe_shift - 4);
MLX5_SET(qpc, qpc, log_rq_size, ilog2(qp->rq.wqe_cnt));
}
MLX5_SET(qpc, qpc, rq_type, get_rx_type(qp, init_attr));
if (qp->sq.wqe_cnt) {
MLX5_SET(qpc, qpc, log_sq_size, ilog2(qp->sq.wqe_cnt));
} else {
MLX5_SET(qpc, qpc, no_sq, 1);
if (init_attr->srq &&
init_attr->srq->srq_type == IB_SRQT_TM)
MLX5_SET(qpc, qpc, offload_type,
MLX5_QPC_OFFLOAD_TYPE_RNDV);
}
/* Set default resources */
switch (init_attr->qp_type) {
case IB_QPT_XRC_TGT:
MLX5_SET(qpc, qpc, cqn_rcv, to_mcq(devr->c0)->mcq.cqn);
MLX5_SET(qpc, qpc, cqn_snd, to_mcq(devr->c0)->mcq.cqn);
MLX5_SET(qpc, qpc, srqn_rmpn_xrqn, to_msrq(devr->s0)->msrq.srqn);
MLX5_SET(qpc, qpc, xrcd, to_mxrcd(init_attr->xrcd)->xrcdn);
break;
case IB_QPT_XRC_INI:
MLX5_SET(qpc, qpc, cqn_rcv, to_mcq(devr->c0)->mcq.cqn);
MLX5_SET(qpc, qpc, xrcd, to_mxrcd(devr->x1)->xrcdn);
MLX5_SET(qpc, qpc, srqn_rmpn_xrqn, to_msrq(devr->s0)->msrq.srqn);
break;
default:
if (init_attr->srq) {
MLX5_SET(qpc, qpc, xrcd, to_mxrcd(devr->x0)->xrcdn);
MLX5_SET(qpc, qpc, srqn_rmpn_xrqn, to_msrq(init_attr->srq)->msrq.srqn);
} else {
MLX5_SET(qpc, qpc, xrcd, to_mxrcd(devr->x1)->xrcdn);
MLX5_SET(qpc, qpc, srqn_rmpn_xrqn, to_msrq(devr->s1)->msrq.srqn);
}
}
if (init_attr->send_cq)
MLX5_SET(qpc, qpc, cqn_snd, to_mcq(init_attr->send_cq)->mcq.cqn);
if (init_attr->recv_cq)
MLX5_SET(qpc, qpc, cqn_rcv, to_mcq(init_attr->recv_cq)->mcq.cqn);
MLX5_SET64(qpc, qpc, dbr_addr, qp->db.dma);
/* 0xffffff means we ask to work with cqe version 0 */
if (MLX5_CAP_GEN(mdev, cqe_version) == MLX5_CQE_VERSION_V1)
MLX5_SET(qpc, qpc, user_index, uidx);
/* we use IB_QP_CREATE_IPOIB_UD_LSO to indicates ipoib qp */
if (init_attr->qp_type == IB_QPT_UD &&
(init_attr->create_flags & IB_QP_CREATE_IPOIB_UD_LSO)) {
MLX5_SET(qpc, qpc, ulp_stateless_offload_mode, 1);
qp->flags |= MLX5_IB_QP_LSO;
}
if (init_attr->create_flags & IB_QP_CREATE_PCI_WRITE_END_PADDING) {
if (!MLX5_CAP_GEN(dev->mdev, end_pad)) {
mlx5_ib_dbg(dev, "scatter end padding is not supported\n");
err = -EOPNOTSUPP;
goto err;
} else if (init_attr->qp_type != IB_QPT_RAW_PACKET) {
MLX5_SET(qpc, qpc, end_padding_mode,
MLX5_WQ_END_PAD_MODE_ALIGN);
} else {
qp->flags |= MLX5_IB_QP_PCI_WRITE_END_PADDING;
}
}
if (inlen < 0) {
err = -EINVAL;
goto err;
}
if (init_attr->qp_type == IB_QPT_RAW_PACKET ||
qp->flags & MLX5_IB_QP_UNDERLAY) {
qp->raw_packet_qp.sq.ubuffer.buf_addr = ucmd.sq_buf_addr;
raw_packet_qp_copy_info(qp, &qp->raw_packet_qp);
err = create_raw_packet_qp(dev, qp, in, inlen, pd);
} else {
err = mlx5_core_create_qp(dev->mdev, &base->mqp, in, inlen);
}
if (err) {
mlx5_ib_dbg(dev, "create qp failed\n");
goto err_create;
}
kvfree(in);
base->container_mibqp = qp;
base->mqp.event = mlx5_ib_qp_event;
get_cqs(init_attr->qp_type, init_attr->send_cq, init_attr->recv_cq,
&send_cq, &recv_cq);
spin_lock_irqsave(&dev->reset_flow_resource_lock, flags);
mlx5_ib_lock_cqs(send_cq, recv_cq);
/* Maintain device to QPs access, needed for further handling via reset
* flow
*/
list_add_tail(&qp->qps_list, &dev->qp_list);
/* Maintain CQ to QPs access, needed for further handling via reset flow
*/
if (send_cq)
list_add_tail(&qp->cq_send_list, &send_cq->list_send_qp);
if (recv_cq)
list_add_tail(&qp->cq_recv_list, &recv_cq->list_recv_qp);
mlx5_ib_unlock_cqs(send_cq, recv_cq);
spin_unlock_irqrestore(&dev->reset_flow_resource_lock, flags);
return 0;
err_create:
if (qp->create_type == MLX5_QP_USER)
destroy_qp_user(dev, pd, qp, base);
else if (qp->create_type == MLX5_QP_KERNEL)
destroy_qp_kernel(dev, qp);
err:
kvfree(in);
return err;
} | 2163 | True | 1 |
|
CVE-2018-20511 | False | False | False | False | AV:L/AC:L/Au:N/C:P/I:N/A:N | LOCAL | LOW | NONE | PARTIAL | NONE | NONE | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N | LOCAL | LOW | LOW | NONE | UNCHANGED | HIGH | NONE | NONE | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://lkml.org/lkml/2018/9/27/480', 'name': 'https://lkml.org/lkml/2018/9/27/480', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/9824dfae5741275473a23a7ed5756c7b6efacc9d', 'name': 'https://github.com/torvalds/linux/commit/9824dfae5741275473a23a7ed5756c7b6efacc9d', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.18.11', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.18.11', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9824dfae5741275473a23a7ed5756c7b6efacc9d', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9824dfae5741275473a23a7ed5756c7b6efacc9d', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/106347', 'name': '106347', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00034.html', 'name': '[debian-lts-announce] 20190327 [SECURITY] [DLA 1731-1] linux security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/04/msg00004.html', 'name': '[debian-lts-announce] 20190401 [SECURITY] [DLA 1731-2] linux regression update', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://usn.ubuntu.com/4094-1/', 'name': 'USN-4094-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4118-1/', 'name': 'USN-4118-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-200'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.18.11', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel before 4.18.11. The ipddp_ioctl function in drivers/net/appletalk/ipddp.c allows local users to obtain sensitive kernel address information by leveraging CAP_NET_ADMIN to read the ipddp_route dev and next fields via an SIOCFINDIPDDPRT ioctl call.'}] | 2019-04-01T21:29Z | 2018-12-27T14:29Z | Exposure of Sensitive Information to an Unauthorized Actor | The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. |
There are many different kinds of mistakes that introduce information exposures. The severity of the error can range widely, depending on the context in which the product operates, the type of sensitive information that is revealed, and the benefits it may provide to an attacker. Some kinds of sensitive information include:
private, personal information, such as personal messages, financial data, health records, geographic location, or contact details
system status and environment, such as the operating system and installed packages
business secrets and intellectual property
network status and configuration
the product's own code or internal state
metadata, e.g. logging of connections or message headers
indirect information, such as a discrepancy between two internal operations that can be observed by an outsider
Information might be sensitive to different parties, each of which may have their own expectations for whether the information should be protected. These parties include:
the product's own users
people or organizations whose information is created or used by the product, even if they are not direct product users
the product's administrators, including the admins of the system(s) and/or networks on which the product operates
the developer
Information exposures can occur in different ways:
the code explicitly inserts sensitive information into resources or messages that are intentionally made accessible to unauthorized actors, but should not contain the information - i.e., the information should have been "scrubbed" or "sanitized"
a different weakness or mistake indirectly inserts the sensitive information into resources, such as a web script error revealing the full system path of the program.
the code manages resources that intentionally contain sensitive information, but the resources are unintentionally made accessible to unauthorized actors. In this case, the information exposure is resultant - i.e., a different weakness enabled the access to the information in the first place.
It is common practice to describe any loss of confidentiality as an "information exposure," but this can lead to overuse of CWE-200 in CWE mapping. From the CWE perspective, loss of confidentiality is a technical impact that can arise from dozens of different weaknesses, such as insecure file permissions or out-of-bounds read. CWE-200 and its lower-level descendants are intended to cover the mistakes that occur in behaviors that explicitly manage, store, transfer, or cleanse sensitive information.
| https://cwe.mitre.org/data/definitions/200.html | 0 | Willy Tarreau | 2018-09-12 07:36:35+02:00 | net/appletalk: fix minor pointer leak to userspace in SIOCFINDIPDDPRT
Fields ->dev and ->next of struct ipddp_route may be copied to
userspace on the SIOCFINDIPDDPRT ioctl. This is only accessible
to CAP_NET_ADMIN though. Let's manually copy the relevant fields
instead of using memcpy().
BugLink: http://blog.infosectcbr.com.au/2018/09/linux-kernel-infoleaks.html
Cc: Jann Horn <[email protected]>
Signed-off-by: Willy Tarreau <[email protected]>
Signed-off-by: David S. Miller <[email protected]> | 9824dfae5741275473a23a7ed5756c7b6efacc9d | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ipddp_ioctl | ipddp_ioctl( struct net_device * dev , struct ifreq * ifr , int cmd) | ['dev', 'ifr', 'cmd'] | static int ipddp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
struct ipddp_route __user *rt = ifr->ifr_data;
struct ipddp_route rcp, rcp2, *rp;
if(!capable(CAP_NET_ADMIN))
return -EPERM;
if(copy_from_user(&rcp, rt, sizeof(rcp)))
return -EFAULT;
switch(cmd)
{
case SIOCADDIPDDPRT:
return ipddp_create(&rcp);
case SIOCFINDIPDDPRT:
spin_lock_bh(&ipddp_route_lock);
rp = __ipddp_find_route(&rcp);
if (rp)
memcpy(&rcp2, rp, sizeof(rcp2));
spin_unlock_bh(&ipddp_route_lock);
if (rp) {
if (copy_to_user(rt, &rcp2,
sizeof(struct ipddp_route)))
return -EFAULT;
return 0;
} else
return -ENOENT;
case SIOCDELIPDDPRT:
return ipddp_delete(&rcp);
default:
return -EINVAL;
}
} | 173 | True | 1 |
|
CVE-2018-17182 | False | False | False | False | AV:L/AC:L/Au:N/C:C/I:C/A:C | LOCAL | LOW | NONE | COMPLETE | COMPLETE | COMPLETE | 7.2 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | False | [{'url': 'https://www.openwall.com/lists/oss-security/2018/09/18/4', 'name': 'https://www.openwall.com/lists/oss-security/2018/09/18/4', 'refsource': 'MISC', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/7a9cdebdcc17e426fb5287e4a82db1dfe86339b2', 'name': 'https://github.com/torvalds/linux/commit/7a9cdebdcc17e426fb5287e4a82db1dfe86339b2', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7a9cdebdcc17e426fb5287e4a82db1dfe86339b2', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7a9cdebdcc17e426fb5287e4a82db1dfe86339b2', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://www.exploit-db.com/exploits/45497/', 'name': '45497', 'refsource': 'EXPLOIT-DB', 'tags': ['Exploit', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://www.debian.org/security/2018/dsa-4308', 'name': 'DSA-4308', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3777-2/', 'name': 'USN-3777-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3777-1/', 'name': 'USN-3777-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3776-2/', 'name': 'USN-3776-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3776-1/', 'name': 'USN-3776-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securitytracker.com/id/1041748', 'name': '1041748', 'refsource': 'SECTRACK', 'tags': ['Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/105417', 'name': '105417', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/10/msg00003.html', 'name': '[debian-lts-announce] 20181003 [SECURITY] [DLA 1531-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3777-3/', 'name': 'USN-3777-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3656', 'name': 'RHSA-2018:3656', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/106503', 'name': '106503', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://security.netapp.com/advisory/ntap-20190204-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20190204-0001/', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-416'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.18.8', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:element_software:-:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:active_iq_performance_analytics_services:-:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel through 4.18.8. The vmacache_flush_all function in mm/vmacache.c mishandles sequence number overflows. An attacker can trigger a use-after-free (and possibly gain privileges) via certain thread creation, map, unmap, invalidation, and dereference operations.'}] | 2019-03-05T17:58Z | 2018-09-19T09:29Z | Use After Free | Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. |
The use of previously-freed memory can have any number of adverse consequences, ranging from the corruption of valid data to the execution of arbitrary code, depending on the instantiation and timing of the flaw. The simplest way data corruption may occur involves the system's reuse of the freed memory. Use-after-free errors have two common and sometimes overlapping causes:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for freeing the memory.
In this scenario, the memory in question is allocated to another pointer validly at some point after it has been freed. The original pointer to the freed memory is used again and points to somewhere within the new allocation. As the data is changed, it corrupts the validly used memory; this induces undefined behavior in the process.
If the newly allocated data chances to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.
| https://cwe.mitre.org/data/definitions/416.html | 0 | Linus Torvalds | 2018-09-12 23:57:48-10:00 | mm: get rid of vmacache_flush_all() entirely
Jann Horn points out that the vmacache_flush_all() function is not only
potentially expensive, it's buggy too. It also happens to be entirely
unnecessary, because the sequence number overflow case can be avoided by
simply making the sequence number be 64-bit. That doesn't even grow the
data structures in question, because the other adjacent fields are
already 64-bit.
So simplify the whole thing by just making the sequence number overflow
case go away entirely, which gets rid of all the complications and makes
the code faster too. Win-win.
[ Oleg Nesterov points out that the VMACACHE_FULL_FLUSHES statistics
also just goes away entirely with this ]
Reported-by: Jann Horn <[email protected]>
Suggested-by: Will Deacon <[email protected]>
Acked-by: Davidlohr Bueso <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: [email protected]
Signed-off-by: Linus Torvalds <[email protected]> | 7a9cdebdcc17e426fb5287e4a82db1dfe86339b2 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | vmacache_invalidate | vmacache_invalidate( struct mm_struct * mm) | ['mm'] | static inline void vmacache_invalidate(struct mm_struct *mm)
{
mm->vmacache_seqnum++;
/* deal with overflows */
if (unlikely(mm->vmacache_seqnum == 0))
vmacache_flush_all(mm);
} | 30 | True | 1 |
|
CVE-2018-17182 | False | False | False | False | AV:L/AC:L/Au:N/C:C/I:C/A:C | LOCAL | LOW | NONE | COMPLETE | COMPLETE | COMPLETE | 7.2 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | False | [{'url': 'https://www.openwall.com/lists/oss-security/2018/09/18/4', 'name': 'https://www.openwall.com/lists/oss-security/2018/09/18/4', 'refsource': 'MISC', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/7a9cdebdcc17e426fb5287e4a82db1dfe86339b2', 'name': 'https://github.com/torvalds/linux/commit/7a9cdebdcc17e426fb5287e4a82db1dfe86339b2', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7a9cdebdcc17e426fb5287e4a82db1dfe86339b2', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7a9cdebdcc17e426fb5287e4a82db1dfe86339b2', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://www.exploit-db.com/exploits/45497/', 'name': '45497', 'refsource': 'EXPLOIT-DB', 'tags': ['Exploit', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://www.debian.org/security/2018/dsa-4308', 'name': 'DSA-4308', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3777-2/', 'name': 'USN-3777-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3777-1/', 'name': 'USN-3777-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3776-2/', 'name': 'USN-3776-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3776-1/', 'name': 'USN-3776-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securitytracker.com/id/1041748', 'name': '1041748', 'refsource': 'SECTRACK', 'tags': ['Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/105417', 'name': '105417', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/10/msg00003.html', 'name': '[debian-lts-announce] 20181003 [SECURITY] [DLA 1531-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3777-3/', 'name': 'USN-3777-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3656', 'name': 'RHSA-2018:3656', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/106503', 'name': '106503', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://security.netapp.com/advisory/ntap-20190204-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20190204-0001/', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-416'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.18.8', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:element_software:-:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:active_iq_performance_analytics_services:-:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel through 4.18.8. The vmacache_flush_all function in mm/vmacache.c mishandles sequence number overflows. An attacker can trigger a use-after-free (and possibly gain privileges) via certain thread creation, map, unmap, invalidation, and dereference operations.'}] | 2019-03-05T17:58Z | 2018-09-19T09:29Z | Use After Free | Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. |
The use of previously-freed memory can have any number of adverse consequences, ranging from the corruption of valid data to the execution of arbitrary code, depending on the instantiation and timing of the flaw. The simplest way data corruption may occur involves the system's reuse of the freed memory. Use-after-free errors have two common and sometimes overlapping causes:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for freeing the memory.
In this scenario, the memory in question is allocated to another pointer validly at some point after it has been freed. The original pointer to the freed memory is used again and points to somewhere within the new allocation. As the data is changed, it corrupts the validly used memory; this induces undefined behavior in the process.
If the newly allocated data chances to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.
| https://cwe.mitre.org/data/definitions/416.html | 0 | Linus Torvalds | 2018-09-12 23:57:48-10:00 | mm: get rid of vmacache_flush_all() entirely
Jann Horn points out that the vmacache_flush_all() function is not only
potentially expensive, it's buggy too. It also happens to be entirely
unnecessary, because the sequence number overflow case can be avoided by
simply making the sequence number be 64-bit. That doesn't even grow the
data structures in question, because the other adjacent fields are
already 64-bit.
So simplify the whole thing by just making the sequence number overflow
case go away entirely, which gets rid of all the complications and makes
the code faster too. Win-win.
[ Oleg Nesterov points out that the VMACACHE_FULL_FLUSHES statistics
also just goes away entirely with this ]
Reported-by: Jann Horn <[email protected]>
Suggested-by: Will Deacon <[email protected]>
Acked-by: Davidlohr Bueso <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: [email protected]
Signed-off-by: Linus Torvalds <[email protected]> | 7a9cdebdcc17e426fb5287e4a82db1dfe86339b2 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | dump_mm | dump_mm( const struct mm_struct * mm) | ['mm'] | void dump_mm(const struct mm_struct *mm)
{
pr_emerg("mm %px mmap %px seqnum %d task_size %lu\n"
#ifdef CONFIG_MMU
"get_unmapped_area %px\n"
#endif
"mmap_base %lu mmap_legacy_base %lu highest_vm_end %lu\n"
"pgd %px mm_users %d mm_count %d pgtables_bytes %lu map_count %d\n"
"hiwater_rss %lx hiwater_vm %lx total_vm %lx locked_vm %lx\n"
"pinned_vm %lx data_vm %lx exec_vm %lx stack_vm %lx\n"
"start_code %lx end_code %lx start_data %lx end_data %lx\n"
"start_brk %lx brk %lx start_stack %lx\n"
"arg_start %lx arg_end %lx env_start %lx env_end %lx\n"
"binfmt %px flags %lx core_state %px\n"
#ifdef CONFIG_AIO
"ioctx_table %px\n"
#endif
#ifdef CONFIG_MEMCG
"owner %px "
#endif
"exe_file %px\n"
#ifdef CONFIG_MMU_NOTIFIER
"mmu_notifier_mm %px\n"
#endif
#ifdef CONFIG_NUMA_BALANCING
"numa_next_scan %lu numa_scan_offset %lu numa_scan_seq %d\n"
#endif
"tlb_flush_pending %d\n"
"def_flags: %#lx(%pGv)\n",
mm, mm->mmap, mm->vmacache_seqnum, mm->task_size,
#ifdef CONFIG_MMU
mm->get_unmapped_area,
#endif
mm->mmap_base, mm->mmap_legacy_base, mm->highest_vm_end,
mm->pgd, atomic_read(&mm->mm_users),
atomic_read(&mm->mm_count),
mm_pgtables_bytes(mm),
mm->map_count,
mm->hiwater_rss, mm->hiwater_vm, mm->total_vm, mm->locked_vm,
mm->pinned_vm, mm->data_vm, mm->exec_vm, mm->stack_vm,
mm->start_code, mm->end_code, mm->start_data, mm->end_data,
mm->start_brk, mm->brk, mm->start_stack,
mm->arg_start, mm->arg_end, mm->env_start, mm->env_end,
mm->binfmt, mm->flags, mm->core_state,
#ifdef CONFIG_AIO
mm->ioctx_table,
#endif
#ifdef CONFIG_MEMCG
mm->owner,
#endif
mm->exe_file,
#ifdef CONFIG_MMU_NOTIFIER
mm->mmu_notifier_mm,
#endif
#ifdef CONFIG_NUMA_BALANCING
mm->numa_next_scan, mm->numa_scan_offset, mm->numa_scan_seq,
#endif
atomic_read(&mm->tlb_flush_pending),
mm->def_flags, &mm->def_flags
);
} | 223 | True | 1 |
|
CVE-2018-17182 | False | False | False | False | AV:L/AC:L/Au:N/C:C/I:C/A:C | LOCAL | LOW | NONE | COMPLETE | COMPLETE | COMPLETE | 7.2 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | False | [{'url': 'https://www.openwall.com/lists/oss-security/2018/09/18/4', 'name': 'https://www.openwall.com/lists/oss-security/2018/09/18/4', 'refsource': 'MISC', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/7a9cdebdcc17e426fb5287e4a82db1dfe86339b2', 'name': 'https://github.com/torvalds/linux/commit/7a9cdebdcc17e426fb5287e4a82db1dfe86339b2', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7a9cdebdcc17e426fb5287e4a82db1dfe86339b2', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7a9cdebdcc17e426fb5287e4a82db1dfe86339b2', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://www.exploit-db.com/exploits/45497/', 'name': '45497', 'refsource': 'EXPLOIT-DB', 'tags': ['Exploit', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://www.debian.org/security/2018/dsa-4308', 'name': 'DSA-4308', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3777-2/', 'name': 'USN-3777-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3777-1/', 'name': 'USN-3777-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3776-2/', 'name': 'USN-3776-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3776-1/', 'name': 'USN-3776-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securitytracker.com/id/1041748', 'name': '1041748', 'refsource': 'SECTRACK', 'tags': ['Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/105417', 'name': '105417', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://lists.debian.org/debian-lts-announce/2018/10/msg00003.html', 'name': '[debian-lts-announce] 20181003 [SECURITY] [DLA 1531-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3777-3/', 'name': 'USN-3777-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3656', 'name': 'RHSA-2018:3656', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/106503', 'name': '106503', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://security.netapp.com/advisory/ntap-20190204-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20190204-0001/', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-416'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.18.8', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:element_software:-:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:active_iq_performance_analytics_services:-:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel through 4.18.8. The vmacache_flush_all function in mm/vmacache.c mishandles sequence number overflows. An attacker can trigger a use-after-free (and possibly gain privileges) via certain thread creation, map, unmap, invalidation, and dereference operations.'}] | 2019-03-05T17:58Z | 2018-09-19T09:29Z | Use After Free | Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. |
The use of previously-freed memory can have any number of adverse consequences, ranging from the corruption of valid data to the execution of arbitrary code, depending on the instantiation and timing of the flaw. The simplest way data corruption may occur involves the system's reuse of the freed memory. Use-after-free errors have two common and sometimes overlapping causes:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for freeing the memory.
In this scenario, the memory in question is allocated to another pointer validly at some point after it has been freed. The original pointer to the freed memory is used again and points to somewhere within the new allocation. As the data is changed, it corrupts the validly used memory; this induces undefined behavior in the process.
If the newly allocated data chances to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.
| https://cwe.mitre.org/data/definitions/416.html | 0 | Linus Torvalds | 2018-09-12 23:57:48-10:00 | mm: get rid of vmacache_flush_all() entirely
Jann Horn points out that the vmacache_flush_all() function is not only
potentially expensive, it's buggy too. It also happens to be entirely
unnecessary, because the sequence number overflow case can be avoided by
simply making the sequence number be 64-bit. That doesn't even grow the
data structures in question, because the other adjacent fields are
already 64-bit.
So simplify the whole thing by just making the sequence number overflow
case go away entirely, which gets rid of all the complications and makes
the code faster too. Win-win.
[ Oleg Nesterov points out that the VMACACHE_FULL_FLUSHES statistics
also just goes away entirely with this ]
Reported-by: Jann Horn <[email protected]>
Suggested-by: Will Deacon <[email protected]>
Acked-by: Davidlohr Bueso <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: [email protected]
Signed-off-by: Linus Torvalds <[email protected]> | 7a9cdebdcc17e426fb5287e4a82db1dfe86339b2 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | vmacache_flush_all | vmacache_flush_all( struct mm_struct * mm) | ['mm'] | void vmacache_flush_all(struct mm_struct *mm)
{
struct task_struct *g, *p;
count_vm_vmacache_event(VMACACHE_FULL_FLUSHES);
/*
* Single threaded tasks need not iterate the entire
* list of process. We can avoid the flushing as well
* since the mm's seqnum was increased and don't have
* to worry about other threads' seqnum. Current's
* flush will occur upon the next lookup.
*/
if (atomic_read(&mm->mm_users) == 1)
return;
rcu_read_lock();
for_each_process_thread(g, p) {
/*
* Only flush the vmacache pointers as the
* mm seqnum is already set and curr's will
* be set upon invalidation when the next
* lookup is done.
*/
if (mm == p->mm)
vmacache_flush(p);
}
rcu_read_unlock();
} | 65 | True | 1 |
|
CVE-2018-20836 | False | False | False | False | AV:N/AC:M/Au:N/C:C/I:C/A:C | NETWORK | MEDIUM | NONE | COMPLETE | COMPLETE | COMPLETE | 9.3 | CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | HIGH | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 8.1 | HIGH | 2.2 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/b90cd6f2b905905fb42671009dc0e27c310a16ae', 'name': 'https://github.com/torvalds/linux/commit/b90cd6f2b905905fb42671009dc0e27c310a16ae', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b90cd6f2b905905fb42671009dc0e27c310a16ae', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b90cd6f2b905905fb42671009dc0e27c310a16ae', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/108196', 'name': '108196', 'refsource': 'BID', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K11225249', 'name': 'https://support.f5.com/csp/article/K11225249', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://security.netapp.com/advisory/ntap-20190719-0003/', 'name': 'https://security.netapp.com/advisory/ntap-20190719-0003/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00014.html', 'name': 'openSUSE-SU-2019:1716', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00025.html', 'name': 'openSUSE-SU-2019:1757', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://usn.ubuntu.com/4076-1/', 'name': 'USN-4076-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://www.debian.org/security/2019/dsa-4495', 'name': 'DSA-4495', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://seclists.org/bugtraq/2019/Aug/13', 'name': '20190812 [SECURITY] [DSA 4495-1] linux security update', 'refsource': 'BUGTRAQ', 'tags': []}, {'url': 'https://www.debian.org/security/2019/dsa-4497', 'name': 'DSA-4497', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://seclists.org/bugtraq/2019/Aug/18', 'name': '20190813 [SECURITY] [DSA 4497-1] linux security update', 'refsource': 'BUGTRAQ', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/08/msg00016.html', 'name': '[debian-lts-announce] 20190814 [SECURITY] [DLA 1884-1] linux security update', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/08/msg00017.html', 'name': '[debian-lts-announce] 20190814 [SECURITY] [DLA 1885-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}, {'lang': 'en', 'value': 'CWE-416'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.20', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel before 4.20. There is a race condition in smp_task_timedout() and smp_task_done() in drivers/scsi/libsas/sas_expander.c, leading to a use-after-free.'}] | 2019-05-08T16:29Z | 2019-05-07T14:29Z | Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') | The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently. |
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider.
A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc.
A race condition violates these properties, which are closely related:
Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution.
Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource.
A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x).
The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
| https://cwe.mitre.org/data/definitions/362.html | 0 | Jason Yan | 2018-09-25 10:56:54+08:00 | scsi: libsas: fix a race condition when smp task timeout
When the lldd is processing the complete sas task in interrupt and set the
task stat as SAS_TASK_STATE_DONE, the smp timeout timer is able to be
triggered at the same time. And smp_task_timedout() will complete the task
wheter the SAS_TASK_STATE_DONE is set or not. Then the sas task may freed
before lldd end the interrupt process. Thus a use-after-free will happen.
Fix this by calling the complete() only when SAS_TASK_STATE_DONE is not
set. And remove the check of the return value of the del_timer(). Once the
LLDD sets DONE, it must call task->done(), which will call
smp_task_done()->complete() and the task will be completed and freed
correctly.
Reported-by: chenxiang <[email protected]>
Signed-off-by: Jason Yan <[email protected]>
CC: John Garry <[email protected]>
CC: Johannes Thumshirn <[email protected]>
CC: Ewan Milne <[email protected]>
CC: Christoph Hellwig <[email protected]>
CC: Tomas Henzl <[email protected]>
CC: Dan Williams <[email protected]>
CC: Hannes Reinecke <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Reviewed-by: John Garry <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]> | b90cd6f2b905905fb42671009dc0e27c310a16ae | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | smp_task_done | smp_task_done( struct sas_task * task) | ['task'] | static void smp_task_done(struct sas_task *task)
{
if (!del_timer(&task->slow_task->timer))
return;
complete(&task->slow_task->completion);
} | 34 | True | 1 |
|
CVE-2018-20836 | False | False | False | False | AV:N/AC:M/Au:N/C:C/I:C/A:C | NETWORK | MEDIUM | NONE | COMPLETE | COMPLETE | COMPLETE | 9.3 | CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | HIGH | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 8.1 | HIGH | 2.2 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/b90cd6f2b905905fb42671009dc0e27c310a16ae', 'name': 'https://github.com/torvalds/linux/commit/b90cd6f2b905905fb42671009dc0e27c310a16ae', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b90cd6f2b905905fb42671009dc0e27c310a16ae', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b90cd6f2b905905fb42671009dc0e27c310a16ae', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/108196', 'name': '108196', 'refsource': 'BID', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K11225249', 'name': 'https://support.f5.com/csp/article/K11225249', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://security.netapp.com/advisory/ntap-20190719-0003/', 'name': 'https://security.netapp.com/advisory/ntap-20190719-0003/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00014.html', 'name': 'openSUSE-SU-2019:1716', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00025.html', 'name': 'openSUSE-SU-2019:1757', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://usn.ubuntu.com/4076-1/', 'name': 'USN-4076-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://www.debian.org/security/2019/dsa-4495', 'name': 'DSA-4495', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://seclists.org/bugtraq/2019/Aug/13', 'name': '20190812 [SECURITY] [DSA 4495-1] linux security update', 'refsource': 'BUGTRAQ', 'tags': []}, {'url': 'https://www.debian.org/security/2019/dsa-4497', 'name': 'DSA-4497', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://seclists.org/bugtraq/2019/Aug/18', 'name': '20190813 [SECURITY] [DSA 4497-1] linux security update', 'refsource': 'BUGTRAQ', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/08/msg00016.html', 'name': '[debian-lts-announce] 20190814 [SECURITY] [DLA 1884-1] linux security update', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/08/msg00017.html', 'name': '[debian-lts-announce] 20190814 [SECURITY] [DLA 1885-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}, {'lang': 'en', 'value': 'CWE-416'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.20', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel before 4.20. There is a race condition in smp_task_timedout() and smp_task_done() in drivers/scsi/libsas/sas_expander.c, leading to a use-after-free.'}] | 2019-05-08T16:29Z | 2019-05-07T14:29Z | Use After Free | Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. |
The use of previously-freed memory can have any number of adverse consequences, ranging from the corruption of valid data to the execution of arbitrary code, depending on the instantiation and timing of the flaw. The simplest way data corruption may occur involves the system's reuse of the freed memory. Use-after-free errors have two common and sometimes overlapping causes:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for freeing the memory.
In this scenario, the memory in question is allocated to another pointer validly at some point after it has been freed. The original pointer to the freed memory is used again and points to somewhere within the new allocation. As the data is changed, it corrupts the validly used memory; this induces undefined behavior in the process.
If the newly allocated data chances to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.
| https://cwe.mitre.org/data/definitions/416.html | 0 | Jason Yan | 2018-09-25 10:56:54+08:00 | scsi: libsas: fix a race condition when smp task timeout
When the lldd is processing the complete sas task in interrupt and set the
task stat as SAS_TASK_STATE_DONE, the smp timeout timer is able to be
triggered at the same time. And smp_task_timedout() will complete the task
wheter the SAS_TASK_STATE_DONE is set or not. Then the sas task may freed
before lldd end the interrupt process. Thus a use-after-free will happen.
Fix this by calling the complete() only when SAS_TASK_STATE_DONE is not
set. And remove the check of the return value of the del_timer(). Once the
LLDD sets DONE, it must call task->done(), which will call
smp_task_done()->complete() and the task will be completed and freed
correctly.
Reported-by: chenxiang <[email protected]>
Signed-off-by: Jason Yan <[email protected]>
CC: John Garry <[email protected]>
CC: Johannes Thumshirn <[email protected]>
CC: Ewan Milne <[email protected]>
CC: Christoph Hellwig <[email protected]>
CC: Tomas Henzl <[email protected]>
CC: Dan Williams <[email protected]>
CC: Hannes Reinecke <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Reviewed-by: John Garry <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]> | b90cd6f2b905905fb42671009dc0e27c310a16ae | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | smp_task_done | smp_task_done( struct sas_task * task) | ['task'] | static void smp_task_done(struct sas_task *task)
{
if (!del_timer(&task->slow_task->timer))
return;
complete(&task->slow_task->completion);
} | 34 | True | 1 |
|
CVE-2018-20836 | False | False | False | False | AV:N/AC:M/Au:N/C:C/I:C/A:C | NETWORK | MEDIUM | NONE | COMPLETE | COMPLETE | COMPLETE | 9.3 | CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | HIGH | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 8.1 | HIGH | 2.2 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/b90cd6f2b905905fb42671009dc0e27c310a16ae', 'name': 'https://github.com/torvalds/linux/commit/b90cd6f2b905905fb42671009dc0e27c310a16ae', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b90cd6f2b905905fb42671009dc0e27c310a16ae', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b90cd6f2b905905fb42671009dc0e27c310a16ae', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/108196', 'name': '108196', 'refsource': 'BID', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K11225249', 'name': 'https://support.f5.com/csp/article/K11225249', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://security.netapp.com/advisory/ntap-20190719-0003/', 'name': 'https://security.netapp.com/advisory/ntap-20190719-0003/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00014.html', 'name': 'openSUSE-SU-2019:1716', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00025.html', 'name': 'openSUSE-SU-2019:1757', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://usn.ubuntu.com/4076-1/', 'name': 'USN-4076-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://www.debian.org/security/2019/dsa-4495', 'name': 'DSA-4495', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://seclists.org/bugtraq/2019/Aug/13', 'name': '20190812 [SECURITY] [DSA 4495-1] linux security update', 'refsource': 'BUGTRAQ', 'tags': []}, {'url': 'https://www.debian.org/security/2019/dsa-4497', 'name': 'DSA-4497', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://seclists.org/bugtraq/2019/Aug/18', 'name': '20190813 [SECURITY] [DSA 4497-1] linux security update', 'refsource': 'BUGTRAQ', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/08/msg00016.html', 'name': '[debian-lts-announce] 20190814 [SECURITY] [DLA 1884-1] linux security update', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/08/msg00017.html', 'name': '[debian-lts-announce] 20190814 [SECURITY] [DLA 1885-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}, {'lang': 'en', 'value': 'CWE-416'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.20', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel before 4.20. There is a race condition in smp_task_timedout() and smp_task_done() in drivers/scsi/libsas/sas_expander.c, leading to a use-after-free.'}] | 2019-05-08T16:29Z | 2019-05-07T14:29Z | Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') | The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently. |
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider.
A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc.
A race condition violates these properties, which are closely related:
Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution.
Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource.
A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x).
The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
| https://cwe.mitre.org/data/definitions/362.html | 0 | Jason Yan | 2018-09-25 10:56:54+08:00 | scsi: libsas: fix a race condition when smp task timeout
When the lldd is processing the complete sas task in interrupt and set the
task stat as SAS_TASK_STATE_DONE, the smp timeout timer is able to be
triggered at the same time. And smp_task_timedout() will complete the task
wheter the SAS_TASK_STATE_DONE is set or not. Then the sas task may freed
before lldd end the interrupt process. Thus a use-after-free will happen.
Fix this by calling the complete() only when SAS_TASK_STATE_DONE is not
set. And remove the check of the return value of the del_timer(). Once the
LLDD sets DONE, it must call task->done(), which will call
smp_task_done()->complete() and the task will be completed and freed
correctly.
Reported-by: chenxiang <[email protected]>
Signed-off-by: Jason Yan <[email protected]>
CC: John Garry <[email protected]>
CC: Johannes Thumshirn <[email protected]>
CC: Ewan Milne <[email protected]>
CC: Christoph Hellwig <[email protected]>
CC: Tomas Henzl <[email protected]>
CC: Dan Williams <[email protected]>
CC: Hannes Reinecke <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Reviewed-by: John Garry <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]> | b90cd6f2b905905fb42671009dc0e27c310a16ae | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | smp_task_timedout | smp_task_timedout( struct timer_list * t) | ['t'] | static void smp_task_timedout(struct timer_list *t)
{
struct sas_task_slow *slow = from_timer(slow, t, timer);
struct sas_task *task = slow->task;
unsigned long flags;
spin_lock_irqsave(&task->task_state_lock, flags);
if (!(task->task_state_flags & SAS_TASK_STATE_DONE))
task->task_state_flags |= SAS_TASK_STATE_ABORTED;
spin_unlock_irqrestore(&task->task_state_lock, flags);
complete(&task->slow_task->completion);
} | 83 | True | 1 |
|
CVE-2018-20836 | False | False | False | False | AV:N/AC:M/Au:N/C:C/I:C/A:C | NETWORK | MEDIUM | NONE | COMPLETE | COMPLETE | COMPLETE | 9.3 | CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | HIGH | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 8.1 | HIGH | 2.2 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/b90cd6f2b905905fb42671009dc0e27c310a16ae', 'name': 'https://github.com/torvalds/linux/commit/b90cd6f2b905905fb42671009dc0e27c310a16ae', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b90cd6f2b905905fb42671009dc0e27c310a16ae', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b90cd6f2b905905fb42671009dc0e27c310a16ae', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/108196', 'name': '108196', 'refsource': 'BID', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K11225249', 'name': 'https://support.f5.com/csp/article/K11225249', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://security.netapp.com/advisory/ntap-20190719-0003/', 'name': 'https://security.netapp.com/advisory/ntap-20190719-0003/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00014.html', 'name': 'openSUSE-SU-2019:1716', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00025.html', 'name': 'openSUSE-SU-2019:1757', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://usn.ubuntu.com/4076-1/', 'name': 'USN-4076-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://www.debian.org/security/2019/dsa-4495', 'name': 'DSA-4495', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://seclists.org/bugtraq/2019/Aug/13', 'name': '20190812 [SECURITY] [DSA 4495-1] linux security update', 'refsource': 'BUGTRAQ', 'tags': []}, {'url': 'https://www.debian.org/security/2019/dsa-4497', 'name': 'DSA-4497', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://seclists.org/bugtraq/2019/Aug/18', 'name': '20190813 [SECURITY] [DSA 4497-1] linux security update', 'refsource': 'BUGTRAQ', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/08/msg00016.html', 'name': '[debian-lts-announce] 20190814 [SECURITY] [DLA 1884-1] linux security update', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/08/msg00017.html', 'name': '[debian-lts-announce] 20190814 [SECURITY] [DLA 1885-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}, {'lang': 'en', 'value': 'CWE-416'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.20', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel before 4.20. There is a race condition in smp_task_timedout() and smp_task_done() in drivers/scsi/libsas/sas_expander.c, leading to a use-after-free.'}] | 2019-05-08T16:29Z | 2019-05-07T14:29Z | Use After Free | Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. |
The use of previously-freed memory can have any number of adverse consequences, ranging from the corruption of valid data to the execution of arbitrary code, depending on the instantiation and timing of the flaw. The simplest way data corruption may occur involves the system's reuse of the freed memory. Use-after-free errors have two common and sometimes overlapping causes:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for freeing the memory.
In this scenario, the memory in question is allocated to another pointer validly at some point after it has been freed. The original pointer to the freed memory is used again and points to somewhere within the new allocation. As the data is changed, it corrupts the validly used memory; this induces undefined behavior in the process.
If the newly allocated data chances to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.
| https://cwe.mitre.org/data/definitions/416.html | 0 | Jason Yan | 2018-09-25 10:56:54+08:00 | scsi: libsas: fix a race condition when smp task timeout
When the lldd is processing the complete sas task in interrupt and set the
task stat as SAS_TASK_STATE_DONE, the smp timeout timer is able to be
triggered at the same time. And smp_task_timedout() will complete the task
wheter the SAS_TASK_STATE_DONE is set or not. Then the sas task may freed
before lldd end the interrupt process. Thus a use-after-free will happen.
Fix this by calling the complete() only when SAS_TASK_STATE_DONE is not
set. And remove the check of the return value of the del_timer(). Once the
LLDD sets DONE, it must call task->done(), which will call
smp_task_done()->complete() and the task will be completed and freed
correctly.
Reported-by: chenxiang <[email protected]>
Signed-off-by: Jason Yan <[email protected]>
CC: John Garry <[email protected]>
CC: Johannes Thumshirn <[email protected]>
CC: Ewan Milne <[email protected]>
CC: Christoph Hellwig <[email protected]>
CC: Tomas Henzl <[email protected]>
CC: Dan Williams <[email protected]>
CC: Hannes Reinecke <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Reviewed-by: John Garry <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]> | b90cd6f2b905905fb42671009dc0e27c310a16ae | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | smp_task_timedout | smp_task_timedout( struct timer_list * t) | ['t'] | static void smp_task_timedout(struct timer_list *t)
{
struct sas_task_slow *slow = from_timer(slow, t, timer);
struct sas_task *task = slow->task;
unsigned long flags;
spin_lock_irqsave(&task->task_state_lock, flags);
if (!(task->task_state_flags & SAS_TASK_STATE_DONE))
task->task_state_flags |= SAS_TASK_STATE_ABORTED;
spin_unlock_irqrestore(&task->task_state_lock, flags);
complete(&task->slow_task->completion);
} | 83 | True | 1 |
|
CVE-2018-18021 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:P/A:P | LOCAL | LOW | NONE | NONE | PARTIAL | PARTIAL | 3.6 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | HIGH | HIGH | 7.1 | HIGH | 1.8 | 5.2 | nan | [{'url': 'https://www.openwall.com/lists/oss-security/2018/10/02/2', 'name': 'https://www.openwall.com/lists/oss-security/2018/10/02/2', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/d26c25a9d19b5976b319af528886f89cf455692d', 'name': 'https://github.com/torvalds/linux/commit/d26c25a9d19b5976b319af528886f89cf455692d', 'refsource': 'MISC', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/2a3f93459d689d990b3ecfbe782fec89b97d3279', 'name': 'https://github.com/torvalds/linux/commit/2a3f93459d689d990b3ecfbe782fec89b97d3279', 'refsource': 'MISC', 'tags': ['Patch']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.18.12', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.18.12', 'refsource': 'MISC', 'tags': ['Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d26c25a9d19b5976b319af528886f89cf455692d', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d26c25a9d19b5976b319af528886f89cf455692d', 'refsource': 'MISC', 'tags': ['Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2a3f93459d689d990b3ecfbe782fec89b97d3279', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2a3f93459d689d990b3ecfbe782fec89b97d3279', 'refsource': 'MISC', 'tags': ['Patch']}, {'url': 'https://www.debian.org/security/2018/dsa-4313', 'name': 'DSA-4313', 'refsource': 'DEBIAN', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/105550', 'name': '105550', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://usn.ubuntu.com/3821-2/', 'name': 'USN-3821-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3821-1/', 'name': 'USN-3821-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2018:3656', 'name': 'RHSA-2018:3656', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3931-2/', 'name': 'USN-3931-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3931-1/', 'name': 'USN-3931-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.18.12', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'arch/arm64/kvm/guest.c in KVM in the Linux kernel before 4.18.12 on the arm64 platform mishandles the KVM_SET_ON_REG ioctl. This is exploitable by attackers who can create virtual machines. An attacker can arbitrarily redirect the hypervisor flow of control (with full register control). An attacker can also cause a denial of service (hypervisor panic) via an illegal exception return. This occurs because of insufficient restrictions on userspace access to the core register file, and because PSTATE.M validation does not prevent unintended execution modes.'}] | 2019-04-03T01:29Z | 2018-10-07T06:29Z | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. |
Input validation is a frequently-used technique
for checking potentially dangerous inputs in order to
ensure that the inputs are safe for processing within the
code, or when communicating with other components. When
software does not validate input properly, an attacker is
able to craft the input in a form that is not expected by
the rest of the application. This will lead to parts of the
system receiving unintended input, which may result in
altered control flow, arbitrary control of a resource, or
arbitrary code execution.
Input validation is not the only technique for
processing input, however. Other techniques attempt to
transform potentially-dangerous input into something safe, such
as filtering (CWE-790) - which attempts to remove dangerous
inputs - or encoding/escaping (CWE-116), which attempts to
ensure that the input is not misinterpreted when it is included
in output to another component. Other techniques exist as well
(see CWE-138 for more examples.)
Input validation can be applied to:
raw data - strings, numbers, parameters, file contents, etc.
metadata - information about the raw data, such as headers or size
Data can be simple or structured. Structured data
can be composed of many nested layers, composed of
combinations of metadata and raw data, with other simple or
structured data.
Many properties of raw data or metadata may need
to be validated upon entry into the code, such
as:
specified quantities such as size, length, frequency, price, rate, number of operations, time, etc.
implied or derived quantities, such as the actual size of a file instead of a specified size
indexes, offsets, or positions into more complex data structures
symbolic keys or other elements into hash tables, associative arrays, etc.
well-formedness, i.e. syntactic correctness - compliance with expected syntax
lexical token correctness - compliance with rules for what is treated as a token
specified or derived type - the actual type of the input (or what the input appears to be)
consistency - between individual data elements, between raw data and metadata, between references, etc.
conformance to domain-specific rules, e.g. business logic
equivalence - ensuring that equivalent inputs are treated the same
authenticity, ownership, or other attestations about the input, e.g. a cryptographic signature to prove the source of the data
Implied or derived properties of data must often
be calculated or inferred by the code itself. Errors in
deriving properties may be considered a contributing factor
to improper input validation.
Note that "input validation" has very different
meanings to different people, or within different
classification schemes. Caution must be used when
referencing this CWE entry or mapping to it. For example,
some weaknesses might involve inadvertently giving control
to an attacker over an input when they should not be able
to provide an input at all, but sometimes this is referred
to as input validation.
Finally, it is important to emphasize that the
distinctions between input validation and output escaping
are often blurred, and developers must be careful to
understand the difference, including how input validation
is not always sufficient to prevent vulnerabilities,
especially when less stringent data types must be
supported, such as free-form text. Consider a SQL injection
scenario in which a person's last name is inserted into a
query. The name "O'Reilly" would likely pass the validation
step since it is a common last name in the English
language. However, this valid name cannot be directly
inserted into the database because it contains the "'"
apostrophe character, which would need to be escaped or
otherwise transformed. In this case, removing the
apostrophe might reduce the risk of SQL injection, but it
would produce incorrect behavior because the wrong name
would be recorded.
| https://cwe.mitre.org/data/definitions/20.html | 0 | Marc Zyngier | 2018-09-27 16:53:22+01:00 | arm64: KVM: Sanitize PSTATE.M when being set from userspace
Not all execution modes are valid for a guest, and some of them
depend on what the HW actually supports. Let's verify that what
userspace provides is compatible with both the VM settings and
the HW capabilities.
Cc: <[email protected]>
Fixes: 0d854a60b1d7 ("arm64: KVM: enable initialization of a 32bit vcpu")
Reviewed-by: Christoffer Dall <[email protected]>
Reviewed-by: Mark Rutland <[email protected]>
Reviewed-by: Dave Martin <[email protected]>
Signed-off-by: Marc Zyngier <[email protected]>
Signed-off-by: Will Deacon <[email protected]> | 2a3f93459d689d990b3ecfbe782fec89b97d3279 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | set_core_reg | set_core_reg( struct kvm_vcpu * vcpu , const struct kvm_one_reg * reg) | ['vcpu', 'reg'] | static int set_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
{
__u32 __user *uaddr = (__u32 __user *)(unsigned long)reg->addr;
struct kvm_regs *regs = vcpu_gp_regs(vcpu);
int nr_regs = sizeof(*regs) / sizeof(__u32);
__uint128_t tmp;
void *valp = &tmp;
u64 off;
int err = 0;
/* Our ID is an index into the kvm_regs struct. */
off = core_reg_offset_from_id(reg->id);
if (off >= nr_regs ||
(off + (KVM_REG_SIZE(reg->id) / sizeof(__u32))) >= nr_regs)
return -ENOENT;
if (validate_core_offset(reg))
return -EINVAL;
if (KVM_REG_SIZE(reg->id) > sizeof(tmp))
return -EINVAL;
if (copy_from_user(valp, uaddr, KVM_REG_SIZE(reg->id))) {
err = -EFAULT;
goto out;
}
if (off == KVM_REG_ARM_CORE_REG(regs.pstate)) {
u32 mode = (*(u32 *)valp) & PSR_AA32_MODE_MASK;
switch (mode) {
case PSR_AA32_MODE_USR:
case PSR_AA32_MODE_FIQ:
case PSR_AA32_MODE_IRQ:
case PSR_AA32_MODE_SVC:
case PSR_AA32_MODE_ABT:
case PSR_AA32_MODE_UND:
case PSR_MODE_EL0t:
case PSR_MODE_EL1t:
case PSR_MODE_EL1h:
break;
default:
err = -EINVAL;
goto out;
}
}
memcpy((u32 *)regs + off, valp, KVM_REG_SIZE(reg->id));
out:
return err;
} | 266 | True | 1 |
|
CVE-2018-18445 | False | False | False | False | AV:L/AC:L/Au:N/C:C/I:C/A:C | LOCAL | LOW | NONE | COMPLETE | COMPLETE | COMPLETE | 7.2 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/b799207e1e1816b09e7a5920fbb2d5fcf6edd681', 'name': 'https://github.com/torvalds/linux/commit/b799207e1e1816b09e7a5920fbb2d5fcf6edd681', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.18.13', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.18.13', 'refsource': 'MISC', 'tags': ['Release Notes', 'Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.14.75', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.14.75', 'refsource': 'MISC', 'tags': ['Release Notes', 'Patch', 'Third Party Advisory']}, {'url': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1686', 'name': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1686', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b799207e1e1816b09e7a5920fbb2d5fcf6edd681', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b799207e1e1816b09e7a5920fbb2d5fcf6edd681', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3832-1/', 'name': 'USN-3832-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3835-1/', 'name': 'USN-3835-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-3/', 'name': 'USN-3847-3', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-2/', 'name': 'USN-3847-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3847-1/', 'name': 'USN-3847-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:0514', 'name': 'RHSA-2019:0514', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:0512', 'name': 'RHSA-2019:0512', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://support.f5.com/csp/article/K38456756', 'name': 'https://support.f5.com/csp/article/K38456756', 'refsource': 'CONFIRM', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.15', 'versionEndIncluding': '4.15.18', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.16', 'versionEndIncluding': '4.16.18', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.17', 'versionEndIncluding': '4.17.9', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.18', 'versionEndExcluding': '4.18.13', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.14', 'versionEndExcluding': '4.14.75', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.6:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In the Linux kernel 4.14.x, 4.15.x, 4.16.x, 4.17.x, and 4.18.x before 4.18.13, faulty computation of numeric bounds in the BPF verifier permits out-of-bounds memory accesses because adjust_scalar_min_max_vals in kernel/bpf/verifier.c mishandles 32-bit right shifts.'}] | 2020-10-15T13:28Z | 2018-10-17T19:29Z | Out-of-bounds Read | The software reads data past the end, or before the beginning, of the intended buffer. | Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/125.html | 0 | Jann Horn | 2018-10-05 18:17:59+02:00 | bpf: 32-bit RSH verification must truncate input before the ALU op
When I wrote commit 468f6eafa6c4 ("bpf: fix 32-bit ALU op verification"), I
assumed that, in order to emulate 64-bit arithmetic with 32-bit logic, it
is sufficient to just truncate the output to 32 bits; and so I just moved
the register size coercion that used to be at the start of the function to
the end of the function.
That assumption is true for almost every op, but not for 32-bit right
shifts, because those can propagate information towards the least
significant bit. Fix it by always truncating inputs for 32-bit ops to 32
bits.
Also get rid of the coerce_reg_to_size() after the ALU op, since that has
no effect.
Fixes: 468f6eafa6c4 ("bpf: fix 32-bit ALU op verification")
Acked-by: Daniel Borkmann <[email protected]>
Signed-off-by: Jann Horn <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]> | b799207e1e1816b09e7a5920fbb2d5fcf6edd681 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | adjust_scalar_min_max_vals | adjust_scalar_min_max_vals( struct bpf_verifier_env * env , struct bpf_insn * insn , struct bpf_reg_state * dst_reg , struct bpf_reg_state src_reg) | ['env', 'insn', 'dst_reg', 'src_reg'] | static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env,
struct bpf_insn *insn,
struct bpf_reg_state *dst_reg,
struct bpf_reg_state src_reg)
{
struct bpf_reg_state *regs = cur_regs(env);
u8 opcode = BPF_OP(insn->code);
bool src_known, dst_known;
s64 smin_val, smax_val;
u64 umin_val, umax_val;
u64 insn_bitness = (BPF_CLASS(insn->code) == BPF_ALU64) ? 64 : 32;
smin_val = src_reg.smin_value;
smax_val = src_reg.smax_value;
umin_val = src_reg.umin_value;
umax_val = src_reg.umax_value;
src_known = tnum_is_const(src_reg.var_off);
dst_known = tnum_is_const(dst_reg->var_off);
if ((src_known && (smin_val != smax_val || umin_val != umax_val)) ||
smin_val > smax_val || umin_val > umax_val) {
/* Taint dst register if offset had invalid bounds derived from
* e.g. dead branches.
*/
__mark_reg_unknown(dst_reg);
return 0;
}
if (!src_known &&
opcode != BPF_ADD && opcode != BPF_SUB && opcode != BPF_AND) {
__mark_reg_unknown(dst_reg);
return 0;
}
switch (opcode) {
case BPF_ADD:
if (signed_add_overflows(dst_reg->smin_value, smin_val) ||
signed_add_overflows(dst_reg->smax_value, smax_val)) {
dst_reg->smin_value = S64_MIN;
dst_reg->smax_value = S64_MAX;
} else {
dst_reg->smin_value += smin_val;
dst_reg->smax_value += smax_val;
}
if (dst_reg->umin_value + umin_val < umin_val ||
dst_reg->umax_value + umax_val < umax_val) {
dst_reg->umin_value = 0;
dst_reg->umax_value = U64_MAX;
} else {
dst_reg->umin_value += umin_val;
dst_reg->umax_value += umax_val;
}
dst_reg->var_off = tnum_add(dst_reg->var_off, src_reg.var_off);
break;
case BPF_SUB:
if (signed_sub_overflows(dst_reg->smin_value, smax_val) ||
signed_sub_overflows(dst_reg->smax_value, smin_val)) {
/* Overflow possible, we know nothing */
dst_reg->smin_value = S64_MIN;
dst_reg->smax_value = S64_MAX;
} else {
dst_reg->smin_value -= smax_val;
dst_reg->smax_value -= smin_val;
}
if (dst_reg->umin_value < umax_val) {
/* Overflow possible, we know nothing */
dst_reg->umin_value = 0;
dst_reg->umax_value = U64_MAX;
} else {
/* Cannot overflow (as long as bounds are consistent) */
dst_reg->umin_value -= umax_val;
dst_reg->umax_value -= umin_val;
}
dst_reg->var_off = tnum_sub(dst_reg->var_off, src_reg.var_off);
break;
case BPF_MUL:
dst_reg->var_off = tnum_mul(dst_reg->var_off, src_reg.var_off);
if (smin_val < 0 || dst_reg->smin_value < 0) {
/* Ain't nobody got time to multiply that sign */
__mark_reg_unbounded(dst_reg);
__update_reg_bounds(dst_reg);
break;
}
/* Both values are positive, so we can work with unsigned and
* copy the result to signed (unless it exceeds S64_MAX).
*/
if (umax_val > U32_MAX || dst_reg->umax_value > U32_MAX) {
/* Potential overflow, we know nothing */
__mark_reg_unbounded(dst_reg);
/* (except what we can learn from the var_off) */
__update_reg_bounds(dst_reg);
break;
}
dst_reg->umin_value *= umin_val;
dst_reg->umax_value *= umax_val;
if (dst_reg->umax_value > S64_MAX) {
/* Overflow possible, we know nothing */
dst_reg->smin_value = S64_MIN;
dst_reg->smax_value = S64_MAX;
} else {
dst_reg->smin_value = dst_reg->umin_value;
dst_reg->smax_value = dst_reg->umax_value;
}
break;
case BPF_AND:
if (src_known && dst_known) {
__mark_reg_known(dst_reg, dst_reg->var_off.value &
src_reg.var_off.value);
break;
}
/* We get our minimum from the var_off, since that's inherently
* bitwise. Our maximum is the minimum of the operands' maxima.
*/
dst_reg->var_off = tnum_and(dst_reg->var_off, src_reg.var_off);
dst_reg->umin_value = dst_reg->var_off.value;
dst_reg->umax_value = min(dst_reg->umax_value, umax_val);
if (dst_reg->smin_value < 0 || smin_val < 0) {
/* Lose signed bounds when ANDing negative numbers,
* ain't nobody got time for that.
*/
dst_reg->smin_value = S64_MIN;
dst_reg->smax_value = S64_MAX;
} else {
/* ANDing two positives gives a positive, so safe to
* cast result into s64.
*/
dst_reg->smin_value = dst_reg->umin_value;
dst_reg->smax_value = dst_reg->umax_value;
}
/* We may learn something more from the var_off */
__update_reg_bounds(dst_reg);
break;
case BPF_OR:
if (src_known && dst_known) {
__mark_reg_known(dst_reg, dst_reg->var_off.value |
src_reg.var_off.value);
break;
}
/* We get our maximum from the var_off, and our minimum is the
* maximum of the operands' minima
*/
dst_reg->var_off = tnum_or(dst_reg->var_off, src_reg.var_off);
dst_reg->umin_value = max(dst_reg->umin_value, umin_val);
dst_reg->umax_value = dst_reg->var_off.value |
dst_reg->var_off.mask;
if (dst_reg->smin_value < 0 || smin_val < 0) {
/* Lose signed bounds when ORing negative numbers,
* ain't nobody got time for that.
*/
dst_reg->smin_value = S64_MIN;
dst_reg->smax_value = S64_MAX;
} else {
/* ORing two positives gives a positive, so safe to
* cast result into s64.
*/
dst_reg->smin_value = dst_reg->umin_value;
dst_reg->smax_value = dst_reg->umax_value;
}
/* We may learn something more from the var_off */
__update_reg_bounds(dst_reg);
break;
case BPF_LSH:
if (umax_val >= insn_bitness) {
/* Shifts greater than 31 or 63 are undefined.
* This includes shifts by a negative number.
*/
mark_reg_unknown(env, regs, insn->dst_reg);
break;
}
/* We lose all sign bit information (except what we can pick
* up from var_off)
*/
dst_reg->smin_value = S64_MIN;
dst_reg->smax_value = S64_MAX;
/* If we might shift our top bit out, then we know nothing */
if (dst_reg->umax_value > 1ULL << (63 - umax_val)) {
dst_reg->umin_value = 0;
dst_reg->umax_value = U64_MAX;
} else {
dst_reg->umin_value <<= umin_val;
dst_reg->umax_value <<= umax_val;
}
dst_reg->var_off = tnum_lshift(dst_reg->var_off, umin_val);
/* We may learn something more from the var_off */
__update_reg_bounds(dst_reg);
break;
case BPF_RSH:
if (umax_val >= insn_bitness) {
/* Shifts greater than 31 or 63 are undefined.
* This includes shifts by a negative number.
*/
mark_reg_unknown(env, regs, insn->dst_reg);
break;
}
/* BPF_RSH is an unsigned shift. If the value in dst_reg might
* be negative, then either:
* 1) src_reg might be zero, so the sign bit of the result is
* unknown, so we lose our signed bounds
* 2) it's known negative, thus the unsigned bounds capture the
* signed bounds
* 3) the signed bounds cross zero, so they tell us nothing
* about the result
* If the value in dst_reg is known nonnegative, then again the
* unsigned bounts capture the signed bounds.
* Thus, in all cases it suffices to blow away our signed bounds
* and rely on inferring new ones from the unsigned bounds and
* var_off of the result.
*/
dst_reg->smin_value = S64_MIN;
dst_reg->smax_value = S64_MAX;
dst_reg->var_off = tnum_rshift(dst_reg->var_off, umin_val);
dst_reg->umin_value >>= umax_val;
dst_reg->umax_value >>= umin_val;
/* We may learn something more from the var_off */
__update_reg_bounds(dst_reg);
break;
case BPF_ARSH:
if (umax_val >= insn_bitness) {
/* Shifts greater than 31 or 63 are undefined.
* This includes shifts by a negative number.
*/
mark_reg_unknown(env, regs, insn->dst_reg);
break;
}
/* Upon reaching here, src_known is true and
* umax_val is equal to umin_val.
*/
dst_reg->smin_value >>= umin_val;
dst_reg->smax_value >>= umin_val;
dst_reg->var_off = tnum_arshift(dst_reg->var_off, umin_val);
/* blow away the dst_reg umin_value/umax_value and rely on
* dst_reg var_off to refine the result.
*/
dst_reg->umin_value = 0;
dst_reg->umax_value = U64_MAX;
__update_reg_bounds(dst_reg);
break;
default:
mark_reg_unknown(env, regs, insn->dst_reg);
break;
}
if (BPF_CLASS(insn->code) != BPF_ALU64) {
/* 32-bit ALU ops are (32,32)->32 */
coerce_reg_to_size(dst_reg, 4);
coerce_reg_to_size(&src_reg, 4);
}
__reg_deduce_bounds(dst_reg);
__reg_bound_offset(dst_reg);
return 0;
} | 1072 | True | 1 |
|
CVE-2018-20854 | False | False | False | False | AV:L/AC:L/Au:N/C:P/I:P/A:P | LOCAL | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 4.6 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/6acb47d1a318e5b3b7115354ebc4ea060c59d3a1', 'name': 'https://github.com/torvalds/linux/commit/6acb47d1a318e5b3b7115354ebc4ea060c59d3a1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6acb47d1a318e5b3b7115354ebc4ea060c59d3a1', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6acb47d1a318e5b3b7115354ebc4ea060c59d3a1', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20190905-0002/', 'name': 'https://security.netapp.com/advisory/ntap-20190905-0002/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K32450233', 'name': 'https://support.f5.com/csp/article/K32450233', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K32450233?utm_source=f5support&utm_medium=RSS', 'name': 'https://support.f5.com/csp/article/K32450233?utm_source=f5support&utm_medium=RSS', 'refsource': 'CONFIRM', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.20', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel before 4.20. drivers/phy/mscc/phy-ocelot-serdes.c has an off-by-one error with a resultant ctrl->phys out-of-bounds read.'}] | 2019-09-06T00:15Z | 2019-07-26T05:15Z | Out-of-bounds Read | The software reads data past the end, or before the beginning, of the intended buffer. | Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/125.html | 0 | Gustavo A. R. Silva | 2018-10-19 11:21:38+02:00 | phy: ocelot-serdes: fix out-of-bounds read
Currently, there is an out-of-bounds read on array ctrl->phys,
once variable i reaches the maximum array size of SERDES_MAX
in the for loop.
Fix this by changing the condition in the for loop from
i <= SERDES_MAX to i < SERDES_MAX.
Addresses-Coverity-ID: 1473966 ("Out-of-bounds read")
Addresses-Coverity-ID: 1473959 ("Out-of-bounds read")
Fixes: 51f6b410fc22 ("phy: add driver for Microsemi Ocelot SerDes muxing")
Reviewed-by: Quentin Schulz <[email protected]>
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: David S. Miller <[email protected]> | 6acb47d1a318e5b3b7115354ebc4ea060c59d3a1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | serdes_probe | serdes_probe( struct platform_device * pdev) | ['pdev'] | static int serdes_probe(struct platform_device *pdev)
{
struct phy_provider *provider;
struct serdes_ctrl *ctrl;
unsigned int i;
int ret;
ctrl = devm_kzalloc(&pdev->dev, sizeof(*ctrl), GFP_KERNEL);
if (!ctrl)
return -ENOMEM;
ctrl->dev = &pdev->dev;
ctrl->regs = syscon_node_to_regmap(pdev->dev.parent->of_node);
if (IS_ERR(ctrl->regs))
return PTR_ERR(ctrl->regs);
for (i = 0; i <= SERDES_MAX; i++) {
ret = serdes_phy_create(ctrl, i, &ctrl->phys[i]);
if (ret)
return ret;
}
dev_set_drvdata(&pdev->dev, ctrl);
provider = devm_of_phy_provider_register(ctrl->dev,
serdes_simple_xlate);
return PTR_ERR_OR_ZERO(provider);
} | 160 | True | 1 |
|
CVE-2018-20854 | False | False | False | False | AV:L/AC:L/Au:N/C:P/I:P/A:P | LOCAL | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 4.6 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/6acb47d1a318e5b3b7115354ebc4ea060c59d3a1', 'name': 'https://github.com/torvalds/linux/commit/6acb47d1a318e5b3b7115354ebc4ea060c59d3a1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6acb47d1a318e5b3b7115354ebc4ea060c59d3a1', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6acb47d1a318e5b3b7115354ebc4ea060c59d3a1', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20190905-0002/', 'name': 'https://security.netapp.com/advisory/ntap-20190905-0002/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K32450233', 'name': 'https://support.f5.com/csp/article/K32450233', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K32450233?utm_source=f5support&utm_medium=RSS', 'name': 'https://support.f5.com/csp/article/K32450233?utm_source=f5support&utm_medium=RSS', 'refsource': 'CONFIRM', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.20', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel before 4.20. drivers/phy/mscc/phy-ocelot-serdes.c has an off-by-one error with a resultant ctrl->phys out-of-bounds read.'}] | 2019-09-06T00:15Z | 2019-07-26T05:15Z | Out-of-bounds Read | The software reads data past the end, or before the beginning, of the intended buffer. | Typically, this can allow attackers to read sensitive information from other memory locations or cause a crash. A crash can occur when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string. The expected sentinel might not be located in the out-of-bounds memory, causing excessive data to be read, leading to a segmentation fault or a buffer overflow. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent read operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/125.html | 0 | Gustavo A. R. Silva | 2018-10-19 11:21:38+02:00 | phy: ocelot-serdes: fix out-of-bounds read
Currently, there is an out-of-bounds read on array ctrl->phys,
once variable i reaches the maximum array size of SERDES_MAX
in the for loop.
Fix this by changing the condition in the for loop from
i <= SERDES_MAX to i < SERDES_MAX.
Addresses-Coverity-ID: 1473966 ("Out-of-bounds read")
Addresses-Coverity-ID: 1473959 ("Out-of-bounds read")
Fixes: 51f6b410fc22 ("phy: add driver for Microsemi Ocelot SerDes muxing")
Reviewed-by: Quentin Schulz <[email protected]>
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: David S. Miller <[email protected]> | 6acb47d1a318e5b3b7115354ebc4ea060c59d3a1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | serdes_simple_xlate | serdes_simple_xlate( struct device * dev , struct of_phandle_args * args) | ['dev', 'args'] | static struct phy *serdes_simple_xlate(struct device *dev,
struct of_phandle_args *args)
{
struct serdes_ctrl *ctrl = dev_get_drvdata(dev);
unsigned int port, idx, i;
if (args->args_count != 2)
return ERR_PTR(-EINVAL);
port = args->args[0];
idx = args->args[1];
for (i = 0; i <= SERDES_MAX; i++) {
struct serdes_macro *macro = phy_get_drvdata(ctrl->phys[i]);
if (idx != macro->idx)
continue;
/* SERDES6G(0) is the only SerDes capable of QSGMII */
if (idx != SERDES6G(0) && macro->port >= 0)
return ERR_PTR(-EBUSY);
macro->port = port;
return ctrl->phys[i];
}
return ERR_PTR(-ENODEV);
} | 148 | True | 1 |
|
CVE-2018-18955 | False | False | False | False | AV:L/AC:M/Au:N/C:P/I:P/A:P | LOCAL | MEDIUM | NONE | PARTIAL | PARTIAL | PARTIAL | 4.4 | CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H | LOCAL | HIGH | LOW | NONE | UNCHANGED | HIGH | HIGH | HIGH | 7.0 | HIGH | 1.0 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/d2f007dbe7e4c9583eea6eb04d60001e85c6f1bd', 'name': 'https://github.com/torvalds/linux/commit/d2f007dbe7e4c9583eea6eb04d60001e85c6f1bd', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.2', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.2', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.18.19', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.18.19', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1712', 'name': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1712', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d2f007dbe7e4c9583eea6eb04d60001e85c6f1bd', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d2f007dbe7e4c9583eea6eb04d60001e85c6f1bd', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/105941', 'name': '105941', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://www.exploit-db.com/exploits/45886/', 'name': '45886', 'refsource': 'EXPLOIT-DB', 'tags': ['Exploit', 'Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://usn.ubuntu.com/3833-1/', 'name': 'USN-3833-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3832-1/', 'name': 'USN-3832-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://www.exploit-db.com/exploits/45915/', 'name': '45915', 'refsource': 'EXPLOIT-DB', 'tags': ['Exploit', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://usn.ubuntu.com/3836-2/', 'name': 'USN-3836-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3836-1/', 'name': 'USN-3836-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3835-1/', 'name': 'USN-3835-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://support.f5.com/csp/article/K39103040', 'name': 'https://support.f5.com/csp/article/K39103040', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://security.netapp.com/advisory/ntap-20190416-0003/', 'name': 'https://security.netapp.com/advisory/ntap-20190416-0003/', 'refsource': 'CONFIRM', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-863'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.15', 'versionEndExcluding': '4.19.2', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In the Linux kernel 4.15.x through 4.19.x before 4.19.2, map_write() in kernel/user_namespace.c allows privilege escalation because it mishandles nested user namespaces with more than 5 UID or GID ranges. A user who has CAP_SYS_ADMIN in an affected user namespace can bypass access controls on resources outside the namespace, as demonstrated by reading /etc/shadow. This occurs because an ID transformation takes place properly for the namespaced-to-kernel direction but not for the kernel-to-namespaced direction.'}] | 2020-08-24T17:37Z | 2018-11-16T20:29Z | Incorrect Authorization | The software performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions. |
Assuming a user with a given identity, authorization is the process of determining whether that user can access a given resource, based on the user's privileges and any permissions or other access-control specifications that apply to the resource.
When access control checks are incorrectly applied, users are able to access data or perform actions that they should not be allowed to perform. This can lead to a wide range of problems, including information exposures, denial of service, and arbitrary code execution.
| https://cwe.mitre.org/data/definitions/863.html | 0 | Jann Horn | 2018-11-05 20:55:09+01:00 | userns: also map extents in the reverse map to kernel IDs
The current logic first clones the extent array and sorts both copies, then
maps the lower IDs of the forward mapping into the lower namespace, but
doesn't map the lower IDs of the reverse mapping.
This means that code in a nested user namespace with >5 extents will see
incorrect IDs. It also breaks some access checks, like
inode_owner_or_capable() and privileged_wrt_inode_uidgid(), so a process
can incorrectly appear to be capable relative to an inode.
To fix it, we have to make sure that the "lower_first" members of extents
in both arrays are translated; and we have to make sure that the reverse
map is sorted *after* the translation (since otherwise the translation can
break the sorting).
This is CVE-2018-18955.
Fixes: 6397fac4915a ("userns: bump idmap limits to 340")
Cc: [email protected]
Signed-off-by: Jann Horn <[email protected]>
Tested-by: Eric W. Biederman <[email protected]>
Reviewed-by: Eric W. Biederman <[email protected]>
Signed-off-by: Eric W. Biederman <[email protected]> | d2f007dbe7e4c9583eea6eb04d60001e85c6f1bd | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | map_write | map_write( struct file * file , const char __user * buf , size_t count , loff_t * ppos , int cap_setid , struct uid_gid_map * map , struct uid_gid_map * parent_map) | ['file', 'buf', 'count', 'ppos', 'cap_setid', 'map', 'parent_map'] | static ssize_t map_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos,
int cap_setid,
struct uid_gid_map *map,
struct uid_gid_map *parent_map)
{
struct seq_file *seq = file->private_data;
struct user_namespace *ns = seq->private;
struct uid_gid_map new_map;
unsigned idx;
struct uid_gid_extent extent;
char *kbuf = NULL, *pos, *next_line;
ssize_t ret;
/* Only allow < page size writes at the beginning of the file */
if ((*ppos != 0) || (count >= PAGE_SIZE))
return -EINVAL;
/* Slurp in the user data */
kbuf = memdup_user_nul(buf, count);
if (IS_ERR(kbuf))
return PTR_ERR(kbuf);
/*
* The userns_state_mutex serializes all writes to any given map.
*
* Any map is only ever written once.
*
* An id map fits within 1 cache line on most architectures.
*
* On read nothing needs to be done unless you are on an
* architecture with a crazy cache coherency model like alpha.
*
* There is a one time data dependency between reading the
* count of the extents and the values of the extents. The
* desired behavior is to see the values of the extents that
* were written before the count of the extents.
*
* To achieve this smp_wmb() is used on guarantee the write
* order and smp_rmb() is guaranteed that we don't have crazy
* architectures returning stale data.
*/
mutex_lock(&userns_state_mutex);
memset(&new_map, 0, sizeof(struct uid_gid_map));
ret = -EPERM;
/* Only allow one successful write to the map */
if (map->nr_extents != 0)
goto out;
/*
* Adjusting namespace settings requires capabilities on the target.
*/
if (cap_valid(cap_setid) && !file_ns_capable(file, ns, CAP_SYS_ADMIN))
goto out;
/* Parse the user data */
ret = -EINVAL;
pos = kbuf;
for (; pos; pos = next_line) {
/* Find the end of line and ensure I don't look past it */
next_line = strchr(pos, '\n');
if (next_line) {
*next_line = '\0';
next_line++;
if (*next_line == '\0')
next_line = NULL;
}
pos = skip_spaces(pos);
extent.first = simple_strtoul(pos, &pos, 10);
if (!isspace(*pos))
goto out;
pos = skip_spaces(pos);
extent.lower_first = simple_strtoul(pos, &pos, 10);
if (!isspace(*pos))
goto out;
pos = skip_spaces(pos);
extent.count = simple_strtoul(pos, &pos, 10);
if (*pos && !isspace(*pos))
goto out;
/* Verify there is not trailing junk on the line */
pos = skip_spaces(pos);
if (*pos != '\0')
goto out;
/* Verify we have been given valid starting values */
if ((extent.first == (u32) -1) ||
(extent.lower_first == (u32) -1))
goto out;
/* Verify count is not zero and does not cause the
* extent to wrap
*/
if ((extent.first + extent.count) <= extent.first)
goto out;
if ((extent.lower_first + extent.count) <=
extent.lower_first)
goto out;
/* Do the ranges in extent overlap any previous extents? */
if (mappings_overlap(&new_map, &extent))
goto out;
if ((new_map.nr_extents + 1) == UID_GID_MAP_MAX_EXTENTS &&
(next_line != NULL))
goto out;
ret = insert_extent(&new_map, &extent);
if (ret < 0)
goto out;
ret = -EINVAL;
}
/* Be very certaint the new map actually exists */
if (new_map.nr_extents == 0)
goto out;
ret = -EPERM;
/* Validate the user is allowed to use user id's mapped to. */
if (!new_idmap_permitted(file, ns, cap_setid, &new_map))
goto out;
ret = sort_idmaps(&new_map);
if (ret < 0)
goto out;
ret = -EPERM;
/* Map the lower ids from the parent user namespace to the
* kernel global id space.
*/
for (idx = 0; idx < new_map.nr_extents; idx++) {
struct uid_gid_extent *e;
u32 lower_first;
if (new_map.nr_extents <= UID_GID_MAP_MAX_BASE_EXTENTS)
e = &new_map.extent[idx];
else
e = &new_map.forward[idx];
lower_first = map_id_range_down(parent_map,
e->lower_first,
e->count);
/* Fail if we can not map the specified extent to
* the kernel global id space.
*/
if (lower_first == (u32) -1)
goto out;
e->lower_first = lower_first;
}
/* Install the map */
if (new_map.nr_extents <= UID_GID_MAP_MAX_BASE_EXTENTS) {
memcpy(map->extent, new_map.extent,
new_map.nr_extents * sizeof(new_map.extent[0]));
} else {
map->forward = new_map.forward;
map->reverse = new_map.reverse;
}
smp_wmb();
map->nr_extents = new_map.nr_extents;
*ppos = count;
ret = count;
out:
if (ret < 0 && new_map.nr_extents > UID_GID_MAP_MAX_BASE_EXTENTS) {
kfree(new_map.forward);
kfree(new_map.reverse);
map->forward = NULL;
map->reverse = NULL;
map->nr_extents = 0;
}
mutex_unlock(&userns_state_mutex);
kfree(kbuf);
return ret;
} | 757 | True | 1 |
|
CVE-2018-19854 | False | False | False | False | AV:L/AC:M/Au:N/C:P/I:N/A:N | LOCAL | MEDIUM | NONE | PARTIAL | NONE | NONE | 1.9 | CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N | LOCAL | HIGH | LOW | NONE | UNCHANGED | HIGH | NONE | NONE | 4.7 | MEDIUM | 1.0 | 3.6 | False | [{'url': 'https://kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.3', 'name': 'https://kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.3', 'refsource': 'MISC', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f43f39958beb206b53292801e216d9b8a660f087', 'name': 'https://github.com/torvalds/linux/commit/f43f39958beb206b53292801e216d9b8a660f087', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f43f39958beb206b53292801e216d9b8a660f087', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f43f39958beb206b53292801e216d9b8a660f087', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3872-1/', 'name': 'USN-3872-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3878-1/', 'name': 'USN-3878-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3878-2/', 'name': 'USN-3878-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3901-2/', 'name': 'USN-3901-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3901-1/', 'name': 'USN-3901-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3517', 'name': 'RHSA-2019:3517', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3309', 'name': 'RHSA-2019:3309', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-200'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.19.3', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel before 4.19.3. crypto_report_one() and related functions in crypto/crypto_user.c (the crypto user configuration API) do not fully initialize structures that are copied to userspace, potentially leaking sensitive memory to user programs. NOTE: this is a CVE-2013-2547 regression but with easier exploitability because the attacker does not need a capability (however, the system must have the CONFIG_CRYPTO_USER kconfig option).'}] | 2019-11-06T01:15Z | 2018-12-04T16:29Z | Exposure of Sensitive Information to an Unauthorized Actor | The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. |
There are many different kinds of mistakes that introduce information exposures. The severity of the error can range widely, depending on the context in which the product operates, the type of sensitive information that is revealed, and the benefits it may provide to an attacker. Some kinds of sensitive information include:
private, personal information, such as personal messages, financial data, health records, geographic location, or contact details
system status and environment, such as the operating system and installed packages
business secrets and intellectual property
network status and configuration
the product's own code or internal state
metadata, e.g. logging of connections or message headers
indirect information, such as a discrepancy between two internal operations that can be observed by an outsider
Information might be sensitive to different parties, each of which may have their own expectations for whether the information should be protected. These parties include:
the product's own users
people or organizations whose information is created or used by the product, even if they are not direct product users
the product's administrators, including the admins of the system(s) and/or networks on which the product operates
the developer
Information exposures can occur in different ways:
the code explicitly inserts sensitive information into resources or messages that are intentionally made accessible to unauthorized actors, but should not contain the information - i.e., the information should have been "scrubbed" or "sanitized"
a different weakness or mistake indirectly inserts the sensitive information into resources, such as a web script error revealing the full system path of the program.
the code manages resources that intentionally contain sensitive information, but the resources are unintentionally made accessible to unauthorized actors. In this case, the information exposure is resultant - i.e., a different weakness enabled the access to the information in the first place.
It is common practice to describe any loss of confidentiality as an "information exposure," but this can lead to overuse of CWE-200 in CWE mapping. From the CWE perspective, loss of confidentiality is a technical impact that can arise from dozens of different weaknesses, such as insecure file permissions or out-of-bounds read. CWE-200 and its lower-level descendants are intended to cover the mistakes that occur in behaviors that explicitly manage, store, transfer, or cleanse sensitive information.
| https://cwe.mitre.org/data/definitions/200.html | 0 | Eric Biggers | 2018-11-03 14:56:00-07:00 | crypto: user - fix leaking uninitialized memory to userspace
All bytes of the NETLINK_CRYPTO report structures must be initialized,
since they are copied to userspace. The change from strncpy() to
strlcpy() broke this. As a minimal fix, change it back.
Fixes: 4473710df1f8 ("crypto: user - Prepare for CRYPTO_MAX_ALG_NAME expansion")
Cc: <[email protected]> # v4.12+
Signed-off-by: Eric Biggers <[email protected]>
Signed-off-by: Herbert Xu <[email protected]> | f43f39958beb206b53292801e216d9b8a660f087 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | crypto_report_acomp | crypto_report_acomp( struct sk_buff * skb , struct crypto_alg * alg) | ['skb', 'alg'] | static int crypto_report_acomp(struct sk_buff *skb, struct crypto_alg *alg)
{
struct crypto_report_acomp racomp;
strlcpy(racomp.type, "acomp", sizeof(racomp.type));
if (nla_put(skb, CRYPTOCFGA_REPORT_ACOMP,
sizeof(struct crypto_report_acomp), &racomp))
goto nla_put_failure;
return 0;
nla_put_failure:
return -EMSGSIZE;
} | 64 | True | 1 |
|
CVE-2018-19854 | False | False | False | False | AV:L/AC:M/Au:N/C:P/I:N/A:N | LOCAL | MEDIUM | NONE | PARTIAL | NONE | NONE | 1.9 | CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N | LOCAL | HIGH | LOW | NONE | UNCHANGED | HIGH | NONE | NONE | 4.7 | MEDIUM | 1.0 | 3.6 | False | [{'url': 'https://kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.3', 'name': 'https://kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.3', 'refsource': 'MISC', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f43f39958beb206b53292801e216d9b8a660f087', 'name': 'https://github.com/torvalds/linux/commit/f43f39958beb206b53292801e216d9b8a660f087', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f43f39958beb206b53292801e216d9b8a660f087', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f43f39958beb206b53292801e216d9b8a660f087', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3872-1/', 'name': 'USN-3872-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3878-1/', 'name': 'USN-3878-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3878-2/', 'name': 'USN-3878-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3901-2/', 'name': 'USN-3901-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3901-1/', 'name': 'USN-3901-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3517', 'name': 'RHSA-2019:3517', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3309', 'name': 'RHSA-2019:3309', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-200'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.19.3', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel before 4.19.3. crypto_report_one() and related functions in crypto/crypto_user.c (the crypto user configuration API) do not fully initialize structures that are copied to userspace, potentially leaking sensitive memory to user programs. NOTE: this is a CVE-2013-2547 regression but with easier exploitability because the attacker does not need a capability (however, the system must have the CONFIG_CRYPTO_USER kconfig option).'}] | 2019-11-06T01:15Z | 2018-12-04T16:29Z | Exposure of Sensitive Information to an Unauthorized Actor | The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. |
There are many different kinds of mistakes that introduce information exposures. The severity of the error can range widely, depending on the context in which the product operates, the type of sensitive information that is revealed, and the benefits it may provide to an attacker. Some kinds of sensitive information include:
private, personal information, such as personal messages, financial data, health records, geographic location, or contact details
system status and environment, such as the operating system and installed packages
business secrets and intellectual property
network status and configuration
the product's own code or internal state
metadata, e.g. logging of connections or message headers
indirect information, such as a discrepancy between two internal operations that can be observed by an outsider
Information might be sensitive to different parties, each of which may have their own expectations for whether the information should be protected. These parties include:
the product's own users
people or organizations whose information is created or used by the product, even if they are not direct product users
the product's administrators, including the admins of the system(s) and/or networks on which the product operates
the developer
Information exposures can occur in different ways:
the code explicitly inserts sensitive information into resources or messages that are intentionally made accessible to unauthorized actors, but should not contain the information - i.e., the information should have been "scrubbed" or "sanitized"
a different weakness or mistake indirectly inserts the sensitive information into resources, such as a web script error revealing the full system path of the program.
the code manages resources that intentionally contain sensitive information, but the resources are unintentionally made accessible to unauthorized actors. In this case, the information exposure is resultant - i.e., a different weakness enabled the access to the information in the first place.
It is common practice to describe any loss of confidentiality as an "information exposure," but this can lead to overuse of CWE-200 in CWE mapping. From the CWE perspective, loss of confidentiality is a technical impact that can arise from dozens of different weaknesses, such as insecure file permissions or out-of-bounds read. CWE-200 and its lower-level descendants are intended to cover the mistakes that occur in behaviors that explicitly manage, store, transfer, or cleanse sensitive information.
| https://cwe.mitre.org/data/definitions/200.html | 0 | Eric Biggers | 2018-11-03 14:56:00-07:00 | crypto: user - fix leaking uninitialized memory to userspace
All bytes of the NETLINK_CRYPTO report structures must be initialized,
since they are copied to userspace. The change from strncpy() to
strlcpy() broke this. As a minimal fix, change it back.
Fixes: 4473710df1f8 ("crypto: user - Prepare for CRYPTO_MAX_ALG_NAME expansion")
Cc: <[email protected]> # v4.12+
Signed-off-by: Eric Biggers <[email protected]>
Signed-off-by: Herbert Xu <[email protected]> | f43f39958beb206b53292801e216d9b8a660f087 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | crypto_report_akcipher | crypto_report_akcipher( struct sk_buff * skb , struct crypto_alg * alg) | ['skb', 'alg'] | static int crypto_report_akcipher(struct sk_buff *skb, struct crypto_alg *alg)
{
struct crypto_report_akcipher rakcipher;
strlcpy(rakcipher.type, "akcipher", sizeof(rakcipher.type));
if (nla_put(skb, CRYPTOCFGA_REPORT_AKCIPHER,
sizeof(struct crypto_report_akcipher), &rakcipher))
goto nla_put_failure;
return 0;
nla_put_failure:
return -EMSGSIZE;
} | 64 | True | 1 |
|
CVE-2018-19854 | False | False | False | False | AV:L/AC:M/Au:N/C:P/I:N/A:N | LOCAL | MEDIUM | NONE | PARTIAL | NONE | NONE | 1.9 | CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N | LOCAL | HIGH | LOW | NONE | UNCHANGED | HIGH | NONE | NONE | 4.7 | MEDIUM | 1.0 | 3.6 | False | [{'url': 'https://kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.3', 'name': 'https://kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.3', 'refsource': 'MISC', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f43f39958beb206b53292801e216d9b8a660f087', 'name': 'https://github.com/torvalds/linux/commit/f43f39958beb206b53292801e216d9b8a660f087', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f43f39958beb206b53292801e216d9b8a660f087', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f43f39958beb206b53292801e216d9b8a660f087', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3872-1/', 'name': 'USN-3872-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3878-1/', 'name': 'USN-3878-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3878-2/', 'name': 'USN-3878-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3901-2/', 'name': 'USN-3901-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3901-1/', 'name': 'USN-3901-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3517', 'name': 'RHSA-2019:3517', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3309', 'name': 'RHSA-2019:3309', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-200'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.19.3', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel before 4.19.3. crypto_report_one() and related functions in crypto/crypto_user.c (the crypto user configuration API) do not fully initialize structures that are copied to userspace, potentially leaking sensitive memory to user programs. NOTE: this is a CVE-2013-2547 regression but with easier exploitability because the attacker does not need a capability (however, the system must have the CONFIG_CRYPTO_USER kconfig option).'}] | 2019-11-06T01:15Z | 2018-12-04T16:29Z | Exposure of Sensitive Information to an Unauthorized Actor | The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. |
There are many different kinds of mistakes that introduce information exposures. The severity of the error can range widely, depending on the context in which the product operates, the type of sensitive information that is revealed, and the benefits it may provide to an attacker. Some kinds of sensitive information include:
private, personal information, such as personal messages, financial data, health records, geographic location, or contact details
system status and environment, such as the operating system and installed packages
business secrets and intellectual property
network status and configuration
the product's own code or internal state
metadata, e.g. logging of connections or message headers
indirect information, such as a discrepancy between two internal operations that can be observed by an outsider
Information might be sensitive to different parties, each of which may have their own expectations for whether the information should be protected. These parties include:
the product's own users
people or organizations whose information is created or used by the product, even if they are not direct product users
the product's administrators, including the admins of the system(s) and/or networks on which the product operates
the developer
Information exposures can occur in different ways:
the code explicitly inserts sensitive information into resources or messages that are intentionally made accessible to unauthorized actors, but should not contain the information - i.e., the information should have been "scrubbed" or "sanitized"
a different weakness or mistake indirectly inserts the sensitive information into resources, such as a web script error revealing the full system path of the program.
the code manages resources that intentionally contain sensitive information, but the resources are unintentionally made accessible to unauthorized actors. In this case, the information exposure is resultant - i.e., a different weakness enabled the access to the information in the first place.
It is common practice to describe any loss of confidentiality as an "information exposure," but this can lead to overuse of CWE-200 in CWE mapping. From the CWE perspective, loss of confidentiality is a technical impact that can arise from dozens of different weaknesses, such as insecure file permissions or out-of-bounds read. CWE-200 and its lower-level descendants are intended to cover the mistakes that occur in behaviors that explicitly manage, store, transfer, or cleanse sensitive information.
| https://cwe.mitre.org/data/definitions/200.html | 0 | Eric Biggers | 2018-11-03 14:56:00-07:00 | crypto: user - fix leaking uninitialized memory to userspace
All bytes of the NETLINK_CRYPTO report structures must be initialized,
since they are copied to userspace. The change from strncpy() to
strlcpy() broke this. As a minimal fix, change it back.
Fixes: 4473710df1f8 ("crypto: user - Prepare for CRYPTO_MAX_ALG_NAME expansion")
Cc: <[email protected]> # v4.12+
Signed-off-by: Eric Biggers <[email protected]>
Signed-off-by: Herbert Xu <[email protected]> | f43f39958beb206b53292801e216d9b8a660f087 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | crypto_report_cipher | crypto_report_cipher( struct sk_buff * skb , struct crypto_alg * alg) | ['skb', 'alg'] | static int crypto_report_cipher(struct sk_buff *skb, struct crypto_alg *alg)
{
struct crypto_report_cipher rcipher;
strlcpy(rcipher.type, "cipher", sizeof(rcipher.type));
rcipher.blocksize = alg->cra_blocksize;
rcipher.min_keysize = alg->cra_cipher.cia_min_keysize;
rcipher.max_keysize = alg->cra_cipher.cia_max_keysize;
if (nla_put(skb, CRYPTOCFGA_REPORT_CIPHER,
sizeof(struct crypto_report_cipher), &rcipher))
goto nla_put_failure;
return 0;
nla_put_failure:
return -EMSGSIZE;
} | 92 | True | 1 |
|
CVE-2018-19854 | False | False | False | False | AV:L/AC:M/Au:N/C:P/I:N/A:N | LOCAL | MEDIUM | NONE | PARTIAL | NONE | NONE | 1.9 | CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N | LOCAL | HIGH | LOW | NONE | UNCHANGED | HIGH | NONE | NONE | 4.7 | MEDIUM | 1.0 | 3.6 | False | [{'url': 'https://kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.3', 'name': 'https://kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.3', 'refsource': 'MISC', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f43f39958beb206b53292801e216d9b8a660f087', 'name': 'https://github.com/torvalds/linux/commit/f43f39958beb206b53292801e216d9b8a660f087', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f43f39958beb206b53292801e216d9b8a660f087', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f43f39958beb206b53292801e216d9b8a660f087', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3872-1/', 'name': 'USN-3872-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3878-1/', 'name': 'USN-3878-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3878-2/', 'name': 'USN-3878-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3901-2/', 'name': 'USN-3901-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3901-1/', 'name': 'USN-3901-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3517', 'name': 'RHSA-2019:3517', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3309', 'name': 'RHSA-2019:3309', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-200'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.19.3', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel before 4.19.3. crypto_report_one() and related functions in crypto/crypto_user.c (the crypto user configuration API) do not fully initialize structures that are copied to userspace, potentially leaking sensitive memory to user programs. NOTE: this is a CVE-2013-2547 regression but with easier exploitability because the attacker does not need a capability (however, the system must have the CONFIG_CRYPTO_USER kconfig option).'}] | 2019-11-06T01:15Z | 2018-12-04T16:29Z | Exposure of Sensitive Information to an Unauthorized Actor | The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. |
There are many different kinds of mistakes that introduce information exposures. The severity of the error can range widely, depending on the context in which the product operates, the type of sensitive information that is revealed, and the benefits it may provide to an attacker. Some kinds of sensitive information include:
private, personal information, such as personal messages, financial data, health records, geographic location, or contact details
system status and environment, such as the operating system and installed packages
business secrets and intellectual property
network status and configuration
the product's own code or internal state
metadata, e.g. logging of connections or message headers
indirect information, such as a discrepancy between two internal operations that can be observed by an outsider
Information might be sensitive to different parties, each of which may have their own expectations for whether the information should be protected. These parties include:
the product's own users
people or organizations whose information is created or used by the product, even if they are not direct product users
the product's administrators, including the admins of the system(s) and/or networks on which the product operates
the developer
Information exposures can occur in different ways:
the code explicitly inserts sensitive information into resources or messages that are intentionally made accessible to unauthorized actors, but should not contain the information - i.e., the information should have been "scrubbed" or "sanitized"
a different weakness or mistake indirectly inserts the sensitive information into resources, such as a web script error revealing the full system path of the program.
the code manages resources that intentionally contain sensitive information, but the resources are unintentionally made accessible to unauthorized actors. In this case, the information exposure is resultant - i.e., a different weakness enabled the access to the information in the first place.
It is common practice to describe any loss of confidentiality as an "information exposure," but this can lead to overuse of CWE-200 in CWE mapping. From the CWE perspective, loss of confidentiality is a technical impact that can arise from dozens of different weaknesses, such as insecure file permissions or out-of-bounds read. CWE-200 and its lower-level descendants are intended to cover the mistakes that occur in behaviors that explicitly manage, store, transfer, or cleanse sensitive information.
| https://cwe.mitre.org/data/definitions/200.html | 0 | Eric Biggers | 2018-11-03 14:56:00-07:00 | crypto: user - fix leaking uninitialized memory to userspace
All bytes of the NETLINK_CRYPTO report structures must be initialized,
since they are copied to userspace. The change from strncpy() to
strlcpy() broke this. As a minimal fix, change it back.
Fixes: 4473710df1f8 ("crypto: user - Prepare for CRYPTO_MAX_ALG_NAME expansion")
Cc: <[email protected]> # v4.12+
Signed-off-by: Eric Biggers <[email protected]>
Signed-off-by: Herbert Xu <[email protected]> | f43f39958beb206b53292801e216d9b8a660f087 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | crypto_report_comp | crypto_report_comp( struct sk_buff * skb , struct crypto_alg * alg) | ['skb', 'alg'] | static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg)
{
struct crypto_report_comp rcomp;
strlcpy(rcomp.type, "compression", sizeof(rcomp.type));
if (nla_put(skb, CRYPTOCFGA_REPORT_COMPRESS,
sizeof(struct crypto_report_comp), &rcomp))
goto nla_put_failure;
return 0;
nla_put_failure:
return -EMSGSIZE;
} | 64 | True | 1 |
|
CVE-2018-19854 | False | False | False | False | AV:L/AC:M/Au:N/C:P/I:N/A:N | LOCAL | MEDIUM | NONE | PARTIAL | NONE | NONE | 1.9 | CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N | LOCAL | HIGH | LOW | NONE | UNCHANGED | HIGH | NONE | NONE | 4.7 | MEDIUM | 1.0 | 3.6 | False | [{'url': 'https://kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.3', 'name': 'https://kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.3', 'refsource': 'MISC', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f43f39958beb206b53292801e216d9b8a660f087', 'name': 'https://github.com/torvalds/linux/commit/f43f39958beb206b53292801e216d9b8a660f087', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f43f39958beb206b53292801e216d9b8a660f087', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f43f39958beb206b53292801e216d9b8a660f087', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3872-1/', 'name': 'USN-3872-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3878-1/', 'name': 'USN-3878-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3878-2/', 'name': 'USN-3878-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3901-2/', 'name': 'USN-3901-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3901-1/', 'name': 'USN-3901-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3517', 'name': 'RHSA-2019:3517', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3309', 'name': 'RHSA-2019:3309', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-200'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.19.3', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel before 4.19.3. crypto_report_one() and related functions in crypto/crypto_user.c (the crypto user configuration API) do not fully initialize structures that are copied to userspace, potentially leaking sensitive memory to user programs. NOTE: this is a CVE-2013-2547 regression but with easier exploitability because the attacker does not need a capability (however, the system must have the CONFIG_CRYPTO_USER kconfig option).'}] | 2019-11-06T01:15Z | 2018-12-04T16:29Z | Exposure of Sensitive Information to an Unauthorized Actor | The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. |
There are many different kinds of mistakes that introduce information exposures. The severity of the error can range widely, depending on the context in which the product operates, the type of sensitive information that is revealed, and the benefits it may provide to an attacker. Some kinds of sensitive information include:
private, personal information, such as personal messages, financial data, health records, geographic location, or contact details
system status and environment, such as the operating system and installed packages
business secrets and intellectual property
network status and configuration
the product's own code or internal state
metadata, e.g. logging of connections or message headers
indirect information, such as a discrepancy between two internal operations that can be observed by an outsider
Information might be sensitive to different parties, each of which may have their own expectations for whether the information should be protected. These parties include:
the product's own users
people or organizations whose information is created or used by the product, even if they are not direct product users
the product's administrators, including the admins of the system(s) and/or networks on which the product operates
the developer
Information exposures can occur in different ways:
the code explicitly inserts sensitive information into resources or messages that are intentionally made accessible to unauthorized actors, but should not contain the information - i.e., the information should have been "scrubbed" or "sanitized"
a different weakness or mistake indirectly inserts the sensitive information into resources, such as a web script error revealing the full system path of the program.
the code manages resources that intentionally contain sensitive information, but the resources are unintentionally made accessible to unauthorized actors. In this case, the information exposure is resultant - i.e., a different weakness enabled the access to the information in the first place.
It is common practice to describe any loss of confidentiality as an "information exposure," but this can lead to overuse of CWE-200 in CWE mapping. From the CWE perspective, loss of confidentiality is a technical impact that can arise from dozens of different weaknesses, such as insecure file permissions or out-of-bounds read. CWE-200 and its lower-level descendants are intended to cover the mistakes that occur in behaviors that explicitly manage, store, transfer, or cleanse sensitive information.
| https://cwe.mitre.org/data/definitions/200.html | 0 | Eric Biggers | 2018-11-03 14:56:00-07:00 | crypto: user - fix leaking uninitialized memory to userspace
All bytes of the NETLINK_CRYPTO report structures must be initialized,
since they are copied to userspace. The change from strncpy() to
strlcpy() broke this. As a minimal fix, change it back.
Fixes: 4473710df1f8 ("crypto: user - Prepare for CRYPTO_MAX_ALG_NAME expansion")
Cc: <[email protected]> # v4.12+
Signed-off-by: Eric Biggers <[email protected]>
Signed-off-by: Herbert Xu <[email protected]> | f43f39958beb206b53292801e216d9b8a660f087 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | crypto_report_kpp | crypto_report_kpp( struct sk_buff * skb , struct crypto_alg * alg) | ['skb', 'alg'] | static int crypto_report_kpp(struct sk_buff *skb, struct crypto_alg *alg)
{
struct crypto_report_kpp rkpp;
strlcpy(rkpp.type, "kpp", sizeof(rkpp.type));
if (nla_put(skb, CRYPTOCFGA_REPORT_KPP,
sizeof(struct crypto_report_kpp), &rkpp))
goto nla_put_failure;
return 0;
nla_put_failure:
return -EMSGSIZE;
} | 64 | True | 1 |
|
CVE-2018-19854 | False | False | False | False | AV:L/AC:M/Au:N/C:P/I:N/A:N | LOCAL | MEDIUM | NONE | PARTIAL | NONE | NONE | 1.9 | CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N | LOCAL | HIGH | LOW | NONE | UNCHANGED | HIGH | NONE | NONE | 4.7 | MEDIUM | 1.0 | 3.6 | False | [{'url': 'https://kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.3', 'name': 'https://kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.3', 'refsource': 'MISC', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f43f39958beb206b53292801e216d9b8a660f087', 'name': 'https://github.com/torvalds/linux/commit/f43f39958beb206b53292801e216d9b8a660f087', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f43f39958beb206b53292801e216d9b8a660f087', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f43f39958beb206b53292801e216d9b8a660f087', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3872-1/', 'name': 'USN-3872-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3878-1/', 'name': 'USN-3878-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3878-2/', 'name': 'USN-3878-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3901-2/', 'name': 'USN-3901-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3901-1/', 'name': 'USN-3901-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3517', 'name': 'RHSA-2019:3517', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3309', 'name': 'RHSA-2019:3309', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-200'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.19.3', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel before 4.19.3. crypto_report_one() and related functions in crypto/crypto_user.c (the crypto user configuration API) do not fully initialize structures that are copied to userspace, potentially leaking sensitive memory to user programs. NOTE: this is a CVE-2013-2547 regression but with easier exploitability because the attacker does not need a capability (however, the system must have the CONFIG_CRYPTO_USER kconfig option).'}] | 2019-11-06T01:15Z | 2018-12-04T16:29Z | Exposure of Sensitive Information to an Unauthorized Actor | The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. |
There are many different kinds of mistakes that introduce information exposures. The severity of the error can range widely, depending on the context in which the product operates, the type of sensitive information that is revealed, and the benefits it may provide to an attacker. Some kinds of sensitive information include:
private, personal information, such as personal messages, financial data, health records, geographic location, or contact details
system status and environment, such as the operating system and installed packages
business secrets and intellectual property
network status and configuration
the product's own code or internal state
metadata, e.g. logging of connections or message headers
indirect information, such as a discrepancy between two internal operations that can be observed by an outsider
Information might be sensitive to different parties, each of which may have their own expectations for whether the information should be protected. These parties include:
the product's own users
people or organizations whose information is created or used by the product, even if they are not direct product users
the product's administrators, including the admins of the system(s) and/or networks on which the product operates
the developer
Information exposures can occur in different ways:
the code explicitly inserts sensitive information into resources or messages that are intentionally made accessible to unauthorized actors, but should not contain the information - i.e., the information should have been "scrubbed" or "sanitized"
a different weakness or mistake indirectly inserts the sensitive information into resources, such as a web script error revealing the full system path of the program.
the code manages resources that intentionally contain sensitive information, but the resources are unintentionally made accessible to unauthorized actors. In this case, the information exposure is resultant - i.e., a different weakness enabled the access to the information in the first place.
It is common practice to describe any loss of confidentiality as an "information exposure," but this can lead to overuse of CWE-200 in CWE mapping. From the CWE perspective, loss of confidentiality is a technical impact that can arise from dozens of different weaknesses, such as insecure file permissions or out-of-bounds read. CWE-200 and its lower-level descendants are intended to cover the mistakes that occur in behaviors that explicitly manage, store, transfer, or cleanse sensitive information.
| https://cwe.mitre.org/data/definitions/200.html | 0 | Eric Biggers | 2018-11-03 14:56:00-07:00 | crypto: user - fix leaking uninitialized memory to userspace
All bytes of the NETLINK_CRYPTO report structures must be initialized,
since they are copied to userspace. The change from strncpy() to
strlcpy() broke this. As a minimal fix, change it back.
Fixes: 4473710df1f8 ("crypto: user - Prepare for CRYPTO_MAX_ALG_NAME expansion")
Cc: <[email protected]> # v4.12+
Signed-off-by: Eric Biggers <[email protected]>
Signed-off-by: Herbert Xu <[email protected]> | f43f39958beb206b53292801e216d9b8a660f087 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | crypto_report_one | crypto_report_one( struct crypto_alg * alg , struct crypto_user_alg * ualg , struct sk_buff * skb) | ['alg', 'ualg', 'skb'] | static int crypto_report_one(struct crypto_alg *alg,
struct crypto_user_alg *ualg, struct sk_buff *skb)
{
strlcpy(ualg->cru_name, alg->cra_name, sizeof(ualg->cru_name));
strlcpy(ualg->cru_driver_name, alg->cra_driver_name,
sizeof(ualg->cru_driver_name));
strlcpy(ualg->cru_module_name, module_name(alg->cra_module),
sizeof(ualg->cru_module_name));
ualg->cru_type = 0;
ualg->cru_mask = 0;
ualg->cru_flags = alg->cra_flags;
ualg->cru_refcnt = refcount_read(&alg->cra_refcnt);
if (nla_put_u32(skb, CRYPTOCFGA_PRIORITY_VAL, alg->cra_priority))
goto nla_put_failure;
if (alg->cra_flags & CRYPTO_ALG_LARVAL) {
struct crypto_report_larval rl;
strlcpy(rl.type, "larval", sizeof(rl.type));
if (nla_put(skb, CRYPTOCFGA_REPORT_LARVAL,
sizeof(struct crypto_report_larval), &rl))
goto nla_put_failure;
goto out;
}
if (alg->cra_type && alg->cra_type->report) {
if (alg->cra_type->report(skb, alg))
goto nla_put_failure;
goto out;
}
switch (alg->cra_flags & (CRYPTO_ALG_TYPE_MASK | CRYPTO_ALG_LARVAL)) {
case CRYPTO_ALG_TYPE_CIPHER:
if (crypto_report_cipher(skb, alg))
goto nla_put_failure;
break;
case CRYPTO_ALG_TYPE_COMPRESS:
if (crypto_report_comp(skb, alg))
goto nla_put_failure;
break;
case CRYPTO_ALG_TYPE_ACOMPRESS:
if (crypto_report_acomp(skb, alg))
goto nla_put_failure;
break;
case CRYPTO_ALG_TYPE_AKCIPHER:
if (crypto_report_akcipher(skb, alg))
goto nla_put_failure;
break;
case CRYPTO_ALG_TYPE_KPP:
if (crypto_report_kpp(skb, alg))
goto nla_put_failure;
break;
}
out:
return 0;
nla_put_failure:
return -EMSGSIZE;
} | 321 | True | 1 |
|
CVE-2018-18397 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:P/A:N | LOCAL | LOW | NONE | NONE | PARTIAL | NONE | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | HIGH | NONE | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/torvalds/linux/commit/29ec90660d68bbdd69507c1c8b4e33aa299278b1', 'name': 'https://github.com/torvalds/linux/commit/29ec90660d68bbdd69507c1c8b4e33aa299278b1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.7', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.7', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.14.87', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.14.87', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1700', 'name': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1700', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=29ec90660d68bbdd69507c1c8b4e33aa299278b1', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=29ec90660d68bbdd69507c1c8b4e33aa299278b1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:0202', 'name': 'RHSA-2019:0202', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:0163', 'name': 'RHSA-2019:0163', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:0324', 'name': 'RHSA-2019:0324', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3901-2/', 'name': 'USN-3901-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3901-1/', 'name': 'USN-3901-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3903-2/', 'name': 'USN-3903-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3903-1/', 'name': 'USN-3903-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:0831', 'name': 'RHSA-2019:0831', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHBA-2019:0327', 'name': 'RHBA-2019:0327', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-863'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.19.7', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:redhat:virtualization_host:4.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:redhat:openshift_container_platform:3.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The userfaultfd implementation in the Linux kernel before 4.19.7 mishandles access control for certain UFFDIO_ ioctl calls, as demonstrated by allowing local users to write data into holes in a tmpfs file (if the user has read-only access to that file, and that file contains holes), related to fs/userfaultfd.c and mm/userfaultfd.c.'}] | 2020-08-24T17:37Z | 2018-12-12T10:29Z | Incorrect Authorization | The software performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions. |
Assuming a user with a given identity, authorization is the process of determining whether that user can access a given resource, based on the user's privileges and any permissions or other access-control specifications that apply to the resource.
When access control checks are incorrectly applied, users are able to access data or perform actions that they should not be allowed to perform. This can lead to a wide range of problems, including information exposures, denial of service, and arbitrary code execution.
| https://cwe.mitre.org/data/definitions/863.html | 0 | Andrea Arcangeli | 2018-11-30 14:09:32-08:00 | userfaultfd: shmem/hugetlbfs: only allow to register VM_MAYWRITE vmas
After the VMA to register the uffd onto is found, check that it has
VM_MAYWRITE set before allowing registration. This way we inherit all
common code checks before allowing to fill file holes in shmem and
hugetlbfs with UFFDIO_COPY.
The userfaultfd memory model is not applicable for readonly files unless
it's a MAP_PRIVATE.
Link: http://lkml.kernel.org/r/[email protected]
Fixes: ff62a3421044 ("hugetlb: implement memfd sealing")
Signed-off-by: Andrea Arcangeli <[email protected]>
Reviewed-by: Mike Rapoport <[email protected]>
Reviewed-by: Hugh Dickins <[email protected]>
Reported-by: Jann Horn <[email protected]>
Fixes: 4c27fe4c4c84 ("userfaultfd: shmem: add shmem_mcopy_atomic_pte for userfaultfd support")
Cc: <[email protected]>
Cc: "Dr. David Alan Gilbert" <[email protected]>
Cc: Mike Kravetz <[email protected]>
Cc: Peter Xu <[email protected]>
Cc: [email protected]
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]> | 29ec90660d68bbdd69507c1c8b4e33aa299278b1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | __mcopy_atomic | __mcopy_atomic( struct mm_struct * dst_mm , unsigned long dst_start , unsigned long src_start , unsigned long len , bool zeropage , bool * mmap_changing) | ['dst_mm', 'dst_start', 'src_start', 'len', 'zeropage', 'mmap_changing'] | static __always_inline ssize_t __mcopy_atomic(struct mm_struct *dst_mm,
unsigned long dst_start,
unsigned long src_start,
unsigned long len,
bool zeropage,
bool *mmap_changing)
{
struct vm_area_struct *dst_vma;
ssize_t err;
pmd_t *dst_pmd;
unsigned long src_addr, dst_addr;
long copied;
struct page *page;
/*
* Sanitize the command parameters:
*/
BUG_ON(dst_start & ~PAGE_MASK);
BUG_ON(len & ~PAGE_MASK);
/* Does the address range wrap, or is the span zero-sized? */
BUG_ON(src_start + len <= src_start);
BUG_ON(dst_start + len <= dst_start);
src_addr = src_start;
dst_addr = dst_start;
copied = 0;
page = NULL;
retry:
down_read(&dst_mm->mmap_sem);
/*
* If memory mappings are changing because of non-cooperative
* operation (e.g. mremap) running in parallel, bail out and
* request the user to retry later
*/
err = -EAGAIN;
if (mmap_changing && READ_ONCE(*mmap_changing))
goto out_unlock;
/*
* Make sure the vma is not shared, that the dst range is
* both valid and fully within a single existing vma.
*/
err = -ENOENT;
dst_vma = find_vma(dst_mm, dst_start);
if (!dst_vma)
goto out_unlock;
/*
* Be strict and only allow __mcopy_atomic on userfaultfd
* registered ranges to prevent userland errors going
* unnoticed. As far as the VM consistency is concerned, it
* would be perfectly safe to remove this check, but there's
* no useful usage for __mcopy_atomic ouside of userfaultfd
* registered ranges. This is after all why these are ioctls
* belonging to the userfaultfd and not syscalls.
*/
if (!dst_vma->vm_userfaultfd_ctx.ctx)
goto out_unlock;
if (dst_start < dst_vma->vm_start ||
dst_start + len > dst_vma->vm_end)
goto out_unlock;
err = -EINVAL;
/*
* shmem_zero_setup is invoked in mmap for MAP_ANONYMOUS|MAP_SHARED but
* it will overwrite vm_ops, so vma_is_anonymous must return false.
*/
if (WARN_ON_ONCE(vma_is_anonymous(dst_vma) &&
dst_vma->vm_flags & VM_SHARED))
goto out_unlock;
/*
* If this is a HUGETLB vma, pass off to appropriate routine
*/
if (is_vm_hugetlb_page(dst_vma))
return __mcopy_atomic_hugetlb(dst_mm, dst_vma, dst_start,
src_start, len, zeropage);
if (!vma_is_anonymous(dst_vma) && !vma_is_shmem(dst_vma))
goto out_unlock;
/*
* Ensure the dst_vma has a anon_vma or this page
* would get a NULL anon_vma when moved in the
* dst_vma.
*/
err = -ENOMEM;
if (!(dst_vma->vm_flags & VM_SHARED) &&
unlikely(anon_vma_prepare(dst_vma)))
goto out_unlock;
while (src_addr < src_start + len) {
pmd_t dst_pmdval;
BUG_ON(dst_addr >= dst_start + len);
dst_pmd = mm_alloc_pmd(dst_mm, dst_addr);
if (unlikely(!dst_pmd)) {
err = -ENOMEM;
break;
}
dst_pmdval = pmd_read_atomic(dst_pmd);
/*
* If the dst_pmd is mapped as THP don't
* override it and just be strict.
*/
if (unlikely(pmd_trans_huge(dst_pmdval))) {
err = -EEXIST;
break;
}
if (unlikely(pmd_none(dst_pmdval)) &&
unlikely(__pte_alloc(dst_mm, dst_pmd, dst_addr))) {
err = -ENOMEM;
break;
}
/* If an huge pmd materialized from under us fail */
if (unlikely(pmd_trans_huge(*dst_pmd))) {
err = -EFAULT;
break;
}
BUG_ON(pmd_none(*dst_pmd));
BUG_ON(pmd_trans_huge(*dst_pmd));
err = mfill_atomic_pte(dst_mm, dst_pmd, dst_vma, dst_addr,
src_addr, &page, zeropage);
cond_resched();
if (unlikely(err == -ENOENT)) {
void *page_kaddr;
up_read(&dst_mm->mmap_sem);
BUG_ON(!page);
page_kaddr = kmap(page);
err = copy_from_user(page_kaddr,
(const void __user *) src_addr,
PAGE_SIZE);
kunmap(page);
if (unlikely(err)) {
err = -EFAULT;
goto out;
}
goto retry;
} else
BUG_ON(page);
if (!err) {
dst_addr += PAGE_SIZE;
src_addr += PAGE_SIZE;
copied += PAGE_SIZE;
if (fatal_signal_pending(current))
err = -EINTR;
}
if (err)
break;
}
out_unlock:
up_read(&dst_mm->mmap_sem);
out:
if (page)
put_page(page);
BUG_ON(copied < 0);
BUG_ON(err > 0);
BUG_ON(!copied && !err);
return copied ? copied : err;
} | 614 | True | 1 |
|
CVE-2018-18397 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:P/A:N | LOCAL | LOW | NONE | NONE | PARTIAL | NONE | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | HIGH | NONE | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/torvalds/linux/commit/29ec90660d68bbdd69507c1c8b4e33aa299278b1', 'name': 'https://github.com/torvalds/linux/commit/29ec90660d68bbdd69507c1c8b4e33aa299278b1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.7', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.7', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.14.87', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.14.87', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1700', 'name': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1700', 'refsource': 'MISC', 'tags': ['Exploit', 'Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=29ec90660d68bbdd69507c1c8b4e33aa299278b1', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=29ec90660d68bbdd69507c1c8b4e33aa299278b1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:0202', 'name': 'RHSA-2019:0202', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:0163', 'name': 'RHSA-2019:0163', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:0324', 'name': 'RHSA-2019:0324', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3901-2/', 'name': 'USN-3901-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3901-1/', 'name': 'USN-3901-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3903-2/', 'name': 'USN-3903-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3903-1/', 'name': 'USN-3903-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:0831', 'name': 'RHSA-2019:0831', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHBA-2019:0327', 'name': 'RHBA-2019:0327', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-863'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.19.7', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:redhat:virtualization_host:4.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:redhat:openshift_container_platform:3.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The userfaultfd implementation in the Linux kernel before 4.19.7 mishandles access control for certain UFFDIO_ ioctl calls, as demonstrated by allowing local users to write data into holes in a tmpfs file (if the user has read-only access to that file, and that file contains holes), related to fs/userfaultfd.c and mm/userfaultfd.c.'}] | 2020-08-24T17:37Z | 2018-12-12T10:29Z | Incorrect Authorization | The software performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions. |
Assuming a user with a given identity, authorization is the process of determining whether that user can access a given resource, based on the user's privileges and any permissions or other access-control specifications that apply to the resource.
When access control checks are incorrectly applied, users are able to access data or perform actions that they should not be allowed to perform. This can lead to a wide range of problems, including information exposures, denial of service, and arbitrary code execution.
| https://cwe.mitre.org/data/definitions/863.html | 0 | Andrea Arcangeli | 2018-11-30 14:09:32-08:00 | userfaultfd: shmem/hugetlbfs: only allow to register VM_MAYWRITE vmas
After the VMA to register the uffd onto is found, check that it has
VM_MAYWRITE set before allowing registration. This way we inherit all
common code checks before allowing to fill file holes in shmem and
hugetlbfs with UFFDIO_COPY.
The userfaultfd memory model is not applicable for readonly files unless
it's a MAP_PRIVATE.
Link: http://lkml.kernel.org/r/[email protected]
Fixes: ff62a3421044 ("hugetlb: implement memfd sealing")
Signed-off-by: Andrea Arcangeli <[email protected]>
Reviewed-by: Mike Rapoport <[email protected]>
Reviewed-by: Hugh Dickins <[email protected]>
Reported-by: Jann Horn <[email protected]>
Fixes: 4c27fe4c4c84 ("userfaultfd: shmem: add shmem_mcopy_atomic_pte for userfaultfd support")
Cc: <[email protected]>
Cc: "Dr. David Alan Gilbert" <[email protected]>
Cc: Mike Kravetz <[email protected]>
Cc: Peter Xu <[email protected]>
Cc: [email protected]
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]> | 29ec90660d68bbdd69507c1c8b4e33aa299278b1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | __mcopy_atomic_hugetlb | __mcopy_atomic_hugetlb( struct mm_struct * dst_mm , struct vm_area_struct * dst_vma , unsigned long dst_start , unsigned long src_start , unsigned long len , bool zeropage) | ['dst_mm', 'dst_vma', 'dst_start', 'src_start', 'len', 'zeropage'] | static __always_inline ssize_t __mcopy_atomic_hugetlb(struct mm_struct *dst_mm,
struct vm_area_struct *dst_vma,
unsigned long dst_start,
unsigned long src_start,
unsigned long len,
bool zeropage)
{
int vm_alloc_shared = dst_vma->vm_flags & VM_SHARED;
int vm_shared = dst_vma->vm_flags & VM_SHARED;
ssize_t err;
pte_t *dst_pte;
unsigned long src_addr, dst_addr;
long copied;
struct page *page;
struct hstate *h;
unsigned long vma_hpagesize;
pgoff_t idx;
u32 hash;
struct address_space *mapping;
/*
* There is no default zero huge page for all huge page sizes as
* supported by hugetlb. A PMD_SIZE huge pages may exist as used
* by THP. Since we can not reliably insert a zero page, this
* feature is not supported.
*/
if (zeropage) {
up_read(&dst_mm->mmap_sem);
return -EINVAL;
}
src_addr = src_start;
dst_addr = dst_start;
copied = 0;
page = NULL;
vma_hpagesize = vma_kernel_pagesize(dst_vma);
/*
* Validate alignment based on huge page size
*/
err = -EINVAL;
if (dst_start & (vma_hpagesize - 1) || len & (vma_hpagesize - 1))
goto out_unlock;
retry:
/*
* On routine entry dst_vma is set. If we had to drop mmap_sem and
* retry, dst_vma will be set to NULL and we must lookup again.
*/
if (!dst_vma) {
err = -ENOENT;
dst_vma = find_vma(dst_mm, dst_start);
if (!dst_vma || !is_vm_hugetlb_page(dst_vma))
goto out_unlock;
/*
* Only allow __mcopy_atomic_hugetlb on userfaultfd
* registered ranges.
*/
if (!dst_vma->vm_userfaultfd_ctx.ctx)
goto out_unlock;
if (dst_start < dst_vma->vm_start ||
dst_start + len > dst_vma->vm_end)
goto out_unlock;
err = -EINVAL;
if (vma_hpagesize != vma_kernel_pagesize(dst_vma))
goto out_unlock;
vm_shared = dst_vma->vm_flags & VM_SHARED;
}
if (WARN_ON(dst_addr & (vma_hpagesize - 1) ||
(len - copied) & (vma_hpagesize - 1)))
goto out_unlock;
/*
* If not shared, ensure the dst_vma has a anon_vma.
*/
err = -ENOMEM;
if (!vm_shared) {
if (unlikely(anon_vma_prepare(dst_vma)))
goto out_unlock;
}
h = hstate_vma(dst_vma);
while (src_addr < src_start + len) {
pte_t dst_pteval;
BUG_ON(dst_addr >= dst_start + len);
VM_BUG_ON(dst_addr & ~huge_page_mask(h));
/*
* Serialize via hugetlb_fault_mutex
*/
idx = linear_page_index(dst_vma, dst_addr);
mapping = dst_vma->vm_file->f_mapping;
hash = hugetlb_fault_mutex_hash(h, dst_mm, dst_vma, mapping,
idx, dst_addr);
mutex_lock(&hugetlb_fault_mutex_table[hash]);
err = -ENOMEM;
dst_pte = huge_pte_alloc(dst_mm, dst_addr, huge_page_size(h));
if (!dst_pte) {
mutex_unlock(&hugetlb_fault_mutex_table[hash]);
goto out_unlock;
}
err = -EEXIST;
dst_pteval = huge_ptep_get(dst_pte);
if (!huge_pte_none(dst_pteval)) {
mutex_unlock(&hugetlb_fault_mutex_table[hash]);
goto out_unlock;
}
err = hugetlb_mcopy_atomic_pte(dst_mm, dst_pte, dst_vma,
dst_addr, src_addr, &page);
mutex_unlock(&hugetlb_fault_mutex_table[hash]);
vm_alloc_shared = vm_shared;
cond_resched();
if (unlikely(err == -ENOENT)) {
up_read(&dst_mm->mmap_sem);
BUG_ON(!page);
err = copy_huge_page_from_user(page,
(const void __user *)src_addr,
pages_per_huge_page(h), true);
if (unlikely(err)) {
err = -EFAULT;
goto out;
}
down_read(&dst_mm->mmap_sem);
dst_vma = NULL;
goto retry;
} else
BUG_ON(page);
if (!err) {
dst_addr += vma_hpagesize;
src_addr += vma_hpagesize;
copied += vma_hpagesize;
if (fatal_signal_pending(current))
err = -EINTR;
}
if (err)
break;
}
out_unlock:
up_read(&dst_mm->mmap_sem);
out:
if (page) {
/*
* We encountered an error and are about to free a newly
* allocated huge page.
*
* Reservation handling is very subtle, and is different for
* private and shared mappings. See the routine
* restore_reserve_on_error for details. Unfortunately, we
* can not call restore_reserve_on_error now as it would
* require holding mmap_sem.
*
* If a reservation for the page existed in the reservation
* map of a private mapping, the map was modified to indicate
* the reservation was consumed when the page was allocated.
* We clear the PagePrivate flag now so that the global
* reserve count will not be incremented in free_huge_page.
* The reservation map will still indicate the reservation
* was consumed and possibly prevent later page allocation.
* This is better than leaking a global reservation. If no
* reservation existed, it is still safe to clear PagePrivate
* as no adjustments to reservation counts were made during
* allocation.
*
* The reservation map for shared mappings indicates which
* pages have reservations. When a huge page is allocated
* for an address with a reservation, no change is made to
* the reserve map. In this case PagePrivate will be set
* to indicate that the global reservation count should be
* incremented when the page is freed. This is the desired
* behavior. However, when a huge page is allocated for an
* address without a reservation a reservation entry is added
* to the reservation map, and PagePrivate will not be set.
* When the page is freed, the global reserve count will NOT
* be incremented and it will appear as though we have leaked
* reserved page. In this case, set PagePrivate so that the
* global reserve count will be incremented to match the
* reservation map entry which was created.
*
* Note that vm_alloc_shared is based on the flags of the vma
* for which the page was originally allocated. dst_vma could
* be different or NULL on error.
*/
if (vm_alloc_shared)
SetPagePrivate(page);
else
ClearPagePrivate(page);
put_page(page);
}
BUG_ON(copied < 0);
BUG_ON(err > 0);
BUG_ON(!copied && !err);
return copied ? copied : err;
} | 681 | True | 1 |
|
CVE-2018-19824 | False | False | False | False | AV:L/AC:L/Au:N/C:P/I:P/A:P | LOCAL | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 4.6 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/5f8cf712582617d523120df67d392059eaf2fc4b', 'name': 'https://github.com/torvalds/linux/commit/5f8cf712582617d523120df67d392059eaf2fc4b', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/commit/?id=5f8cf712582617d523120df67d392059eaf2fc4b', 'name': 'https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/commit/?id=5f8cf712582617d523120df67d392059eaf2fc4b', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.suse.com/show_bug.cgi?id=1118152', 'name': 'https://bugzilla.suse.com/show_bug.cgi?id=1118152', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/106109', 'name': '106109', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://usn.ubuntu.com/3879-2/', 'name': 'USN-3879-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3879-1/', 'name': 'USN-3879-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00034.html', 'name': '[debian-lts-announce] 20190327 [SECURITY] [DLA 1731-1] linux security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://support.f5.com/csp/article/K98155950', 'name': 'https://support.f5.com/csp/article/K98155950', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/04/msg00004.html', 'name': '[debian-lts-announce] 20190401 [SECURITY] [DLA 1731-2] linux regression update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3933-2/', 'name': 'USN-3933-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3931-2/', 'name': 'USN-3931-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3931-1/', 'name': 'USN-3931-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3930-2/', 'name': 'USN-3930-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3930-1/', 'name': 'USN-3930-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3933-1/', 'name': 'USN-3933-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/05/msg00002.html', 'name': '[debian-lts-announce] 20190503 [SECURITY] [DLA 1771-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2703', 'name': 'RHSA-2019:2703', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-416'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.19.6', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In the Linux kernel through 4.19.6, a local user could exploit a use-after-free in the ALSA driver by supplying a malicious USB Sound device (with zero interfaces) that is mishandled in usb_audio_probe in sound/usb/card.c.'}] | 2019-09-10T22:15Z | 2018-12-03T17:29Z | Use After Free | Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. |
The use of previously-freed memory can have any number of adverse consequences, ranging from the corruption of valid data to the execution of arbitrary code, depending on the instantiation and timing of the flaw. The simplest way data corruption may occur involves the system's reuse of the freed memory. Use-after-free errors have two common and sometimes overlapping causes:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for freeing the memory.
In this scenario, the memory in question is allocated to another pointer validly at some point after it has been freed. The original pointer to the freed memory is used again and points to somewhere within the new allocation. As the data is changed, it corrupts the validly used memory; this induces undefined behavior in the process.
If the newly allocated data chances to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.
| https://cwe.mitre.org/data/definitions/416.html | 0 | Hui Peng | 2018-12-03 16:09:34+01:00 | ALSA: usb-audio: Fix UAF decrement if card has no live interfaces in card.c
If a USB sound card reports 0 interfaces, an error condition is triggered
and the function usb_audio_probe errors out. In the error path, there was a
use-after-free vulnerability where the memory object of the card was first
freed, followed by a decrement of the number of active chips. Moving the
decrement above the atomic_dec fixes the UAF.
[ The original problem was introduced in 3.1 kernel, while it was
developed in a different form. The Fixes tag below indicates the
original commit but it doesn't mean that the patch is applicable
cleanly. -- tiwai ]
Fixes: 362e4e49abe5 ("ALSA: usb-audio - clear chip->probing on error exit")
Reported-by: Hui Peng <[email protected]>
Reported-by: Mathias Payer <[email protected]>
Signed-off-by: Hui Peng <[email protected]>
Signed-off-by: Mathias Payer <[email protected]>
Cc: <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]> | 5f8cf712582617d523120df67d392059eaf2fc4b | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | usb_audio_probe | usb_audio_probe( struct usb_interface * intf , const struct usb_device_id * usb_id) | ['intf', 'usb_id'] | static int usb_audio_probe(struct usb_interface *intf,
const struct usb_device_id *usb_id)
{
struct usb_device *dev = interface_to_usbdev(intf);
const struct snd_usb_audio_quirk *quirk =
(const struct snd_usb_audio_quirk *)usb_id->driver_info;
struct snd_usb_audio *chip;
int i, err;
struct usb_host_interface *alts;
int ifnum;
u32 id;
alts = &intf->altsetting[0];
ifnum = get_iface_desc(alts)->bInterfaceNumber;
id = USB_ID(le16_to_cpu(dev->descriptor.idVendor),
le16_to_cpu(dev->descriptor.idProduct));
if (get_alias_id(dev, &id))
quirk = get_alias_quirk(dev, id);
if (quirk && quirk->ifnum >= 0 && ifnum != quirk->ifnum)
return -ENXIO;
err = snd_usb_apply_boot_quirk(dev, intf, quirk, id);
if (err < 0)
return err;
/*
* found a config. now register to ALSA
*/
/* check whether it's already registered */
chip = NULL;
mutex_lock(®ister_mutex);
for (i = 0; i < SNDRV_CARDS; i++) {
if (usb_chip[i] && usb_chip[i]->dev == dev) {
if (atomic_read(&usb_chip[i]->shutdown)) {
dev_err(&dev->dev, "USB device is in the shutdown state, cannot create a card instance\n");
err = -EIO;
goto __error;
}
chip = usb_chip[i];
atomic_inc(&chip->active); /* avoid autopm */
break;
}
}
if (! chip) {
/* it's a fresh one.
* now look for an empty slot and create a new card instance
*/
for (i = 0; i < SNDRV_CARDS; i++)
if (!usb_chip[i] &&
(vid[i] == -1 || vid[i] == USB_ID_VENDOR(id)) &&
(pid[i] == -1 || pid[i] == USB_ID_PRODUCT(id))) {
if (enable[i]) {
err = snd_usb_audio_create(intf, dev, i, quirk,
id, &chip);
if (err < 0)
goto __error;
chip->pm_intf = intf;
break;
} else if (vid[i] != -1 || pid[i] != -1) {
dev_info(&dev->dev,
"device (%04x:%04x) is disabled\n",
USB_ID_VENDOR(id),
USB_ID_PRODUCT(id));
err = -ENOENT;
goto __error;
}
}
if (!chip) {
dev_err(&dev->dev, "no available usb audio device\n");
err = -ENODEV;
goto __error;
}
}
dev_set_drvdata(&dev->dev, chip);
/*
* For devices with more than one control interface, we assume the
* first contains the audio controls. We might need a more specific
* check here in the future.
*/
if (!chip->ctrl_intf)
chip->ctrl_intf = alts;
chip->txfr_quirk = 0;
err = 1; /* continue */
if (quirk && quirk->ifnum != QUIRK_NO_INTERFACE) {
/* need some special handlings */
err = snd_usb_create_quirk(chip, intf, &usb_audio_driver, quirk);
if (err < 0)
goto __error;
}
if (err > 0) {
/* create normal USB audio interfaces */
err = snd_usb_create_streams(chip, ifnum);
if (err < 0)
goto __error;
err = snd_usb_create_mixer(chip, ifnum, ignore_ctl_error);
if (err < 0)
goto __error;
}
/* we are allowed to call snd_card_register() many times */
err = snd_card_register(chip->card);
if (err < 0)
goto __error;
usb_chip[chip->index] = chip;
chip->num_interfaces++;
usb_set_intfdata(intf, chip);
atomic_dec(&chip->active);
mutex_unlock(®ister_mutex);
return 0;
__error:
if (chip) {
if (!chip->num_interfaces)
snd_card_free(chip->card);
atomic_dec(&chip->active);
}
mutex_unlock(®ister_mutex);
return err;
} | 655 | True | 1 |
|
CVE-2018-20169 | False | False | False | False | AV:L/AC:L/Au:N/C:C/I:C/A:C | LOCAL | LOW | NONE | COMPLETE | COMPLETE | COMPLETE | 7.2 | CVSS:3.0/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | PHYSICAL | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 6.8 | MEDIUM | 0.9 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/704620afc70cf47abb9d6a1a57f3825d2bca49cf', 'name': 'https://github.com/torvalds/linux/commit/704620afc70cf47abb9d6a1a57f3825d2bca49cf', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.9', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.9', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=704620afc70cf47abb9d6a1a57f3825d2bca49cf', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=704620afc70cf47abb9d6a1a57f3825d2bca49cf', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3879-2/', 'name': 'USN-3879-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3879-1/', 'name': 'USN-3879-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00034.html', 'name': '[debian-lts-announce] 20190327 [SECURITY] [DLA 1731-1] linux security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/04/msg00004.html', 'name': '[debian-lts-announce] 20190401 [SECURITY] [DLA 1731-2] linux regression update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/05/msg00002.html', 'name': '[debian-lts-announce] 20190503 [SECURITY] [DLA 1771-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/4094-1/', 'name': 'USN-4094-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4118-1/', 'name': 'USN-4118-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3517', 'name': 'RHSA-2019:3517', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3309', 'name': 'RHSA-2019:3309', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-400'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.19.9', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel before 4.19.9. The USB subsystem mishandles size checks during the reading of an extra descriptor, related to __usb_get_extra_descriptor in drivers/usb/core/usb.c.'}] | 2019-08-13T19:15Z | 2018-12-17T07:29Z | Uncontrolled Resource Consumption | The software does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. |
Limited resources include memory, file system storage, database connection pool entries, and CPU. If an attacker can trigger the allocation of these limited resources, but the number or size of the resources is not controlled, then the attacker could cause a denial of service that consumes all available resources. This would prevent valid users from accessing the software, and it could potentially have an impact on the surrounding environment. For example, a memory exhaustion attack against an application could slow down the application as well as its host operating system.
There are at least three distinct scenarios which can commonly lead to resource exhaustion:
Lack of throttling for the number of allocated resources
Losing all references to a resource before reaching the shutdown stage
Not closing/returning a resource after processing
Resource exhaustion problems are often result due to an incorrect implementation of the following situations:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for releasing the resource.
| https://cwe.mitre.org/data/definitions/400.html | 0 | Mathias Payer | 2018-12-05 21:19:59+01:00 | 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]> | 704620afc70cf47abb9d6a1a57f3825d2bca49cf | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | usb_enumerate_device_otg | usb_enumerate_device_otg( struct usb_device * udev) | ['udev'] | static int usb_enumerate_device_otg(struct usb_device *udev)
{
int err = 0;
#ifdef CONFIG_USB_OTG
/*
* OTG-aware devices on OTG-capable root hubs may be able to use SRP,
* to wake us after we've powered off VBUS; and HNP, switching roles
* "host" to "peripheral". The OTG descriptor helps figure this out.
*/
if (!udev->bus->is_b_host
&& udev->config
&& udev->parent == udev->bus->root_hub) {
struct usb_otg_descriptor *desc = NULL;
struct usb_bus *bus = udev->bus;
unsigned port1 = udev->portnum;
/* descriptor may appear anywhere in config */
err = __usb_get_extra_descriptor(udev->rawdescriptors[0],
le16_to_cpu(udev->config[0].desc.wTotalLength),
USB_DT_OTG, (void **) &desc);
if (err || !(desc->bmAttributes & USB_OTG_HNP))
return 0;
dev_info(&udev->dev, "Dual-Role OTG device on %sHNP port\n",
(port1 == bus->otg_port) ? "" : "non-");
/* enable HNP before suspend, it's simpler */
if (port1 == bus->otg_port) {
bus->b_hnp_enable = 1;
err = usb_control_msg(udev,
usb_sndctrlpipe(udev, 0),
USB_REQ_SET_FEATURE, 0,
USB_DEVICE_B_HNP_ENABLE,
0, NULL, 0,
USB_CTRL_SET_TIMEOUT);
if (err < 0) {
/*
* OTG MESSAGE: report errors here,
* customize to match your product.
*/
dev_err(&udev->dev, "can't set HNP mode: %d\n",
err);
bus->b_hnp_enable = 0;
}
} else if (desc->bLength == sizeof
(struct usb_otg_descriptor)) {
/* Set a_alt_hnp_support for legacy otg device */
err = usb_control_msg(udev,
usb_sndctrlpipe(udev, 0),
USB_REQ_SET_FEATURE, 0,
USB_DEVICE_A_ALT_HNP_SUPPORT,
0, NULL, 0,
USB_CTRL_SET_TIMEOUT);
if (err < 0)
dev_err(&udev->dev,
"set a_alt_hnp_support failed: %d\n",
err);
}
}
#endif
return err;
} | 269 | True | 1 |
|
CVE-2018-20169 | False | False | False | False | AV:L/AC:L/Au:N/C:C/I:C/A:C | LOCAL | LOW | NONE | COMPLETE | COMPLETE | COMPLETE | 7.2 | CVSS:3.0/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | PHYSICAL | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 6.8 | MEDIUM | 0.9 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/704620afc70cf47abb9d6a1a57f3825d2bca49cf', 'name': 'https://github.com/torvalds/linux/commit/704620afc70cf47abb9d6a1a57f3825d2bca49cf', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.9', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.9', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=704620afc70cf47abb9d6a1a57f3825d2bca49cf', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=704620afc70cf47abb9d6a1a57f3825d2bca49cf', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3879-2/', 'name': 'USN-3879-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3879-1/', 'name': 'USN-3879-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00034.html', 'name': '[debian-lts-announce] 20190327 [SECURITY] [DLA 1731-1] linux security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/04/msg00004.html', 'name': '[debian-lts-announce] 20190401 [SECURITY] [DLA 1731-2] linux regression update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/05/msg00002.html', 'name': '[debian-lts-announce] 20190503 [SECURITY] [DLA 1771-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/4094-1/', 'name': 'USN-4094-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4118-1/', 'name': 'USN-4118-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3517', 'name': 'RHSA-2019:3517', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3309', 'name': 'RHSA-2019:3309', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-400'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.19.9', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel before 4.19.9. The USB subsystem mishandles size checks during the reading of an extra descriptor, related to __usb_get_extra_descriptor in drivers/usb/core/usb.c.'}] | 2019-08-13T19:15Z | 2018-12-17T07:29Z | Uncontrolled Resource Consumption | The software does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. |
Limited resources include memory, file system storage, database connection pool entries, and CPU. If an attacker can trigger the allocation of these limited resources, but the number or size of the resources is not controlled, then the attacker could cause a denial of service that consumes all available resources. This would prevent valid users from accessing the software, and it could potentially have an impact on the surrounding environment. For example, a memory exhaustion attack against an application could slow down the application as well as its host operating system.
There are at least three distinct scenarios which can commonly lead to resource exhaustion:
Lack of throttling for the number of allocated resources
Losing all references to a resource before reaching the shutdown stage
Not closing/returning a resource after processing
Resource exhaustion problems are often result due to an incorrect implementation of the following situations:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for releasing the resource.
| https://cwe.mitre.org/data/definitions/400.html | 0 | Mathias Payer | 2018-12-05 21:19:59+01:00 | 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]> | 704620afc70cf47abb9d6a1a57f3825d2bca49cf | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | __usb_get_extra_descriptor | __usb_get_extra_descriptor( char * buffer , unsigned size , unsigned char type , void ** ptr) | ['buffer', 'size', 'type', 'ptr'] | int __usb_get_extra_descriptor(char *buffer, unsigned size,
unsigned char type, void **ptr)
{
struct usb_descriptor_header *header;
while (size >= sizeof(struct usb_descriptor_header)) {
header = (struct usb_descriptor_header *)buffer;
if (header->bLength < 2) {
printk(KERN_ERR
"%s: bogus descriptor, type %d length %d\n",
usbcore_name,
header->bDescriptorType,
header->bLength);
return -1;
}
if (header->bDescriptorType == type) {
*ptr = header;
return 0;
}
buffer += header->bLength;
size -= header->bLength;
}
return -1;
} | 109 | True | 1 |
|
CVE-2018-20169 | False | False | False | False | AV:L/AC:L/Au:N/C:C/I:C/A:C | LOCAL | LOW | NONE | COMPLETE | COMPLETE | COMPLETE | 7.2 | CVSS:3.0/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | PHYSICAL | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 6.8 | MEDIUM | 0.9 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/704620afc70cf47abb9d6a1a57f3825d2bca49cf', 'name': 'https://github.com/torvalds/linux/commit/704620afc70cf47abb9d6a1a57f3825d2bca49cf', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.9', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.9', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=704620afc70cf47abb9d6a1a57f3825d2bca49cf', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=704620afc70cf47abb9d6a1a57f3825d2bca49cf', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/3879-2/', 'name': 'USN-3879-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3879-1/', 'name': 'USN-3879-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00034.html', 'name': '[debian-lts-announce] 20190327 [SECURITY] [DLA 1731-1] linux security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/04/msg00004.html', 'name': '[debian-lts-announce] 20190401 [SECURITY] [DLA 1731-2] linux regression update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/05/msg00002.html', 'name': '[debian-lts-announce] 20190503 [SECURITY] [DLA 1771-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/4094-1/', 'name': 'USN-4094-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4118-1/', 'name': 'USN-4118-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3517', 'name': 'RHSA-2019:3517', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3309', 'name': 'RHSA-2019:3309', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-400'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.19.9', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel before 4.19.9. The USB subsystem mishandles size checks during the reading of an extra descriptor, related to __usb_get_extra_descriptor in drivers/usb/core/usb.c.'}] | 2019-08-13T19:15Z | 2018-12-17T07:29Z | Uncontrolled Resource Consumption | The software does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. |
Limited resources include memory, file system storage, database connection pool entries, and CPU. If an attacker can trigger the allocation of these limited resources, but the number or size of the resources is not controlled, then the attacker could cause a denial of service that consumes all available resources. This would prevent valid users from accessing the software, and it could potentially have an impact on the surrounding environment. For example, a memory exhaustion attack against an application could slow down the application as well as its host operating system.
There are at least three distinct scenarios which can commonly lead to resource exhaustion:
Lack of throttling for the number of allocated resources
Losing all references to a resource before reaching the shutdown stage
Not closing/returning a resource after processing
Resource exhaustion problems are often result due to an incorrect implementation of the following situations:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for releasing the resource.
| https://cwe.mitre.org/data/definitions/400.html | 0 | Mathias Payer | 2018-12-05 21:19:59+01:00 | 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]> | 704620afc70cf47abb9d6a1a57f3825d2bca49cf | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | hwahc_security_create | hwahc_security_create( struct hwahc * hwahc) | ['hwahc'] | static int hwahc_security_create(struct hwahc *hwahc)
{
int result;
struct wusbhc *wusbhc = &hwahc->wusbhc;
struct usb_device *usb_dev = hwahc->wa.usb_dev;
struct device *dev = &usb_dev->dev;
struct usb_security_descriptor *secd;
struct usb_encryption_descriptor *etd;
void *itr, *top;
size_t itr_size, needed, bytes;
u8 index;
char buf[64];
/* Find the host's security descriptors in the config descr bundle */
index = (usb_dev->actconfig - usb_dev->config) /
sizeof(usb_dev->config[0]);
itr = usb_dev->rawdescriptors[index];
itr_size = le16_to_cpu(usb_dev->actconfig->desc.wTotalLength);
top = itr + itr_size;
result = __usb_get_extra_descriptor(usb_dev->rawdescriptors[index],
le16_to_cpu(usb_dev->actconfig->desc.wTotalLength),
USB_DT_SECURITY, (void **) &secd);
if (result == -1) {
dev_warn(dev, "BUG? WUSB host has no security descriptors\n");
return 0;
}
needed = sizeof(*secd);
if (top - (void *)secd < needed) {
dev_err(dev, "BUG? Not enough data to process security "
"descriptor header (%zu bytes left vs %zu needed)\n",
top - (void *) secd, needed);
return 0;
}
needed = le16_to_cpu(secd->wTotalLength);
if (top - (void *)secd < needed) {
dev_err(dev, "BUG? Not enough data to process security "
"descriptors (%zu bytes left vs %zu needed)\n",
top - (void *) secd, needed);
return 0;
}
/* Walk over the sec descriptors and store CCM1's on wusbhc */
itr = (void *) secd + sizeof(*secd);
top = (void *) secd + le16_to_cpu(secd->wTotalLength);
index = 0;
bytes = 0;
while (itr < top) {
etd = itr;
if (top - itr < sizeof(*etd)) {
dev_err(dev, "BUG: bad host security descriptor; "
"not enough data (%zu vs %zu left)\n",
top - itr, sizeof(*etd));
break;
}
if (etd->bLength < sizeof(*etd)) {
dev_err(dev, "BUG: bad host encryption descriptor; "
"descriptor is too short "
"(%zu vs %zu needed)\n",
(size_t)etd->bLength, sizeof(*etd));
break;
}
itr += etd->bLength;
bytes += snprintf(buf + bytes, sizeof(buf) - bytes,
"%s (0x%02x) ",
wusb_et_name(etd->bEncryptionType),
etd->bEncryptionValue);
wusbhc->ccm1_etd = etd;
}
dev_info(dev, "supported encryption types: %s\n", buf);
if (wusbhc->ccm1_etd == NULL) {
dev_err(dev, "E: host doesn't support CCM-1 crypto\n");
return 0;
}
/* Pretty print what we support */
return 0;
} | 458 | True | 1 |
|
CVE-2018-20784 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/c40f7d74c741a907cfaeb73a7697081881c497d0', 'name': 'https://github.com/torvalds/linux/commit/c40f7d74c741a907cfaeb73a7697081881c497d0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.2', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.2', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c40f7d74c741a907cfaeb73a7697081881c497d0', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c40f7d74c741a907cfaeb73a7697081881c497d0', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:1959', 'name': 'RHSA-2019:1959', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:1971', 'name': 'RHSA-2019:1971', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/4115-1/', 'name': 'USN-4115-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/4118-1/', 'name': 'USN-4118-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/4211-2/', 'name': 'USN-4211-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/4211-1/', 'name': 'USN-4211-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-835'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.19', 'versionEndExcluding': '4.19.15', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.20', 'versionEndExcluding': '4.20.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.13', 'versionEndExcluding': '4.14.93', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:5.0:rc1:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:esm:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_for_real_time:8:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': "In the Linux kernel before 4.20.2, kernel/sched/fair.c mishandles leaf cfs_rq's, which allows attackers to cause a denial of service (infinite loop in update_blocked_averages) or possibly have unspecified other impact by inducing a high load."}] | 2021-06-02T15:28Z | 2019-02-22T15:29Z | Loop with Unreachable Exit Condition ('Infinite Loop') | The program contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. | If the loop can be influenced by an attacker, this weakness could allow attackers to consume excessive resources such as CPU or memory.
| https://cwe.mitre.org/data/definitions/835.html | 0 | Linus Torvalds | 2018-12-27 13:46:17-08:00 | sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c
Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the
scheduler under high loads, starting at around the v4.18 time frame,
and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list
manipulation.
Do a (manual) revert of:
a9e7f6544b9c ("sched/fair: Fix O(nr_cgroups) in load balance path")
It turns out that the list_del_leaf_cfs_rq() introduced by this commit
is a surprising property that was not considered in followup commits
such as:
9c2791f936ef ("sched/fair: Fix hierarchical order in rq->leaf_cfs_rq_list")
As Vincent Guittot explains:
"I think that there is a bigger problem with commit a9e7f6544b9c and
cfs_rq throttling:
Let take the example of the following topology TG2 --> TG1 --> root:
1) The 1st time a task is enqueued, we will add TG2 cfs_rq then TG1
cfs_rq to leaf_cfs_rq_list and we are sure to do the whole branch in
one path because it has never been used and can't be throttled so
tmp_alone_branch will point to leaf_cfs_rq_list at the end.
2) Then TG1 is throttled
3) and we add TG3 as a new child of TG1.
4) The 1st enqueue of a task on TG3 will add TG3 cfs_rq just before TG1
cfs_rq and tmp_alone_branch will stay on rq->leaf_cfs_rq_list.
With commit a9e7f6544b9c, we can del a cfs_rq from rq->leaf_cfs_rq_list.
So if the load of TG1 cfs_rq becomes NULL before step 2) above, TG1
cfs_rq is removed from the list.
Then at step 4), TG3 cfs_rq is added at the beginning of rq->leaf_cfs_rq_list
but tmp_alone_branch still points to TG3 cfs_rq because its throttled
parent can't be enqueued when the lock is released.
tmp_alone_branch doesn't point to rq->leaf_cfs_rq_list whereas it should.
So if TG3 cfs_rq is removed or destroyed before tmp_alone_branch
points on another TG cfs_rq, the next TG cfs_rq that will be added,
will be linked outside rq->leaf_cfs_rq_list - which is bad.
In addition, we can break the ordering of the cfs_rq in
rq->leaf_cfs_rq_list but this ordering is used to update and
propagate the update from leaf down to root."
Instead of trying to work through all these cases and trying to reproduce
the very high loads that produced the lockup to begin with, simplify
the code temporarily by reverting a9e7f6544b9c - which change was clearly
not thought through completely.
This (hopefully) gives us a kernel that doesn't lock up so people
can continue to enjoy their holidays without worrying about regressions. ;-)
[ mingo: Wrote changelog, fixed weird spelling in code comment while at it. ]
Analyzed-by: Xie XiuQi <[email protected]>
Analyzed-by: Vincent Guittot <[email protected]>
Reported-by: Zhipeng Xie <[email protected]>
Reported-by: Sargun Dhillon <[email protected]>
Reported-by: Xie XiuQi <[email protected]>
Tested-by: Zhipeng Xie <[email protected]>
Tested-by: Sargun Dhillon <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Acked-by: Vincent Guittot <[email protected]>
Cc: <[email protected]> # v4.13+
Cc: Bin Li <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Fixes: a9e7f6544b9c ("sched/fair: Fix O(nr_cgroups) in load balance path")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]> | c40f7d74c741a907cfaeb73a7697081881c497d0 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | cfs_rq_is_decayed | cfs_rq_is_decayed( struct cfs_rq * cfs_rq) | ['cfs_rq'] | static inline bool cfs_rq_is_decayed(struct cfs_rq *cfs_rq)
{
if (cfs_rq->load.weight)
return false;
if (cfs_rq->avg.load_sum)
return false;
if (cfs_rq->avg.util_sum)
return false;
if (cfs_rq->avg.runnable_load_sum)
return false;
return true;
} | 56 | True | 1 |
|
CVE-2018-20784 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/c40f7d74c741a907cfaeb73a7697081881c497d0', 'name': 'https://github.com/torvalds/linux/commit/c40f7d74c741a907cfaeb73a7697081881c497d0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.2', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.2', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c40f7d74c741a907cfaeb73a7697081881c497d0', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c40f7d74c741a907cfaeb73a7697081881c497d0', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:1959', 'name': 'RHSA-2019:1959', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:1971', 'name': 'RHSA-2019:1971', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/4115-1/', 'name': 'USN-4115-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/4118-1/', 'name': 'USN-4118-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/4211-2/', 'name': 'USN-4211-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/4211-1/', 'name': 'USN-4211-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-835'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.19', 'versionEndExcluding': '4.19.15', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.20', 'versionEndExcluding': '4.20.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.13', 'versionEndExcluding': '4.14.93', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:5.0:rc1:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:esm:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_for_real_time:8:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': "In the Linux kernel before 4.20.2, kernel/sched/fair.c mishandles leaf cfs_rq's, which allows attackers to cause a denial of service (infinite loop in update_blocked_averages) or possibly have unspecified other impact by inducing a high load."}] | 2021-06-02T15:28Z | 2019-02-22T15:29Z | Loop with Unreachable Exit Condition ('Infinite Loop') | The program contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. | If the loop can be influenced by an attacker, this weakness could allow attackers to consume excessive resources such as CPU or memory.
| https://cwe.mitre.org/data/definitions/835.html | 0 | Linus Torvalds | 2018-12-27 13:46:17-08:00 | sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c
Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the
scheduler under high loads, starting at around the v4.18 time frame,
and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list
manipulation.
Do a (manual) revert of:
a9e7f6544b9c ("sched/fair: Fix O(nr_cgroups) in load balance path")
It turns out that the list_del_leaf_cfs_rq() introduced by this commit
is a surprising property that was not considered in followup commits
such as:
9c2791f936ef ("sched/fair: Fix hierarchical order in rq->leaf_cfs_rq_list")
As Vincent Guittot explains:
"I think that there is a bigger problem with commit a9e7f6544b9c and
cfs_rq throttling:
Let take the example of the following topology TG2 --> TG1 --> root:
1) The 1st time a task is enqueued, we will add TG2 cfs_rq then TG1
cfs_rq to leaf_cfs_rq_list and we are sure to do the whole branch in
one path because it has never been used and can't be throttled so
tmp_alone_branch will point to leaf_cfs_rq_list at the end.
2) Then TG1 is throttled
3) and we add TG3 as a new child of TG1.
4) The 1st enqueue of a task on TG3 will add TG3 cfs_rq just before TG1
cfs_rq and tmp_alone_branch will stay on rq->leaf_cfs_rq_list.
With commit a9e7f6544b9c, we can del a cfs_rq from rq->leaf_cfs_rq_list.
So if the load of TG1 cfs_rq becomes NULL before step 2) above, TG1
cfs_rq is removed from the list.
Then at step 4), TG3 cfs_rq is added at the beginning of rq->leaf_cfs_rq_list
but tmp_alone_branch still points to TG3 cfs_rq because its throttled
parent can't be enqueued when the lock is released.
tmp_alone_branch doesn't point to rq->leaf_cfs_rq_list whereas it should.
So if TG3 cfs_rq is removed or destroyed before tmp_alone_branch
points on another TG cfs_rq, the next TG cfs_rq that will be added,
will be linked outside rq->leaf_cfs_rq_list - which is bad.
In addition, we can break the ordering of the cfs_rq in
rq->leaf_cfs_rq_list but this ordering is used to update and
propagate the update from leaf down to root."
Instead of trying to work through all these cases and trying to reproduce
the very high loads that produced the lockup to begin with, simplify
the code temporarily by reverting a9e7f6544b9c - which change was clearly
not thought through completely.
This (hopefully) gives us a kernel that doesn't lock up so people
can continue to enjoy their holidays without worrying about regressions. ;-)
[ mingo: Wrote changelog, fixed weird spelling in code comment while at it. ]
Analyzed-by: Xie XiuQi <[email protected]>
Analyzed-by: Vincent Guittot <[email protected]>
Reported-by: Zhipeng Xie <[email protected]>
Reported-by: Sargun Dhillon <[email protected]>
Reported-by: Xie XiuQi <[email protected]>
Tested-by: Zhipeng Xie <[email protected]>
Tested-by: Sargun Dhillon <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Acked-by: Vincent Guittot <[email protected]>
Cc: <[email protected]> # v4.13+
Cc: Bin Li <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Fixes: a9e7f6544b9c ("sched/fair: Fix O(nr_cgroups) in load balance path")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]> | c40f7d74c741a907cfaeb73a7697081881c497d0 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | print_cfs_stats | print_cfs_stats( struct seq_file * m , int cpu) | ['m', 'cpu'] | void print_cfs_stats(struct seq_file *m, int cpu)
{
struct cfs_rq *cfs_rq, *pos;
rcu_read_lock();
for_each_leaf_cfs_rq_safe(cpu_rq(cpu), cfs_rq, pos)
print_cfs_rq(m, cpu, cfs_rq);
rcu_read_unlock();
} | 48 | True | 1 |
|
CVE-2018-20784 | False | False | False | False | AV:N/AC:L/Au:N/C:P/I:P/A:P | NETWORK | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 9.8 | CRITICAL | 3.9 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/c40f7d74c741a907cfaeb73a7697081881c497d0', 'name': 'https://github.com/torvalds/linux/commit/c40f7d74c741a907cfaeb73a7697081881c497d0', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.2', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.2', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c40f7d74c741a907cfaeb73a7697081881c497d0', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c40f7d74c741a907cfaeb73a7697081881c497d0', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:1959', 'name': 'RHSA-2019:1959', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:1971', 'name': 'RHSA-2019:1971', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/4115-1/', 'name': 'USN-4115-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/4118-1/', 'name': 'USN-4118-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/4211-2/', 'name': 'USN-4211-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/4211-1/', 'name': 'USN-4211-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-835'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.19', 'versionEndExcluding': '4.19.15', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.20', 'versionEndExcluding': '4.20.2', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.13', 'versionEndExcluding': '4.14.93', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:5.0:rc1:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:esm:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_for_real_time:8:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': "In the Linux kernel before 4.20.2, kernel/sched/fair.c mishandles leaf cfs_rq's, which allows attackers to cause a denial of service (infinite loop in update_blocked_averages) or possibly have unspecified other impact by inducing a high load."}] | 2021-06-02T15:28Z | 2019-02-22T15:29Z | Loop with Unreachable Exit Condition ('Infinite Loop') | The program contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. | If the loop can be influenced by an attacker, this weakness could allow attackers to consume excessive resources such as CPU or memory.
| https://cwe.mitre.org/data/definitions/835.html | 0 | Linus Torvalds | 2018-12-27 13:46:17-08:00 | sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c
Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the
scheduler under high loads, starting at around the v4.18 time frame,
and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list
manipulation.
Do a (manual) revert of:
a9e7f6544b9c ("sched/fair: Fix O(nr_cgroups) in load balance path")
It turns out that the list_del_leaf_cfs_rq() introduced by this commit
is a surprising property that was not considered in followup commits
such as:
9c2791f936ef ("sched/fair: Fix hierarchical order in rq->leaf_cfs_rq_list")
As Vincent Guittot explains:
"I think that there is a bigger problem with commit a9e7f6544b9c and
cfs_rq throttling:
Let take the example of the following topology TG2 --> TG1 --> root:
1) The 1st time a task is enqueued, we will add TG2 cfs_rq then TG1
cfs_rq to leaf_cfs_rq_list and we are sure to do the whole branch in
one path because it has never been used and can't be throttled so
tmp_alone_branch will point to leaf_cfs_rq_list at the end.
2) Then TG1 is throttled
3) and we add TG3 as a new child of TG1.
4) The 1st enqueue of a task on TG3 will add TG3 cfs_rq just before TG1
cfs_rq and tmp_alone_branch will stay on rq->leaf_cfs_rq_list.
With commit a9e7f6544b9c, we can del a cfs_rq from rq->leaf_cfs_rq_list.
So if the load of TG1 cfs_rq becomes NULL before step 2) above, TG1
cfs_rq is removed from the list.
Then at step 4), TG3 cfs_rq is added at the beginning of rq->leaf_cfs_rq_list
but tmp_alone_branch still points to TG3 cfs_rq because its throttled
parent can't be enqueued when the lock is released.
tmp_alone_branch doesn't point to rq->leaf_cfs_rq_list whereas it should.
So if TG3 cfs_rq is removed or destroyed before tmp_alone_branch
points on another TG cfs_rq, the next TG cfs_rq that will be added,
will be linked outside rq->leaf_cfs_rq_list - which is bad.
In addition, we can break the ordering of the cfs_rq in
rq->leaf_cfs_rq_list but this ordering is used to update and
propagate the update from leaf down to root."
Instead of trying to work through all these cases and trying to reproduce
the very high loads that produced the lockup to begin with, simplify
the code temporarily by reverting a9e7f6544b9c - which change was clearly
not thought through completely.
This (hopefully) gives us a kernel that doesn't lock up so people
can continue to enjoy their holidays without worrying about regressions. ;-)
[ mingo: Wrote changelog, fixed weird spelling in code comment while at it. ]
Analyzed-by: Xie XiuQi <[email protected]>
Analyzed-by: Vincent Guittot <[email protected]>
Reported-by: Zhipeng Xie <[email protected]>
Reported-by: Sargun Dhillon <[email protected]>
Reported-by: Xie XiuQi <[email protected]>
Tested-by: Zhipeng Xie <[email protected]>
Tested-by: Sargun Dhillon <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Acked-by: Vincent Guittot <[email protected]>
Cc: <[email protected]> # v4.13+
Cc: Bin Li <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Fixes: a9e7f6544b9c ("sched/fair: Fix O(nr_cgroups) in load balance path")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]> | c40f7d74c741a907cfaeb73a7697081881c497d0 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | update_blocked_averages | update_blocked_averages( int cpu) | ['cpu'] | static void update_blocked_averages(int cpu)
{
struct rq *rq = cpu_rq(cpu);
struct cfs_rq *cfs_rq, *pos;
const struct sched_class *curr_class;
struct rq_flags rf;
bool done = true;
rq_lock_irqsave(rq, &rf);
update_rq_clock(rq);
/*
* Iterates the task_group tree in a bottom up fashion, see
* list_add_leaf_cfs_rq() for details.
*/
for_each_leaf_cfs_rq_safe(rq, cfs_rq, pos) {
struct sched_entity *se;
/* throttled entities do not contribute to load */
if (throttled_hierarchy(cfs_rq))
continue;
if (update_cfs_rq_load_avg(cfs_rq_clock_task(cfs_rq), cfs_rq))
update_tg_load_avg(cfs_rq, 0);
/* Propagate pending load changes to the parent, if any: */
se = cfs_rq->tg->se[cpu];
if (se && !skip_blocked_update(se))
update_load_avg(cfs_rq_of(se), se, 0);
/*
* There can be a lot of idle CPU cgroups. Don't let fully
* decayed cfs_rqs linger on the list.
*/
if (cfs_rq_is_decayed(cfs_rq))
list_del_leaf_cfs_rq(cfs_rq);
/* Don't need periodic decay once load/util_avg are null */
if (cfs_rq_has_blocked(cfs_rq))
done = false;
}
curr_class = rq->curr->sched_class;
update_rt_rq_load_avg(rq_clock_task(rq), rq, curr_class == &rt_sched_class);
update_dl_rq_load_avg(rq_clock_task(rq), rq, curr_class == &dl_sched_class);
update_irq_load_avg(rq, 0);
/* Don't need periodic decay once load/util_avg are null */
if (others_have_blocked(rq))
done = false;
#ifdef CONFIG_NO_HZ_COMMON
rq->last_blocked_load_update_tick = jiffies;
if (done)
rq->has_blocked_load = 0;
#endif
rq_unlock_irqrestore(rq, &rf);
} | 232 | True | 1 |
|
CVE-2019-7308 | False | False | False | False | AV:L/AC:M/Au:N/C:C/I:N/A:N | LOCAL | MEDIUM | NONE | COMPLETE | NONE | NONE | 4.7 | CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N | LOCAL | HIGH | LOW | NONE | CHANGED | HIGH | NONE | NONE | 5.6 | MEDIUM | 1.1 | 4.0 | False | [{'url': 'https://github.com/torvalds/linux/commit/d3bd7413e0ca40b60cf60d4003246d067cafdeda', 'name': 'https://github.com/torvalds/linux/commit/d3bd7413e0ca40b60cf60d4003246d067cafdeda', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/979d63d50c0c0f7bc537bf821e056cc9fe5abd38', 'name': 'https://github.com/torvalds/linux/commit/979d63d50c0c0f7bc537bf821e056cc9fe5abd38', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.6', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.6', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1711', 'name': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1711', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d3bd7413e0ca40b60cf60d4003246d067cafdeda', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d3bd7413e0ca40b60cf60d4003246d067cafdeda', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=979d63d50c0c0f7bc537bf821e056cc9fe5abd38', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=979d63d50c0c0f7bc537bf821e056cc9fe5abd38', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/106827', 'name': '106827', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://usn.ubuntu.com/3931-2/', 'name': 'USN-3931-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3931-1/', 'name': 'USN-3931-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3930-2/', 'name': 'USN-3930-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3930-1/', 'name': 'USN-3930-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00052.html', 'name': 'openSUSE-SU-2019:1193', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'https://support.f5.com/csp/article/K43030517', 'name': 'https://support.f5.com/csp/article/K43030517', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K43030517?utm_source=f5support&utm_medium=RSS', 'name': 'https://support.f5.com/csp/article/K43030517?utm_source=f5support&utm_medium=RSS', 'refsource': 'CONFIRM', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-189'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.19.19', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.20.0', 'versionEndExcluding': '4.20.6', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:15.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'kernel/bpf/verifier.c in the Linux kernel before 4.20.6 performs undesirable out-of-bounds speculation on pointer arithmetic in various cases, including cases of different branches with different state or limits to sanitize, leading to side-channel attacks.'}] | 2019-09-24T20:15Z | 2019-02-01T22:29Z | Numeric Errors | Weaknesses in this category are related to improper calculation or conversion of numbers. | https://cwe.mitre.org/data/definitions/189.html | 1 | Daniel Borkmann | 2019-01-03 00:58:34+01:00 | bpf: prevent out of bounds speculation on pointer arithmetic
Jann reported that the original commit back in b2157399cc98
("bpf: prevent out-of-bounds speculation") was not sufficient
to stop CPU from speculating out of bounds memory access:
While b2157399cc98 only focussed on masking array map access
for unprivileged users for tail calls and data access such
that the user provided index gets sanitized from BPF program
and syscall side, there is still a more generic form affected
from BPF programs that applies to most maps that hold user
data in relation to dynamic map access when dealing with
unknown scalars or "slow" known scalars as access offset, for
example:
- Load a map value pointer into R6
- Load an index into R7
- Do a slow computation (e.g. with a memory dependency) that
loads a limit into R8 (e.g. load the limit from a map for
high latency, then mask it to make the verifier happy)
- Exit if R7 >= R8 (mispredicted branch)
- Load R0 = R6[R7]
- Load R0 = R6[R0]
For unknown scalars there are two options in the BPF verifier
where we could derive knowledge from in order to guarantee
safe access to the memory: i) While </>/<=/>= variants won't
allow to derive any lower or upper bounds from the unknown
scalar where it would be safe to add it to the map value
pointer, it is possible through ==/!= test however. ii) another
option is to transform the unknown scalar into a known scalar,
for example, through ALU ops combination such as R &= <imm>
followed by R |= <imm> or any similar combination where the
original information from the unknown scalar would be destroyed
entirely leaving R with a constant. The initial slow load still
precedes the latter ALU ops on that register, so the CPU
executes speculatively from that point. Once we have the known
scalar, any compare operation would work then. A third option
only involving registers with known scalars could be crafted
as described in [0] where a CPU port (e.g. Slow Int unit)
would be filled with many dependent computations such that
the subsequent condition depending on its outcome has to wait
for evaluation on its execution port and thereby executing
speculatively if the speculated code can be scheduled on a
different execution port, or any other form of mistraining
as described in [1], for example. Given this is not limited
to only unknown scalars, not only map but also stack access
is affected since both is accessible for unprivileged users
and could potentially be used for out of bounds access under
speculation.
In order to prevent any of these cases, the verifier is now
sanitizing pointer arithmetic on the offset such that any
out of bounds speculation would be masked in a way where the
pointer arithmetic result in the destination register will
stay unchanged, meaning offset masked into zero similar as
in array_index_nospec() case. With regards to implementation,
there are three options that were considered: i) new insn
for sanitation, ii) push/pop insn and sanitation as inlined
BPF, iii) reuse of ax register and sanitation as inlined BPF.
Option i) has the downside that we end up using from reserved
bits in the opcode space, but also that we would require
each JIT to emit masking as native arch opcodes meaning
mitigation would have slow adoption till everyone implements
it eventually which is counter-productive. Option ii) and iii)
have both in common that a temporary register is needed in
order to implement the sanitation as inlined BPF since we
are not allowed to modify the source register. While a push /
pop insn in ii) would be useful to have in any case, it
requires once again that every JIT needs to implement it
first. While possible, amount of changes needed would also
be unsuitable for a -stable patch. Therefore, the path which
has fewer changes, less BPF instructions for the mitigation
and does not require anything to be changed in the JITs is
option iii) which this work is pursuing. The ax register is
already mapped to a register in all JITs (modulo arm32 where
it's mapped to stack as various other BPF registers there)
and used in constant blinding for JITs-only so far. It can
be reused for verifier rewrites under certain constraints.
The interpreter's tmp "register" has therefore been remapped
into extending the register set with hidden ax register and
reusing that for a number of instructions that needed the
prior temporary variable internally (e.g. div, mod). This
allows for zero increase in stack space usage in the interpreter,
and enables (restricted) generic use in rewrites otherwise as
long as such a patchlet does not make use of these instructions.
The sanitation mask is dynamic and relative to the offset the
map value or stack pointer currently holds.
There are various cases that need to be taken under consideration
for the masking, e.g. such operation could look as follows:
ptr += val or val += ptr or ptr -= val. Thus, the value to be
sanitized could reside either in source or in destination
register, and the limit is different depending on whether
the ALU op is addition or subtraction and depending on the
current known and bounded offset. The limit is derived as
follows: limit := max_value_size - (smin_value + off). For
subtraction: limit := umax_value + off. This holds because
we do not allow any pointer arithmetic that would
temporarily go out of bounds or would have an unknown
value with mixed signed bounds where it is unclear at
verification time whether the actual runtime value would
be either negative or positive. For example, we have a
derived map pointer value with constant offset and bounded
one, so limit based on smin_value works because the verifier
requires that statically analyzed arithmetic on the pointer
must be in bounds, and thus it checks if resulting
smin_value + off and umax_value + off is still within map
value bounds at time of arithmetic in addition to time of
access. Similarly, for the case of stack access we derive
the limit as follows: MAX_BPF_STACK + off for subtraction
and -off for the case of addition where off := ptr_reg->off +
ptr_reg->var_off.value. Subtraction is a special case for
the masking which can be in form of ptr += -val, ptr -= -val,
or ptr -= val. In the first two cases where we know that
the value is negative, we need to temporarily negate the
value in order to do the sanitation on a positive value
where we later swap the ALU op, and restore original source
register if the value was in source.
The sanitation of pointer arithmetic alone is still not fully
sufficient as is, since a scenario like the following could
happen ...
PTR += 0x1000 (e.g. K-based imm)
PTR -= BIG_NUMBER_WITH_SLOW_COMPARISON
PTR += 0x1000
PTR -= BIG_NUMBER_WITH_SLOW_COMPARISON
[...]
... which under speculation could end up as ...
PTR += 0x1000
PTR -= 0 [ truncated by mitigation ]
PTR += 0x1000
PTR -= 0 [ truncated by mitigation ]
[...]
... and therefore still access out of bounds. To prevent such
case, the verifier is also analyzing safety for potential out
of bounds access under speculative execution. Meaning, it is
also simulating pointer access under truncation. We therefore
"branch off" and push the current verification state after the
ALU operation with known 0 to the verification stack for later
analysis. Given the current path analysis succeeded it is
likely that the one under speculation can be pruned. In any
case, it is also subject to existing complexity limits and
therefore anything beyond this point will be rejected. In
terms of pruning, it needs to be ensured that the verification
state from speculative execution simulation must never prune
a non-speculative execution path, therefore, we mark verifier
state accordingly at the time of push_stack(). If verifier
detects out of bounds access under speculative execution from
one of the possible paths that includes a truncation, it will
reject such program.
Given we mask every reg-based pointer arithmetic for
unprivileged programs, we've been looking into how it could
affect real-world programs in terms of size increase. As the
majority of programs are targeted for privileged-only use
case, we've unconditionally enabled masking (with its alu
restrictions on top of it) for privileged programs for the
sake of testing in order to check i) whether they get rejected
in its current form, and ii) by how much the number of
instructions and size will increase. We've tested this by
using Katran, Cilium and test_l4lb from the kernel selftests.
For Katran we've evaluated balancer_kern.o, Cilium bpf_lxc.o
and an older test object bpf_lxc_opt_-DUNKNOWN.o and l4lb
we've used test_l4lb.o as well as test_l4lb_noinline.o. We
found that none of the programs got rejected by the verifier
with this change, and that impact is rather minimal to none.
balancer_kern.o had 13,904 bytes (1,738 insns) xlated and
7,797 bytes JITed before and after the change. Most complex
program in bpf_lxc.o had 30,544 bytes (3,817 insns) xlated
and 18,538 bytes JITed before and after and none of the other
tail call programs in bpf_lxc.o had any changes either. For
the older bpf_lxc_opt_-DUNKNOWN.o object we found a small
increase from 20,616 bytes (2,576 insns) and 12,536 bytes JITed
before to 20,664 bytes (2,582 insns) and 12,558 bytes JITed
after the change. Other programs from that object file had
similar small increase. Both test_l4lb.o had no change and
remained at 6,544 bytes (817 insns) xlated and 3,401 bytes
JITed and for test_l4lb_noinline.o constant at 5,080 bytes
(634 insns) xlated and 3,313 bytes JITed. This can be explained
in that LLVM typically optimizes stack based pointer arithmetic
by using K-based operations and that use of dynamic map access
is not overly frequent. However, in future we may decide to
optimize the algorithm further under known guarantees from
branch and value speculation. Latter seems also unclear in
terms of prediction heuristics that today's CPUs apply as well
as whether there could be collisions in e.g. the predictor's
Value History/Pattern Table for triggering out of bounds access,
thus masking is performed unconditionally at this point but could
be subject to relaxation later on. We were generally also
brainstorming various other approaches for mitigation, but the
blocker was always lack of available registers at runtime and/or
overhead for runtime tracking of limits belonging to a specific
pointer. Thus, we found this to be minimally intrusive under
given constraints.
With that in place, a simple example with sanitized access on
unprivileged load at post-verification time looks as follows:
# bpftool prog dump xlated id 282
[...]
28: (79) r1 = *(u64 *)(r7 +0)
29: (79) r2 = *(u64 *)(r7 +8)
30: (57) r1 &= 15
31: (79) r3 = *(u64 *)(r0 +4608)
32: (57) r3 &= 1
33: (47) r3 |= 1
34: (2d) if r2 > r3 goto pc+19
35: (b4) (u32) r11 = (u32) 20479 |
36: (1f) r11 -= r2 | Dynamic sanitation for pointer
37: (4f) r11 |= r2 | arithmetic with registers
38: (87) r11 = -r11 | containing bounded or known
39: (c7) r11 s>>= 63 | scalars in order to prevent
40: (5f) r11 &= r2 | out of bounds speculation.
41: (0f) r4 += r11 |
42: (71) r4 = *(u8 *)(r4 +0)
43: (6f) r4 <<= r1
[...]
For the case where the scalar sits in the destination register
as opposed to the source register, the following code is emitted
for the above example:
[...]
16: (b4) (u32) r11 = (u32) 20479
17: (1f) r11 -= r2
18: (4f) r11 |= r2
19: (87) r11 = -r11
20: (c7) r11 s>>= 63
21: (5f) r2 &= r11
22: (0f) r2 += r0
23: (61) r0 = *(u32 *)(r2 +0)
[...]
JIT blinding example with non-conflicting use of r10:
[...]
d5: je 0x0000000000000106 _
d7: mov 0x0(%rax),%edi |
da: mov $0xf153246,%r10d | Index load from map value and
e0: xor $0xf153259,%r10 | (const blinded) mask with 0x1f.
e7: and %r10,%rdi |_
ea: mov $0x2f,%r10d |
f0: sub %rdi,%r10 | Sanitized addition. Both use r10
f3: or %rdi,%r10 | but do not interfere with each
f6: neg %r10 | other. (Neither do these instructions
f9: sar $0x3f,%r10 | interfere with the use of ax as temp
fd: and %r10,%rdi | in interpreter.)
100: add %rax,%rdi |_
103: mov 0x0(%rdi),%eax
[...]
Tested that it fixes Jann's reproducer, and also checked that test_verifier
and test_progs suite with interpreter, JIT and JIT with hardening enabled
on x86-64 and arm64 runs successfully.
[0] Speculose: Analyzing the Security Implications of Speculative
Execution in CPUs, Giorgi Maisuradze and Christian Rossow,
https://arxiv.org/pdf/1801.04084.pdf
[1] A Systematic Evaluation of Transient Execution Attacks and
Defenses, Claudio Canella, Jo Van Bulck, Michael Schwarz,
Moritz Lipp, Benjamin von Berg, Philipp Ortner, Frank Piessens,
Dmitry Evtyushkin, Daniel Gruss,
https://arxiv.org/pdf/1811.05441.pdf
Fixes: b2157399cc98 ("bpf: prevent out-of-bounds speculation")
Reported-by: Jann Horn <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Alexei Starovoitov <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]> | 979d63d50c0c0f7bc537bf821e056cc9fe5abd38 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | check_cond_jmp_op | check_cond_jmp_op( struct bpf_verifier_env * env , struct bpf_insn * insn , int * insn_idx) | ['env', 'insn', 'insn_idx'] | static int check_cond_jmp_op(struct bpf_verifier_env *env,
struct bpf_insn *insn, int *insn_idx)
{
struct bpf_verifier_state *this_branch = env->cur_state;
struct bpf_verifier_state *other_branch;
struct bpf_reg_state *regs = this_branch->frame[this_branch->curframe]->regs;
struct bpf_reg_state *dst_reg, *other_branch_regs;
u8 opcode = BPF_OP(insn->code);
int err;
if (opcode > BPF_JSLE) {
verbose(env, "invalid BPF_JMP opcode %x\n", opcode);
return -EINVAL;
}
if (BPF_SRC(insn->code) == BPF_X) {
if (insn->imm != 0) {
verbose(env, "BPF_JMP uses reserved fields\n");
return -EINVAL;
}
/* check src1 operand */
err = check_reg_arg(env, insn->src_reg, SRC_OP);
if (err)
return err;
if (is_pointer_value(env, insn->src_reg)) {
verbose(env, "R%d pointer comparison prohibited\n",
insn->src_reg);
return -EACCES;
}
} else {
if (insn->src_reg != BPF_REG_0) {
verbose(env, "BPF_JMP uses reserved fields\n");
return -EINVAL;
}
}
/* check src2 operand */
err = check_reg_arg(env, insn->dst_reg, SRC_OP);
if (err)
return err;
dst_reg = ®s[insn->dst_reg];
if (BPF_SRC(insn->code) == BPF_K) {
int pred = is_branch_taken(dst_reg, insn->imm, opcode);
if (pred == 1) {
/* only follow the goto, ignore fall-through */
*insn_idx += insn->off;
return 0;
} else if (pred == 0) {
/* only follow fall-through branch, since
* that's where the program will go
*/
return 0;
}
}
other_branch = push_stack(env, *insn_idx + insn->off + 1, *insn_idx);
if (!other_branch)
return -EFAULT;
other_branch_regs = other_branch->frame[other_branch->curframe]->regs;
/* detect if we are comparing against a constant value so we can adjust
* our min/max values for our dst register.
* this is only legit if both are scalars (or pointers to the same
* object, I suppose, but we don't support that right now), because
* otherwise the different base pointers mean the offsets aren't
* comparable.
*/
if (BPF_SRC(insn->code) == BPF_X) {
if (dst_reg->type == SCALAR_VALUE &&
regs[insn->src_reg].type == SCALAR_VALUE) {
if (tnum_is_const(regs[insn->src_reg].var_off))
reg_set_min_max(&other_branch_regs[insn->dst_reg],
dst_reg, regs[insn->src_reg].var_off.value,
opcode);
else if (tnum_is_const(dst_reg->var_off))
reg_set_min_max_inv(&other_branch_regs[insn->src_reg],
®s[insn->src_reg],
dst_reg->var_off.value, opcode);
else if (opcode == BPF_JEQ || opcode == BPF_JNE)
/* Comparing for equality, we can combine knowledge */
reg_combine_min_max(&other_branch_regs[insn->src_reg],
&other_branch_regs[insn->dst_reg],
®s[insn->src_reg],
®s[insn->dst_reg], opcode);
}
} else if (dst_reg->type == SCALAR_VALUE) {
reg_set_min_max(&other_branch_regs[insn->dst_reg],
dst_reg, insn->imm, opcode);
}
/* detect if R == 0 where R is returned from bpf_map_lookup_elem() */
if (BPF_SRC(insn->code) == BPF_K &&
insn->imm == 0 && (opcode == BPF_JEQ || opcode == BPF_JNE) &&
reg_type_may_be_null(dst_reg->type)) {
/* Mark all identical registers in each branch as either
* safe or unknown depending R == 0 or R != 0 conditional.
*/
mark_ptr_or_null_regs(this_branch, insn->dst_reg,
opcode == BPF_JNE);
mark_ptr_or_null_regs(other_branch, insn->dst_reg,
opcode == BPF_JEQ);
} else if (!try_match_pkt_pointers(insn, dst_reg, ®s[insn->src_reg],
this_branch, other_branch) &&
is_pointer_value(env, insn->dst_reg)) {
verbose(env, "R%d pointer comparison prohibited\n",
insn->dst_reg);
return -EACCES;
}
if (env->log.level)
print_verifier_state(env, this_branch->frame[this_branch->curframe]);
return 0;
} | 649 | True | 1 |
||
CVE-2019-7308 | False | False | False | False | AV:L/AC:M/Au:N/C:C/I:N/A:N | LOCAL | MEDIUM | NONE | COMPLETE | NONE | NONE | 4.7 | CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N | LOCAL | HIGH | LOW | NONE | CHANGED | HIGH | NONE | NONE | 5.6 | MEDIUM | 1.1 | 4.0 | False | [{'url': 'https://github.com/torvalds/linux/commit/d3bd7413e0ca40b60cf60d4003246d067cafdeda', 'name': 'https://github.com/torvalds/linux/commit/d3bd7413e0ca40b60cf60d4003246d067cafdeda', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/979d63d50c0c0f7bc537bf821e056cc9fe5abd38', 'name': 'https://github.com/torvalds/linux/commit/979d63d50c0c0f7bc537bf821e056cc9fe5abd38', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.6', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.6', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1711', 'name': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1711', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d3bd7413e0ca40b60cf60d4003246d067cafdeda', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d3bd7413e0ca40b60cf60d4003246d067cafdeda', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=979d63d50c0c0f7bc537bf821e056cc9fe5abd38', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=979d63d50c0c0f7bc537bf821e056cc9fe5abd38', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/106827', 'name': '106827', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://usn.ubuntu.com/3931-2/', 'name': 'USN-3931-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3931-1/', 'name': 'USN-3931-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3930-2/', 'name': 'USN-3930-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3930-1/', 'name': 'USN-3930-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00052.html', 'name': 'openSUSE-SU-2019:1193', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'https://support.f5.com/csp/article/K43030517', 'name': 'https://support.f5.com/csp/article/K43030517', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K43030517?utm_source=f5support&utm_medium=RSS', 'name': 'https://support.f5.com/csp/article/K43030517?utm_source=f5support&utm_medium=RSS', 'refsource': 'CONFIRM', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-189'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.19.19', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.20.0', 'versionEndExcluding': '4.20.6', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:15.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'kernel/bpf/verifier.c in the Linux kernel before 4.20.6 performs undesirable out-of-bounds speculation on pointer arithmetic in various cases, including cases of different branches with different state or limits to sanitize, leading to side-channel attacks.'}] | 2019-09-24T20:15Z | 2019-02-01T22:29Z | Numeric Errors | Weaknesses in this category are related to improper calculation or conversion of numbers. | https://cwe.mitre.org/data/definitions/189.html | 1 | Daniel Borkmann | 2019-01-03 00:58:34+01:00 | bpf: prevent out of bounds speculation on pointer arithmetic
Jann reported that the original commit back in b2157399cc98
("bpf: prevent out-of-bounds speculation") was not sufficient
to stop CPU from speculating out of bounds memory access:
While b2157399cc98 only focussed on masking array map access
for unprivileged users for tail calls and data access such
that the user provided index gets sanitized from BPF program
and syscall side, there is still a more generic form affected
from BPF programs that applies to most maps that hold user
data in relation to dynamic map access when dealing with
unknown scalars or "slow" known scalars as access offset, for
example:
- Load a map value pointer into R6
- Load an index into R7
- Do a slow computation (e.g. with a memory dependency) that
loads a limit into R8 (e.g. load the limit from a map for
high latency, then mask it to make the verifier happy)
- Exit if R7 >= R8 (mispredicted branch)
- Load R0 = R6[R7]
- Load R0 = R6[R0]
For unknown scalars there are two options in the BPF verifier
where we could derive knowledge from in order to guarantee
safe access to the memory: i) While </>/<=/>= variants won't
allow to derive any lower or upper bounds from the unknown
scalar where it would be safe to add it to the map value
pointer, it is possible through ==/!= test however. ii) another
option is to transform the unknown scalar into a known scalar,
for example, through ALU ops combination such as R &= <imm>
followed by R |= <imm> or any similar combination where the
original information from the unknown scalar would be destroyed
entirely leaving R with a constant. The initial slow load still
precedes the latter ALU ops on that register, so the CPU
executes speculatively from that point. Once we have the known
scalar, any compare operation would work then. A third option
only involving registers with known scalars could be crafted
as described in [0] where a CPU port (e.g. Slow Int unit)
would be filled with many dependent computations such that
the subsequent condition depending on its outcome has to wait
for evaluation on its execution port and thereby executing
speculatively if the speculated code can be scheduled on a
different execution port, or any other form of mistraining
as described in [1], for example. Given this is not limited
to only unknown scalars, not only map but also stack access
is affected since both is accessible for unprivileged users
and could potentially be used for out of bounds access under
speculation.
In order to prevent any of these cases, the verifier is now
sanitizing pointer arithmetic on the offset such that any
out of bounds speculation would be masked in a way where the
pointer arithmetic result in the destination register will
stay unchanged, meaning offset masked into zero similar as
in array_index_nospec() case. With regards to implementation,
there are three options that were considered: i) new insn
for sanitation, ii) push/pop insn and sanitation as inlined
BPF, iii) reuse of ax register and sanitation as inlined BPF.
Option i) has the downside that we end up using from reserved
bits in the opcode space, but also that we would require
each JIT to emit masking as native arch opcodes meaning
mitigation would have slow adoption till everyone implements
it eventually which is counter-productive. Option ii) and iii)
have both in common that a temporary register is needed in
order to implement the sanitation as inlined BPF since we
are not allowed to modify the source register. While a push /
pop insn in ii) would be useful to have in any case, it
requires once again that every JIT needs to implement it
first. While possible, amount of changes needed would also
be unsuitable for a -stable patch. Therefore, the path which
has fewer changes, less BPF instructions for the mitigation
and does not require anything to be changed in the JITs is
option iii) which this work is pursuing. The ax register is
already mapped to a register in all JITs (modulo arm32 where
it's mapped to stack as various other BPF registers there)
and used in constant blinding for JITs-only so far. It can
be reused for verifier rewrites under certain constraints.
The interpreter's tmp "register" has therefore been remapped
into extending the register set with hidden ax register and
reusing that for a number of instructions that needed the
prior temporary variable internally (e.g. div, mod). This
allows for zero increase in stack space usage in the interpreter,
and enables (restricted) generic use in rewrites otherwise as
long as such a patchlet does not make use of these instructions.
The sanitation mask is dynamic and relative to the offset the
map value or stack pointer currently holds.
There are various cases that need to be taken under consideration
for the masking, e.g. such operation could look as follows:
ptr += val or val += ptr or ptr -= val. Thus, the value to be
sanitized could reside either in source or in destination
register, and the limit is different depending on whether
the ALU op is addition or subtraction and depending on the
current known and bounded offset. The limit is derived as
follows: limit := max_value_size - (smin_value + off). For
subtraction: limit := umax_value + off. This holds because
we do not allow any pointer arithmetic that would
temporarily go out of bounds or would have an unknown
value with mixed signed bounds where it is unclear at
verification time whether the actual runtime value would
be either negative or positive. For example, we have a
derived map pointer value with constant offset and bounded
one, so limit based on smin_value works because the verifier
requires that statically analyzed arithmetic on the pointer
must be in bounds, and thus it checks if resulting
smin_value + off and umax_value + off is still within map
value bounds at time of arithmetic in addition to time of
access. Similarly, for the case of stack access we derive
the limit as follows: MAX_BPF_STACK + off for subtraction
and -off for the case of addition where off := ptr_reg->off +
ptr_reg->var_off.value. Subtraction is a special case for
the masking which can be in form of ptr += -val, ptr -= -val,
or ptr -= val. In the first two cases where we know that
the value is negative, we need to temporarily negate the
value in order to do the sanitation on a positive value
where we later swap the ALU op, and restore original source
register if the value was in source.
The sanitation of pointer arithmetic alone is still not fully
sufficient as is, since a scenario like the following could
happen ...
PTR += 0x1000 (e.g. K-based imm)
PTR -= BIG_NUMBER_WITH_SLOW_COMPARISON
PTR += 0x1000
PTR -= BIG_NUMBER_WITH_SLOW_COMPARISON
[...]
... which under speculation could end up as ...
PTR += 0x1000
PTR -= 0 [ truncated by mitigation ]
PTR += 0x1000
PTR -= 0 [ truncated by mitigation ]
[...]
... and therefore still access out of bounds. To prevent such
case, the verifier is also analyzing safety for potential out
of bounds access under speculative execution. Meaning, it is
also simulating pointer access under truncation. We therefore
"branch off" and push the current verification state after the
ALU operation with known 0 to the verification stack for later
analysis. Given the current path analysis succeeded it is
likely that the one under speculation can be pruned. In any
case, it is also subject to existing complexity limits and
therefore anything beyond this point will be rejected. In
terms of pruning, it needs to be ensured that the verification
state from speculative execution simulation must never prune
a non-speculative execution path, therefore, we mark verifier
state accordingly at the time of push_stack(). If verifier
detects out of bounds access under speculative execution from
one of the possible paths that includes a truncation, it will
reject such program.
Given we mask every reg-based pointer arithmetic for
unprivileged programs, we've been looking into how it could
affect real-world programs in terms of size increase. As the
majority of programs are targeted for privileged-only use
case, we've unconditionally enabled masking (with its alu
restrictions on top of it) for privileged programs for the
sake of testing in order to check i) whether they get rejected
in its current form, and ii) by how much the number of
instructions and size will increase. We've tested this by
using Katran, Cilium and test_l4lb from the kernel selftests.
For Katran we've evaluated balancer_kern.o, Cilium bpf_lxc.o
and an older test object bpf_lxc_opt_-DUNKNOWN.o and l4lb
we've used test_l4lb.o as well as test_l4lb_noinline.o. We
found that none of the programs got rejected by the verifier
with this change, and that impact is rather minimal to none.
balancer_kern.o had 13,904 bytes (1,738 insns) xlated and
7,797 bytes JITed before and after the change. Most complex
program in bpf_lxc.o had 30,544 bytes (3,817 insns) xlated
and 18,538 bytes JITed before and after and none of the other
tail call programs in bpf_lxc.o had any changes either. For
the older bpf_lxc_opt_-DUNKNOWN.o object we found a small
increase from 20,616 bytes (2,576 insns) and 12,536 bytes JITed
before to 20,664 bytes (2,582 insns) and 12,558 bytes JITed
after the change. Other programs from that object file had
similar small increase. Both test_l4lb.o had no change and
remained at 6,544 bytes (817 insns) xlated and 3,401 bytes
JITed and for test_l4lb_noinline.o constant at 5,080 bytes
(634 insns) xlated and 3,313 bytes JITed. This can be explained
in that LLVM typically optimizes stack based pointer arithmetic
by using K-based operations and that use of dynamic map access
is not overly frequent. However, in future we may decide to
optimize the algorithm further under known guarantees from
branch and value speculation. Latter seems also unclear in
terms of prediction heuristics that today's CPUs apply as well
as whether there could be collisions in e.g. the predictor's
Value History/Pattern Table for triggering out of bounds access,
thus masking is performed unconditionally at this point but could
be subject to relaxation later on. We were generally also
brainstorming various other approaches for mitigation, but the
blocker was always lack of available registers at runtime and/or
overhead for runtime tracking of limits belonging to a specific
pointer. Thus, we found this to be minimally intrusive under
given constraints.
With that in place, a simple example with sanitized access on
unprivileged load at post-verification time looks as follows:
# bpftool prog dump xlated id 282
[...]
28: (79) r1 = *(u64 *)(r7 +0)
29: (79) r2 = *(u64 *)(r7 +8)
30: (57) r1 &= 15
31: (79) r3 = *(u64 *)(r0 +4608)
32: (57) r3 &= 1
33: (47) r3 |= 1
34: (2d) if r2 > r3 goto pc+19
35: (b4) (u32) r11 = (u32) 20479 |
36: (1f) r11 -= r2 | Dynamic sanitation for pointer
37: (4f) r11 |= r2 | arithmetic with registers
38: (87) r11 = -r11 | containing bounded or known
39: (c7) r11 s>>= 63 | scalars in order to prevent
40: (5f) r11 &= r2 | out of bounds speculation.
41: (0f) r4 += r11 |
42: (71) r4 = *(u8 *)(r4 +0)
43: (6f) r4 <<= r1
[...]
For the case where the scalar sits in the destination register
as opposed to the source register, the following code is emitted
for the above example:
[...]
16: (b4) (u32) r11 = (u32) 20479
17: (1f) r11 -= r2
18: (4f) r11 |= r2
19: (87) r11 = -r11
20: (c7) r11 s>>= 63
21: (5f) r2 &= r11
22: (0f) r2 += r0
23: (61) r0 = *(u32 *)(r2 +0)
[...]
JIT blinding example with non-conflicting use of r10:
[...]
d5: je 0x0000000000000106 _
d7: mov 0x0(%rax),%edi |
da: mov $0xf153246,%r10d | Index load from map value and
e0: xor $0xf153259,%r10 | (const blinded) mask with 0x1f.
e7: and %r10,%rdi |_
ea: mov $0x2f,%r10d |
f0: sub %rdi,%r10 | Sanitized addition. Both use r10
f3: or %rdi,%r10 | but do not interfere with each
f6: neg %r10 | other. (Neither do these instructions
f9: sar $0x3f,%r10 | interfere with the use of ax as temp
fd: and %r10,%rdi | in interpreter.)
100: add %rax,%rdi |_
103: mov 0x0(%rdi),%eax
[...]
Tested that it fixes Jann's reproducer, and also checked that test_verifier
and test_progs suite with interpreter, JIT and JIT with hardening enabled
on x86-64 and arm64 runs successfully.
[0] Speculose: Analyzing the Security Implications of Speculative
Execution in CPUs, Giorgi Maisuradze and Christian Rossow,
https://arxiv.org/pdf/1801.04084.pdf
[1] A Systematic Evaluation of Transient Execution Attacks and
Defenses, Claudio Canella, Jo Van Bulck, Michael Schwarz,
Moritz Lipp, Benjamin von Berg, Philipp Ortner, Frank Piessens,
Dmitry Evtyushkin, Daniel Gruss,
https://arxiv.org/pdf/1811.05441.pdf
Fixes: b2157399cc98 ("bpf: prevent out-of-bounds speculation")
Reported-by: Jann Horn <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Alexei Starovoitov <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]> | 979d63d50c0c0f7bc537bf821e056cc9fe5abd38 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | do_check | do_check( struct bpf_verifier_env * env) | ['env'] | static int do_check(struct bpf_verifier_env *env)
{
struct bpf_verifier_state *state;
struct bpf_insn *insns = env->prog->insnsi;
struct bpf_reg_state *regs;
int insn_cnt = env->prog->len, i;
int insn_processed = 0;
bool do_print_state = false;
env->prev_linfo = NULL;
state = kzalloc(sizeof(struct bpf_verifier_state), GFP_KERNEL);
if (!state)
return -ENOMEM;
state->curframe = 0;
state->frame[0] = kzalloc(sizeof(struct bpf_func_state), GFP_KERNEL);
if (!state->frame[0]) {
kfree(state);
return -ENOMEM;
}
env->cur_state = state;
init_func_state(env, state->frame[0],
BPF_MAIN_FUNC /* callsite */,
0 /* frameno */,
0 /* subprogno, zero == main subprog */);
for (;;) {
struct bpf_insn *insn;
u8 class;
int err;
if (env->insn_idx >= insn_cnt) {
verbose(env, "invalid insn idx %d insn_cnt %d\n",
env->insn_idx, insn_cnt);
return -EFAULT;
}
insn = &insns[env->insn_idx];
class = BPF_CLASS(insn->code);
if (++insn_processed > BPF_COMPLEXITY_LIMIT_INSNS) {
verbose(env,
"BPF program is too large. Processed %d insn\n",
insn_processed);
return -E2BIG;
}
err = is_state_visited(env, env->insn_idx);
if (err < 0)
return err;
if (err == 1) {
/* found equivalent state, can prune the search */
if (env->log.level) {
if (do_print_state)
verbose(env, "\nfrom %d to %d: safe\n",
env->prev_insn_idx, env->insn_idx);
else
verbose(env, "%d: safe\n", env->insn_idx);
}
goto process_bpf_exit;
}
if (signal_pending(current))
return -EAGAIN;
if (need_resched())
cond_resched();
if (env->log.level > 1 || (env->log.level && do_print_state)) {
if (env->log.level > 1)
verbose(env, "%d:", env->insn_idx);
else
verbose(env, "\nfrom %d to %d:",
env->prev_insn_idx, env->insn_idx);
print_verifier_state(env, state->frame[state->curframe]);
do_print_state = false;
}
if (env->log.level) {
const struct bpf_insn_cbs cbs = {
.cb_print = verbose,
.private_data = env,
};
verbose_linfo(env, env->insn_idx, "; ");
verbose(env, "%d: ", env->insn_idx);
print_bpf_insn(&cbs, insn, env->allow_ptr_leaks);
}
if (bpf_prog_is_dev_bound(env->prog->aux)) {
err = bpf_prog_offload_verify_insn(env, env->insn_idx,
env->prev_insn_idx);
if (err)
return err;
}
regs = cur_regs(env);
env->insn_aux_data[env->insn_idx].seen = true;
if (class == BPF_ALU || class == BPF_ALU64) {
err = check_alu_op(env, insn);
if (err)
return err;
} else if (class == BPF_LDX) {
enum bpf_reg_type *prev_src_type, src_reg_type;
/* check for reserved fields is already done */
/* check src operand */
err = check_reg_arg(env, insn->src_reg, SRC_OP);
if (err)
return err;
err = check_reg_arg(env, insn->dst_reg, DST_OP_NO_MARK);
if (err)
return err;
src_reg_type = regs[insn->src_reg].type;
/* check that memory (src_reg + off) is readable,
* the state of dst_reg will be updated by this func
*/
err = check_mem_access(env, env->insn_idx, insn->src_reg,
insn->off, BPF_SIZE(insn->code),
BPF_READ, insn->dst_reg, false);
if (err)
return err;
prev_src_type = &env->insn_aux_data[env->insn_idx].ptr_type;
if (*prev_src_type == NOT_INIT) {
/* saw a valid insn
* dst_reg = *(u32 *)(src_reg + off)
* save type to validate intersecting paths
*/
*prev_src_type = src_reg_type;
} else if (reg_type_mismatch(src_reg_type, *prev_src_type)) {
/* ABuser program is trying to use the same insn
* dst_reg = *(u32*) (src_reg + off)
* with different pointer types:
* src_reg == ctx in one branch and
* src_reg == stack|map in some other branch.
* Reject it.
*/
verbose(env, "same insn cannot be used with different pointers\n");
return -EINVAL;
}
} else if (class == BPF_STX) {
enum bpf_reg_type *prev_dst_type, dst_reg_type;
if (BPF_MODE(insn->code) == BPF_XADD) {
err = check_xadd(env, env->insn_idx, insn);
if (err)
return err;
env->insn_idx++;
continue;
}
/* check src1 operand */
err = check_reg_arg(env, insn->src_reg, SRC_OP);
if (err)
return err;
/* check src2 operand */
err = check_reg_arg(env, insn->dst_reg, SRC_OP);
if (err)
return err;
dst_reg_type = regs[insn->dst_reg].type;
/* check that memory (dst_reg + off) is writeable */
err = check_mem_access(env, env->insn_idx, insn->dst_reg,
insn->off, BPF_SIZE(insn->code),
BPF_WRITE, insn->src_reg, false);
if (err)
return err;
prev_dst_type = &env->insn_aux_data[env->insn_idx].ptr_type;
if (*prev_dst_type == NOT_INIT) {
*prev_dst_type = dst_reg_type;
} else if (reg_type_mismatch(dst_reg_type, *prev_dst_type)) {
verbose(env, "same insn cannot be used with different pointers\n");
return -EINVAL;
}
} else if (class == BPF_ST) {
if (BPF_MODE(insn->code) != BPF_MEM ||
insn->src_reg != BPF_REG_0) {
verbose(env, "BPF_ST uses reserved fields\n");
return -EINVAL;
}
/* check src operand */
err = check_reg_arg(env, insn->dst_reg, SRC_OP);
if (err)
return err;
if (is_ctx_reg(env, insn->dst_reg)) {
verbose(env, "BPF_ST stores into R%d %s is not allowed\n",
insn->dst_reg,
reg_type_str[reg_state(env, insn->dst_reg)->type]);
return -EACCES;
}
/* check that memory (dst_reg + off) is writeable */
err = check_mem_access(env, env->insn_idx, insn->dst_reg,
insn->off, BPF_SIZE(insn->code),
BPF_WRITE, -1, false);
if (err)
return err;
} else if (class == BPF_JMP) {
u8 opcode = BPF_OP(insn->code);
if (opcode == BPF_CALL) {
if (BPF_SRC(insn->code) != BPF_K ||
insn->off != 0 ||
(insn->src_reg != BPF_REG_0 &&
insn->src_reg != BPF_PSEUDO_CALL) ||
insn->dst_reg != BPF_REG_0) {
verbose(env, "BPF_CALL uses reserved fields\n");
return -EINVAL;
}
if (insn->src_reg == BPF_PSEUDO_CALL)
err = check_func_call(env, insn, &env->insn_idx);
else
err = check_helper_call(env, insn->imm, env->insn_idx);
if (err)
return err;
} else if (opcode == BPF_JA) {
if (BPF_SRC(insn->code) != BPF_K ||
insn->imm != 0 ||
insn->src_reg != BPF_REG_0 ||
insn->dst_reg != BPF_REG_0) {
verbose(env, "BPF_JA uses reserved fields\n");
return -EINVAL;
}
env->insn_idx += insn->off + 1;
continue;
} else if (opcode == BPF_EXIT) {
if (BPF_SRC(insn->code) != BPF_K ||
insn->imm != 0 ||
insn->src_reg != BPF_REG_0 ||
insn->dst_reg != BPF_REG_0) {
verbose(env, "BPF_EXIT uses reserved fields\n");
return -EINVAL;
}
if (state->curframe) {
/* exit from nested function */
env->prev_insn_idx = env->insn_idx;
err = prepare_func_exit(env, &env->insn_idx);
if (err)
return err;
do_print_state = true;
continue;
}
err = check_reference_leak(env);
if (err)
return err;
/* eBPF calling convetion is such that R0 is used
* to return the value from eBPF program.
* Make sure that it's readable at this time
* of bpf_exit, which means that program wrote
* something into it earlier
*/
err = check_reg_arg(env, BPF_REG_0, SRC_OP);
if (err)
return err;
if (is_pointer_value(env, BPF_REG_0)) {
verbose(env, "R0 leaks addr as return value\n");
return -EACCES;
}
err = check_return_code(env);
if (err)
return err;
process_bpf_exit:
err = pop_stack(env, &env->prev_insn_idx,
&env->insn_idx);
if (err < 0) {
if (err != -ENOENT)
return err;
break;
} else {
do_print_state = true;
continue;
}
} else {
err = check_cond_jmp_op(env, insn, &env->insn_idx);
if (err)
return err;
}
} else if (class == BPF_LD) {
u8 mode = BPF_MODE(insn->code);
if (mode == BPF_ABS || mode == BPF_IND) {
err = check_ld_abs(env, insn);
if (err)
return err;
} else if (mode == BPF_IMM) {
err = check_ld_imm(env, insn);
if (err)
return err;
env->insn_idx++;
env->insn_aux_data[env->insn_idx].seen = true;
} else {
verbose(env, "invalid BPF_LD mode\n");
return -EINVAL;
}
} else {
verbose(env, "unknown insn class %d\n", class);
return -EINVAL;
}
env->insn_idx++;
}
verbose(env, "processed %d insns (limit %d), stack depth ",
insn_processed, BPF_COMPLEXITY_LIMIT_INSNS);
for (i = 0; i < env->subprog_cnt; i++) {
u32 depth = env->subprog_info[i].stack_depth;
verbose(env, "%d", depth);
if (i + 1 < env->subprog_cnt)
verbose(env, "+");
}
verbose(env, "\n");
env->prog->aux->stack_depth = env->subprog_info[0].stack_depth;
return 0;
} | 1685 | True | 1 |
||
CVE-2019-7308 | False | False | False | False | AV:L/AC:M/Au:N/C:C/I:N/A:N | LOCAL | MEDIUM | NONE | COMPLETE | NONE | NONE | 4.7 | CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N | LOCAL | HIGH | LOW | NONE | CHANGED | HIGH | NONE | NONE | 5.6 | MEDIUM | 1.1 | 4.0 | False | [{'url': 'https://github.com/torvalds/linux/commit/d3bd7413e0ca40b60cf60d4003246d067cafdeda', 'name': 'https://github.com/torvalds/linux/commit/d3bd7413e0ca40b60cf60d4003246d067cafdeda', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/979d63d50c0c0f7bc537bf821e056cc9fe5abd38', 'name': 'https://github.com/torvalds/linux/commit/979d63d50c0c0f7bc537bf821e056cc9fe5abd38', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.6', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.6', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1711', 'name': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1711', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d3bd7413e0ca40b60cf60d4003246d067cafdeda', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d3bd7413e0ca40b60cf60d4003246d067cafdeda', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=979d63d50c0c0f7bc537bf821e056cc9fe5abd38', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=979d63d50c0c0f7bc537bf821e056cc9fe5abd38', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/106827', 'name': '106827', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://usn.ubuntu.com/3931-2/', 'name': 'USN-3931-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3931-1/', 'name': 'USN-3931-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3930-2/', 'name': 'USN-3930-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3930-1/', 'name': 'USN-3930-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00052.html', 'name': 'openSUSE-SU-2019:1193', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'https://support.f5.com/csp/article/K43030517', 'name': 'https://support.f5.com/csp/article/K43030517', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K43030517?utm_source=f5support&utm_medium=RSS', 'name': 'https://support.f5.com/csp/article/K43030517?utm_source=f5support&utm_medium=RSS', 'refsource': 'CONFIRM', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-189'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.19.19', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.20.0', 'versionEndExcluding': '4.20.6', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:15.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'kernel/bpf/verifier.c in the Linux kernel before 4.20.6 performs undesirable out-of-bounds speculation on pointer arithmetic in various cases, including cases of different branches with different state or limits to sanitize, leading to side-channel attacks.'}] | 2019-09-24T20:15Z | 2019-02-01T22:29Z | Numeric Errors | Weaknesses in this category are related to improper calculation or conversion of numbers. | https://cwe.mitre.org/data/definitions/189.html | 1 | Daniel Borkmann | 2019-01-03 00:58:34+01:00 | bpf: prevent out of bounds speculation on pointer arithmetic
Jann reported that the original commit back in b2157399cc98
("bpf: prevent out-of-bounds speculation") was not sufficient
to stop CPU from speculating out of bounds memory access:
While b2157399cc98 only focussed on masking array map access
for unprivileged users for tail calls and data access such
that the user provided index gets sanitized from BPF program
and syscall side, there is still a more generic form affected
from BPF programs that applies to most maps that hold user
data in relation to dynamic map access when dealing with
unknown scalars or "slow" known scalars as access offset, for
example:
- Load a map value pointer into R6
- Load an index into R7
- Do a slow computation (e.g. with a memory dependency) that
loads a limit into R8 (e.g. load the limit from a map for
high latency, then mask it to make the verifier happy)
- Exit if R7 >= R8 (mispredicted branch)
- Load R0 = R6[R7]
- Load R0 = R6[R0]
For unknown scalars there are two options in the BPF verifier
where we could derive knowledge from in order to guarantee
safe access to the memory: i) While </>/<=/>= variants won't
allow to derive any lower or upper bounds from the unknown
scalar where it would be safe to add it to the map value
pointer, it is possible through ==/!= test however. ii) another
option is to transform the unknown scalar into a known scalar,
for example, through ALU ops combination such as R &= <imm>
followed by R |= <imm> or any similar combination where the
original information from the unknown scalar would be destroyed
entirely leaving R with a constant. The initial slow load still
precedes the latter ALU ops on that register, so the CPU
executes speculatively from that point. Once we have the known
scalar, any compare operation would work then. A third option
only involving registers with known scalars could be crafted
as described in [0] where a CPU port (e.g. Slow Int unit)
would be filled with many dependent computations such that
the subsequent condition depending on its outcome has to wait
for evaluation on its execution port and thereby executing
speculatively if the speculated code can be scheduled on a
different execution port, or any other form of mistraining
as described in [1], for example. Given this is not limited
to only unknown scalars, not only map but also stack access
is affected since both is accessible for unprivileged users
and could potentially be used for out of bounds access under
speculation.
In order to prevent any of these cases, the verifier is now
sanitizing pointer arithmetic on the offset such that any
out of bounds speculation would be masked in a way where the
pointer arithmetic result in the destination register will
stay unchanged, meaning offset masked into zero similar as
in array_index_nospec() case. With regards to implementation,
there are three options that were considered: i) new insn
for sanitation, ii) push/pop insn and sanitation as inlined
BPF, iii) reuse of ax register and sanitation as inlined BPF.
Option i) has the downside that we end up using from reserved
bits in the opcode space, but also that we would require
each JIT to emit masking as native arch opcodes meaning
mitigation would have slow adoption till everyone implements
it eventually which is counter-productive. Option ii) and iii)
have both in common that a temporary register is needed in
order to implement the sanitation as inlined BPF since we
are not allowed to modify the source register. While a push /
pop insn in ii) would be useful to have in any case, it
requires once again that every JIT needs to implement it
first. While possible, amount of changes needed would also
be unsuitable for a -stable patch. Therefore, the path which
has fewer changes, less BPF instructions for the mitigation
and does not require anything to be changed in the JITs is
option iii) which this work is pursuing. The ax register is
already mapped to a register in all JITs (modulo arm32 where
it's mapped to stack as various other BPF registers there)
and used in constant blinding for JITs-only so far. It can
be reused for verifier rewrites under certain constraints.
The interpreter's tmp "register" has therefore been remapped
into extending the register set with hidden ax register and
reusing that for a number of instructions that needed the
prior temporary variable internally (e.g. div, mod). This
allows for zero increase in stack space usage in the interpreter,
and enables (restricted) generic use in rewrites otherwise as
long as such a patchlet does not make use of these instructions.
The sanitation mask is dynamic and relative to the offset the
map value or stack pointer currently holds.
There are various cases that need to be taken under consideration
for the masking, e.g. such operation could look as follows:
ptr += val or val += ptr or ptr -= val. Thus, the value to be
sanitized could reside either in source or in destination
register, and the limit is different depending on whether
the ALU op is addition or subtraction and depending on the
current known and bounded offset. The limit is derived as
follows: limit := max_value_size - (smin_value + off). For
subtraction: limit := umax_value + off. This holds because
we do not allow any pointer arithmetic that would
temporarily go out of bounds or would have an unknown
value with mixed signed bounds where it is unclear at
verification time whether the actual runtime value would
be either negative or positive. For example, we have a
derived map pointer value with constant offset and bounded
one, so limit based on smin_value works because the verifier
requires that statically analyzed arithmetic on the pointer
must be in bounds, and thus it checks if resulting
smin_value + off and umax_value + off is still within map
value bounds at time of arithmetic in addition to time of
access. Similarly, for the case of stack access we derive
the limit as follows: MAX_BPF_STACK + off for subtraction
and -off for the case of addition where off := ptr_reg->off +
ptr_reg->var_off.value. Subtraction is a special case for
the masking which can be in form of ptr += -val, ptr -= -val,
or ptr -= val. In the first two cases where we know that
the value is negative, we need to temporarily negate the
value in order to do the sanitation on a positive value
where we later swap the ALU op, and restore original source
register if the value was in source.
The sanitation of pointer arithmetic alone is still not fully
sufficient as is, since a scenario like the following could
happen ...
PTR += 0x1000 (e.g. K-based imm)
PTR -= BIG_NUMBER_WITH_SLOW_COMPARISON
PTR += 0x1000
PTR -= BIG_NUMBER_WITH_SLOW_COMPARISON
[...]
... which under speculation could end up as ...
PTR += 0x1000
PTR -= 0 [ truncated by mitigation ]
PTR += 0x1000
PTR -= 0 [ truncated by mitigation ]
[...]
... and therefore still access out of bounds. To prevent such
case, the verifier is also analyzing safety for potential out
of bounds access under speculative execution. Meaning, it is
also simulating pointer access under truncation. We therefore
"branch off" and push the current verification state after the
ALU operation with known 0 to the verification stack for later
analysis. Given the current path analysis succeeded it is
likely that the one under speculation can be pruned. In any
case, it is also subject to existing complexity limits and
therefore anything beyond this point will be rejected. In
terms of pruning, it needs to be ensured that the verification
state from speculative execution simulation must never prune
a non-speculative execution path, therefore, we mark verifier
state accordingly at the time of push_stack(). If verifier
detects out of bounds access under speculative execution from
one of the possible paths that includes a truncation, it will
reject such program.
Given we mask every reg-based pointer arithmetic for
unprivileged programs, we've been looking into how it could
affect real-world programs in terms of size increase. As the
majority of programs are targeted for privileged-only use
case, we've unconditionally enabled masking (with its alu
restrictions on top of it) for privileged programs for the
sake of testing in order to check i) whether they get rejected
in its current form, and ii) by how much the number of
instructions and size will increase. We've tested this by
using Katran, Cilium and test_l4lb from the kernel selftests.
For Katran we've evaluated balancer_kern.o, Cilium bpf_lxc.o
and an older test object bpf_lxc_opt_-DUNKNOWN.o and l4lb
we've used test_l4lb.o as well as test_l4lb_noinline.o. We
found that none of the programs got rejected by the verifier
with this change, and that impact is rather minimal to none.
balancer_kern.o had 13,904 bytes (1,738 insns) xlated and
7,797 bytes JITed before and after the change. Most complex
program in bpf_lxc.o had 30,544 bytes (3,817 insns) xlated
and 18,538 bytes JITed before and after and none of the other
tail call programs in bpf_lxc.o had any changes either. For
the older bpf_lxc_opt_-DUNKNOWN.o object we found a small
increase from 20,616 bytes (2,576 insns) and 12,536 bytes JITed
before to 20,664 bytes (2,582 insns) and 12,558 bytes JITed
after the change. Other programs from that object file had
similar small increase. Both test_l4lb.o had no change and
remained at 6,544 bytes (817 insns) xlated and 3,401 bytes
JITed and for test_l4lb_noinline.o constant at 5,080 bytes
(634 insns) xlated and 3,313 bytes JITed. This can be explained
in that LLVM typically optimizes stack based pointer arithmetic
by using K-based operations and that use of dynamic map access
is not overly frequent. However, in future we may decide to
optimize the algorithm further under known guarantees from
branch and value speculation. Latter seems also unclear in
terms of prediction heuristics that today's CPUs apply as well
as whether there could be collisions in e.g. the predictor's
Value History/Pattern Table for triggering out of bounds access,
thus masking is performed unconditionally at this point but could
be subject to relaxation later on. We were generally also
brainstorming various other approaches for mitigation, but the
blocker was always lack of available registers at runtime and/or
overhead for runtime tracking of limits belonging to a specific
pointer. Thus, we found this to be minimally intrusive under
given constraints.
With that in place, a simple example with sanitized access on
unprivileged load at post-verification time looks as follows:
# bpftool prog dump xlated id 282
[...]
28: (79) r1 = *(u64 *)(r7 +0)
29: (79) r2 = *(u64 *)(r7 +8)
30: (57) r1 &= 15
31: (79) r3 = *(u64 *)(r0 +4608)
32: (57) r3 &= 1
33: (47) r3 |= 1
34: (2d) if r2 > r3 goto pc+19
35: (b4) (u32) r11 = (u32) 20479 |
36: (1f) r11 -= r2 | Dynamic sanitation for pointer
37: (4f) r11 |= r2 | arithmetic with registers
38: (87) r11 = -r11 | containing bounded or known
39: (c7) r11 s>>= 63 | scalars in order to prevent
40: (5f) r11 &= r2 | out of bounds speculation.
41: (0f) r4 += r11 |
42: (71) r4 = *(u8 *)(r4 +0)
43: (6f) r4 <<= r1
[...]
For the case where the scalar sits in the destination register
as opposed to the source register, the following code is emitted
for the above example:
[...]
16: (b4) (u32) r11 = (u32) 20479
17: (1f) r11 -= r2
18: (4f) r11 |= r2
19: (87) r11 = -r11
20: (c7) r11 s>>= 63
21: (5f) r2 &= r11
22: (0f) r2 += r0
23: (61) r0 = *(u32 *)(r2 +0)
[...]
JIT blinding example with non-conflicting use of r10:
[...]
d5: je 0x0000000000000106 _
d7: mov 0x0(%rax),%edi |
da: mov $0xf153246,%r10d | Index load from map value and
e0: xor $0xf153259,%r10 | (const blinded) mask with 0x1f.
e7: and %r10,%rdi |_
ea: mov $0x2f,%r10d |
f0: sub %rdi,%r10 | Sanitized addition. Both use r10
f3: or %rdi,%r10 | but do not interfere with each
f6: neg %r10 | other. (Neither do these instructions
f9: sar $0x3f,%r10 | interfere with the use of ax as temp
fd: and %r10,%rdi | in interpreter.)
100: add %rax,%rdi |_
103: mov 0x0(%rdi),%eax
[...]
Tested that it fixes Jann's reproducer, and also checked that test_verifier
and test_progs suite with interpreter, JIT and JIT with hardening enabled
on x86-64 and arm64 runs successfully.
[0] Speculose: Analyzing the Security Implications of Speculative
Execution in CPUs, Giorgi Maisuradze and Christian Rossow,
https://arxiv.org/pdf/1801.04084.pdf
[1] A Systematic Evaluation of Transient Execution Attacks and
Defenses, Claudio Canella, Jo Van Bulck, Michael Schwarz,
Moritz Lipp, Benjamin von Berg, Philipp Ortner, Frank Piessens,
Dmitry Evtyushkin, Daniel Gruss,
https://arxiv.org/pdf/1811.05441.pdf
Fixes: b2157399cc98 ("bpf: prevent out-of-bounds speculation")
Reported-by: Jann Horn <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Alexei Starovoitov <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]> | 979d63d50c0c0f7bc537bf821e056cc9fe5abd38 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | push_stack | push_stack( struct bpf_verifier_env * env , int insn_idx , int prev_insn_idx) | ['env', 'insn_idx', 'prev_insn_idx'] | static struct bpf_verifier_state *push_stack(struct bpf_verifier_env *env,
int insn_idx, int prev_insn_idx)
{
struct bpf_verifier_state *cur = env->cur_state;
struct bpf_verifier_stack_elem *elem;
int err;
elem = kzalloc(sizeof(struct bpf_verifier_stack_elem), GFP_KERNEL);
if (!elem)
goto err;
elem->insn_idx = insn_idx;
elem->prev_insn_idx = prev_insn_idx;
elem->next = env->head;
env->head = elem;
env->stack_size++;
err = copy_verifier_state(&elem->st, cur);
if (err)
goto err;
if (env->stack_size > BPF_COMPLEXITY_LIMIT_STACK) {
verbose(env, "BPF program is too complex\n");
goto err;
}
return &elem->st;
err:
free_verifier_state(env->cur_state, true);
env->cur_state = NULL;
/* pop all elements and return */
while (!pop_stack(env, NULL, NULL));
return NULL;
} | 162 | True | 1 |
||
CVE-2019-7308 | False | False | False | False | AV:L/AC:M/Au:N/C:C/I:N/A:N | LOCAL | MEDIUM | NONE | COMPLETE | NONE | NONE | 4.7 | CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N | LOCAL | HIGH | LOW | NONE | CHANGED | HIGH | NONE | NONE | 5.6 | MEDIUM | 1.1 | 4.0 | False | [{'url': 'https://github.com/torvalds/linux/commit/d3bd7413e0ca40b60cf60d4003246d067cafdeda', 'name': 'https://github.com/torvalds/linux/commit/d3bd7413e0ca40b60cf60d4003246d067cafdeda', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/979d63d50c0c0f7bc537bf821e056cc9fe5abd38', 'name': 'https://github.com/torvalds/linux/commit/979d63d50c0c0f7bc537bf821e056cc9fe5abd38', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.6', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.6', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1711', 'name': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1711', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d3bd7413e0ca40b60cf60d4003246d067cafdeda', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d3bd7413e0ca40b60cf60d4003246d067cafdeda', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=979d63d50c0c0f7bc537bf821e056cc9fe5abd38', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=979d63d50c0c0f7bc537bf821e056cc9fe5abd38', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/106827', 'name': '106827', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://usn.ubuntu.com/3931-2/', 'name': 'USN-3931-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3931-1/', 'name': 'USN-3931-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3930-2/', 'name': 'USN-3930-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3930-1/', 'name': 'USN-3930-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00052.html', 'name': 'openSUSE-SU-2019:1193', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'https://support.f5.com/csp/article/K43030517', 'name': 'https://support.f5.com/csp/article/K43030517', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K43030517?utm_source=f5support&utm_medium=RSS', 'name': 'https://support.f5.com/csp/article/K43030517?utm_source=f5support&utm_medium=RSS', 'refsource': 'CONFIRM', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-189'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.19.19', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.20.0', 'versionEndExcluding': '4.20.6', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:15.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'kernel/bpf/verifier.c in the Linux kernel before 4.20.6 performs undesirable out-of-bounds speculation on pointer arithmetic in various cases, including cases of different branches with different state or limits to sanitize, leading to side-channel attacks.'}] | 2019-09-24T20:15Z | 2019-02-01T22:29Z | Numeric Errors | Weaknesses in this category are related to improper calculation or conversion of numbers. | https://cwe.mitre.org/data/definitions/189.html | 1 | Daniel Borkmann | 2019-01-06 00:54:37+01:00 | bpf: fix sanitation of alu op with pointer / scalar type from different paths
While 979d63d50c0c ("bpf: prevent out of bounds speculation on pointer
arithmetic") took care of rejecting alu op on pointer when e.g. pointer
came from two different map values with different map properties such as
value size, Jann reported that a case was not covered yet when a given
alu op is used in both "ptr_reg += reg" and "numeric_reg += reg" from
different branches where we would incorrectly try to sanitize based
on the pointer's limit. Catch this corner case and reject the program
instead.
Fixes: 979d63d50c0c ("bpf: prevent out of bounds speculation on pointer arithmetic")
Reported-by: Jann Horn <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Alexei Starovoitov <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]> | d3bd7413e0ca40b60cf60d4003246d067cafdeda | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | sanitize_ptr_alu | sanitize_ptr_alu( struct bpf_verifier_env * env , struct bpf_insn * insn , const struct bpf_reg_state * ptr_reg , struct bpf_reg_state * dst_reg , bool off_is_neg) | ['env', 'insn', 'ptr_reg', 'dst_reg', 'off_is_neg'] | static int sanitize_ptr_alu(struct bpf_verifier_env *env,
struct bpf_insn *insn,
const struct bpf_reg_state *ptr_reg,
struct bpf_reg_state *dst_reg,
bool off_is_neg)
{
struct bpf_verifier_state *vstate = env->cur_state;
struct bpf_insn_aux_data *aux = cur_aux(env);
bool ptr_is_dst_reg = ptr_reg == dst_reg;
u8 opcode = BPF_OP(insn->code);
u32 alu_state, alu_limit;
struct bpf_reg_state tmp;
bool ret;
if (env->allow_ptr_leaks || BPF_SRC(insn->code) == BPF_K)
return 0;
/* We already marked aux for masking from non-speculative
* paths, thus we got here in the first place. We only care
* to explore bad access from here.
*/
if (vstate->speculative)
goto do_sim;
alu_state = off_is_neg ? BPF_ALU_NEG_VALUE : 0;
alu_state |= ptr_is_dst_reg ?
BPF_ALU_SANITIZE_SRC : BPF_ALU_SANITIZE_DST;
if (retrieve_ptr_limit(ptr_reg, &alu_limit, opcode, off_is_neg))
return 0;
/* If we arrived here from different branches with different
* limits to sanitize, then this won't work.
*/
if (aux->alu_state &&
(aux->alu_state != alu_state ||
aux->alu_limit != alu_limit))
return -EACCES;
/* Corresponding fixup done in fixup_bpf_calls(). */
aux->alu_state = alu_state;
aux->alu_limit = alu_limit;
do_sim:
/* Simulate and find potential out-of-bounds access under
* speculative execution from truncation as a result of
* masking when off was not within expected range. If off
* sits in dst, then we temporarily need to move ptr there
* to simulate dst (== 0) +/-= ptr. Needed, for example,
* for cases where we use K-based arithmetic in one direction
* and truncated reg-based in the other in order to explore
* bad access.
*/
if (!ptr_is_dst_reg) {
tmp = *dst_reg;
*dst_reg = *ptr_reg;
}
ret = push_stack(env, env->insn_idx + 1, env->insn_idx, true);
if (!ptr_is_dst_reg)
*dst_reg = tmp;
return !ret ? -EFAULT : 0;
} | 230 | True | 1 |
||
CVE-2019-5489 | False | False | False | False | AV:L/AC:L/Au:N/C:P/I:N/A:N | LOCAL | LOW | NONE | PARTIAL | NONE | NONE | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N | LOCAL | LOW | LOW | NONE | UNCHANGED | HIGH | NONE | NONE | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://www.theregister.co.uk/2019/01/05/boffins_beat_page_cache/', 'name': 'https://www.theregister.co.uk/2019/01/05/boffins_beat_page_cache/', 'refsource': 'MISC', 'tags': ['Technical Description', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/574823bfab82d9d8fa47f422778043fbb4b4f50e', 'name': 'https://github.com/torvalds/linux/commit/574823bfab82d9d8fa47f422778043fbb4b4f50e', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.suse.com/show_bug.cgi?id=1120843', 'name': 'https://bugzilla.suse.com/show_bug.cgi?id=1120843', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://arxiv.org/abs/1901.01161', 'name': 'https://arxiv.org/abs/1901.01161', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=574823bfab82d9d8fa47f422778043fbb4b4f50e', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=574823bfab82d9d8fa47f422778043fbb4b4f50e', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/106478', 'name': '106478', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://security.netapp.com/advisory/ntap-20190307-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20190307-0001/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-05/msg00071.html', 'name': 'openSUSE-SU-2019:1479', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://www.debian.org/security/2019/dsa-4465', 'name': 'DSA-4465', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/06/msg00010.html', 'name': '[debian-lts-announce] 20190617 [SECURITY] [DLA 1823-1] linux security update', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/06/msg00011.html', 'name': '[debian-lts-announce] 20190618 [SECURITY] [DLA 1824-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00039.html', 'name': 'openSUSE-SU-2019:1570', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://seclists.org/bugtraq/2019/Jun/26', 'name': '20190618 [SECURITY] [DSA 4465-1] linux security update', 'refsource': 'BUGTRAQ', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00048.html', 'name': 'openSUSE-SU-2019:1579', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2043', 'name': 'RHSA-2019:2043', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2029', 'name': 'RHSA-2019:2029', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2473', 'name': 'RHSA-2019:2473', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2808', 'name': 'RHSA-2019:2808', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2837', 'name': 'RHSA-2019:2837', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2809', 'name': 'RHSA-2019:2809', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3517', 'name': 'RHSA-2019:3517', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3309', 'name': 'RHSA-2019:3309', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3967', 'name': 'RHSA-2019:3967', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4056', 'name': 'RHSA-2019:4056', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4058', 'name': 'RHSA-2019:4058', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4057', 'name': 'RHSA-2019:4057', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4164', 'name': 'RHSA-2019:4164', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4159', 'name': 'RHSA-2019:4159', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4255', 'name': 'RHSA-2019:4255', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.huawei.com/en/psirt/security-advisories/huawei-sa-20200115-01-pagecache-en', 'name': 'http://www.huawei.com/en/psirt/security-advisories/huawei-sa-20200115-01-pagecache-en', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2020:0204', 'name': 'RHSA-2020:0204', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://www.oracle.com/security-alerts/cpujul2020.html', 'name': 'https://www.oracle.com/security-alerts/cpujul2020.html', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-319'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.19.13', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:element_software_management_node:-:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:active_iq_performance_analytics_services:-:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mincore() implementation in mm/mincore.c in the Linux kernel through 4.19.13 allowed local attackers to observe page cache access patterns of other processes on the same system, potentially allowing sniffing of secret information. (Fixing this affects the output of the fincore program.) Limited remote exploitation may be possible, as demonstrated by latency differences in accessing public files from an Apache HTTP Server.'}] | 2020-08-24T17:37Z | 2019-01-07T17:29Z | Cleartext Transmission of Sensitive Information | The software transmits sensitive or security-critical data in cleartext in a communication channel that can be sniffed by unauthorized actors. | Many communication channels can be "sniffed" by attackers during data transmission. For example, network traffic can often be sniffed by any attacker who has access to a network interface. This significantly lowers the difficulty of exploitation by attackers.
| https://cwe.mitre.org/data/definitions/319.html | 0 | Linus Torvalds | 2019-01-05 17:50:59-08:00 | Change mincore() to count "mapped" pages rather than "cached" pages
The semantics of what "in core" means for the mincore() system call are
somewhat unclear, but Linux has always (since 2.3.52, which is when
mincore() was initially done) treated it as "page is available in page
cache" rather than "page is mapped in the mapping".
The problem with that traditional semantic is that it exposes a lot of
system cache state that it really probably shouldn't, and that users
shouldn't really even care about.
So let's try to avoid that information leak by simply changing the
semantics to be that mincore() counts actual mapped pages, not pages
that might be cheaply mapped if they were faulted (note the "might be"
part of the old semantics: being in the cache doesn't actually guarantee
that you can access them without IO anyway, since things like network
filesystems may have to revalidate the cache before use).
In many ways the old semantics were somewhat insane even aside from the
information leak issue. From the very beginning (and that beginning is
a long time ago: 2.3.52 was released in March 2000, I think), the code
had a comment saying
Later we can get more picky about what "in core" means precisely.
and this is that "later". Admittedly it is much later than is really
comfortable.
NOTE! This is a real semantic change, and it is for example known to
change the output of "fincore", since that program literally does a
mmmap without populating it, and then doing "mincore()" on that mapping
that doesn't actually have any pages in it.
I'm hoping that nobody actually has any workflow that cares, and the
info leak is real.
We may have to do something different if it turns out that people have
valid reasons to want the old semantics, and if we can limit the
information leak sanely.
Cc: Kevin Easton <[email protected]>
Cc: Jiri Kosina <[email protected]>
Cc: Masatake YAMATO <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Greg KH <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Michal Hocko <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]> | 574823bfab82d9d8fa47f422778043fbb4b4f50e | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | __mincore_unmapped_range | __mincore_unmapped_range( unsigned long addr , unsigned long end , struct vm_area_struct * vma , unsigned char * vec) | ['addr', 'end', 'vma', 'vec'] | static int __mincore_unmapped_range(unsigned long addr, unsigned long end,
struct vm_area_struct *vma, unsigned char *vec)
{
unsigned long nr = (end - addr) >> PAGE_SHIFT;
int i;
if (vma->vm_file) {
pgoff_t pgoff;
pgoff = linear_page_index(vma, addr);
for (i = 0; i < nr; i++, pgoff++)
vec[i] = mincore_page(vma->vm_file->f_mapping, pgoff);
} else {
for (i = 0; i < nr; i++)
vec[i] = 0;
}
return nr;
} | 116 | True | 1 |
|
CVE-2019-5489 | False | False | False | False | AV:L/AC:L/Au:N/C:P/I:N/A:N | LOCAL | LOW | NONE | PARTIAL | NONE | NONE | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N | LOCAL | LOW | LOW | NONE | UNCHANGED | HIGH | NONE | NONE | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://www.theregister.co.uk/2019/01/05/boffins_beat_page_cache/', 'name': 'https://www.theregister.co.uk/2019/01/05/boffins_beat_page_cache/', 'refsource': 'MISC', 'tags': ['Technical Description', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/574823bfab82d9d8fa47f422778043fbb4b4f50e', 'name': 'https://github.com/torvalds/linux/commit/574823bfab82d9d8fa47f422778043fbb4b4f50e', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.suse.com/show_bug.cgi?id=1120843', 'name': 'https://bugzilla.suse.com/show_bug.cgi?id=1120843', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://arxiv.org/abs/1901.01161', 'name': 'https://arxiv.org/abs/1901.01161', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=574823bfab82d9d8fa47f422778043fbb4b4f50e', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=574823bfab82d9d8fa47f422778043fbb4b4f50e', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/106478', 'name': '106478', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://security.netapp.com/advisory/ntap-20190307-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20190307-0001/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-05/msg00071.html', 'name': 'openSUSE-SU-2019:1479', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://www.debian.org/security/2019/dsa-4465', 'name': 'DSA-4465', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/06/msg00010.html', 'name': '[debian-lts-announce] 20190617 [SECURITY] [DLA 1823-1] linux security update', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/06/msg00011.html', 'name': '[debian-lts-announce] 20190618 [SECURITY] [DLA 1824-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00039.html', 'name': 'openSUSE-SU-2019:1570', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://seclists.org/bugtraq/2019/Jun/26', 'name': '20190618 [SECURITY] [DSA 4465-1] linux security update', 'refsource': 'BUGTRAQ', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00048.html', 'name': 'openSUSE-SU-2019:1579', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2043', 'name': 'RHSA-2019:2043', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2029', 'name': 'RHSA-2019:2029', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2473', 'name': 'RHSA-2019:2473', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2808', 'name': 'RHSA-2019:2808', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2837', 'name': 'RHSA-2019:2837', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2809', 'name': 'RHSA-2019:2809', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3517', 'name': 'RHSA-2019:3517', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3309', 'name': 'RHSA-2019:3309', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3967', 'name': 'RHSA-2019:3967', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4056', 'name': 'RHSA-2019:4056', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4058', 'name': 'RHSA-2019:4058', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4057', 'name': 'RHSA-2019:4057', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4164', 'name': 'RHSA-2019:4164', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4159', 'name': 'RHSA-2019:4159', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4255', 'name': 'RHSA-2019:4255', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.huawei.com/en/psirt/security-advisories/huawei-sa-20200115-01-pagecache-en', 'name': 'http://www.huawei.com/en/psirt/security-advisories/huawei-sa-20200115-01-pagecache-en', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2020:0204', 'name': 'RHSA-2020:0204', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://www.oracle.com/security-alerts/cpujul2020.html', 'name': 'https://www.oracle.com/security-alerts/cpujul2020.html', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-319'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.19.13', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:element_software_management_node:-:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:active_iq_performance_analytics_services:-:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mincore() implementation in mm/mincore.c in the Linux kernel through 4.19.13 allowed local attackers to observe page cache access patterns of other processes on the same system, potentially allowing sniffing of secret information. (Fixing this affects the output of the fincore program.) Limited remote exploitation may be possible, as demonstrated by latency differences in accessing public files from an Apache HTTP Server.'}] | 2020-08-24T17:37Z | 2019-01-07T17:29Z | Cleartext Transmission of Sensitive Information | The software transmits sensitive or security-critical data in cleartext in a communication channel that can be sniffed by unauthorized actors. | Many communication channels can be "sniffed" by attackers during data transmission. For example, network traffic can often be sniffed by any attacker who has access to a network interface. This significantly lowers the difficulty of exploitation by attackers.
| https://cwe.mitre.org/data/definitions/319.html | 0 | Linus Torvalds | 2019-01-05 17:50:59-08:00 | Change mincore() to count "mapped" pages rather than "cached" pages
The semantics of what "in core" means for the mincore() system call are
somewhat unclear, but Linux has always (since 2.3.52, which is when
mincore() was initially done) treated it as "page is available in page
cache" rather than "page is mapped in the mapping".
The problem with that traditional semantic is that it exposes a lot of
system cache state that it really probably shouldn't, and that users
shouldn't really even care about.
So let's try to avoid that information leak by simply changing the
semantics to be that mincore() counts actual mapped pages, not pages
that might be cheaply mapped if they were faulted (note the "might be"
part of the old semantics: being in the cache doesn't actually guarantee
that you can access them without IO anyway, since things like network
filesystems may have to revalidate the cache before use).
In many ways the old semantics were somewhat insane even aside from the
information leak issue. From the very beginning (and that beginning is
a long time ago: 2.3.52 was released in March 2000, I think), the code
had a comment saying
Later we can get more picky about what "in core" means precisely.
and this is that "later". Admittedly it is much later than is really
comfortable.
NOTE! This is a real semantic change, and it is for example known to
change the output of "fincore", since that program literally does a
mmmap without populating it, and then doing "mincore()" on that mapping
that doesn't actually have any pages in it.
I'm hoping that nobody actually has any workflow that cares, and the
info leak is real.
We may have to do something different if it turns out that people have
valid reasons to want the old semantics, and if we can limit the
information leak sanely.
Cc: Kevin Easton <[email protected]>
Cc: Jiri Kosina <[email protected]>
Cc: Masatake YAMATO <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Greg KH <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Michal Hocko <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]> | 574823bfab82d9d8fa47f422778043fbb4b4f50e | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | mincore_page | mincore_page( struct address_space * mapping , pgoff_t pgoff) | ['mapping', 'pgoff'] | static unsigned char mincore_page(struct address_space *mapping, pgoff_t pgoff)
{
unsigned char present = 0;
struct page *page;
/*
* When tmpfs swaps out a page from a file, any process mapping that
* file will not get a swp_entry_t in its pte, but rather it is like
* any other file mapping (ie. marked !present and faulted in with
* tmpfs's .fault). So swapped out tmpfs mappings are tested here.
*/
#ifdef CONFIG_SWAP
if (shmem_mapping(mapping)) {
page = find_get_entry(mapping, pgoff);
/*
* shmem/tmpfs may return swap: account for swapcache
* page too.
*/
if (xa_is_value(page)) {
swp_entry_t swp = radix_to_swp_entry(page);
page = find_get_page(swap_address_space(swp),
swp_offset(swp));
}
} else
page = find_get_page(mapping, pgoff);
#else
page = find_get_page(mapping, pgoff);
#endif
if (page) {
present = PageUptodate(page);
put_page(page);
}
return present;
} | 113 | True | 1 |
|
CVE-2019-5489 | False | False | False | False | AV:L/AC:L/Au:N/C:P/I:N/A:N | LOCAL | LOW | NONE | PARTIAL | NONE | NONE | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N | LOCAL | LOW | LOW | NONE | UNCHANGED | HIGH | NONE | NONE | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://www.theregister.co.uk/2019/01/05/boffins_beat_page_cache/', 'name': 'https://www.theregister.co.uk/2019/01/05/boffins_beat_page_cache/', 'refsource': 'MISC', 'tags': ['Technical Description', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/574823bfab82d9d8fa47f422778043fbb4b4f50e', 'name': 'https://github.com/torvalds/linux/commit/574823bfab82d9d8fa47f422778043fbb4b4f50e', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.suse.com/show_bug.cgi?id=1120843', 'name': 'https://bugzilla.suse.com/show_bug.cgi?id=1120843', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://arxiv.org/abs/1901.01161', 'name': 'https://arxiv.org/abs/1901.01161', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=574823bfab82d9d8fa47f422778043fbb4b4f50e', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=574823bfab82d9d8fa47f422778043fbb4b4f50e', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/106478', 'name': '106478', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://security.netapp.com/advisory/ntap-20190307-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20190307-0001/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-05/msg00071.html', 'name': 'openSUSE-SU-2019:1479', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://www.debian.org/security/2019/dsa-4465', 'name': 'DSA-4465', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/06/msg00010.html', 'name': '[debian-lts-announce] 20190617 [SECURITY] [DLA 1823-1] linux security update', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/06/msg00011.html', 'name': '[debian-lts-announce] 20190618 [SECURITY] [DLA 1824-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00039.html', 'name': 'openSUSE-SU-2019:1570', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://seclists.org/bugtraq/2019/Jun/26', 'name': '20190618 [SECURITY] [DSA 4465-1] linux security update', 'refsource': 'BUGTRAQ', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00048.html', 'name': 'openSUSE-SU-2019:1579', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2043', 'name': 'RHSA-2019:2043', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2029', 'name': 'RHSA-2019:2029', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2473', 'name': 'RHSA-2019:2473', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2808', 'name': 'RHSA-2019:2808', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2837', 'name': 'RHSA-2019:2837', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2809', 'name': 'RHSA-2019:2809', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3517', 'name': 'RHSA-2019:3517', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3309', 'name': 'RHSA-2019:3309', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3967', 'name': 'RHSA-2019:3967', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4056', 'name': 'RHSA-2019:4056', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4058', 'name': 'RHSA-2019:4058', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4057', 'name': 'RHSA-2019:4057', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4164', 'name': 'RHSA-2019:4164', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4159', 'name': 'RHSA-2019:4159', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4255', 'name': 'RHSA-2019:4255', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.huawei.com/en/psirt/security-advisories/huawei-sa-20200115-01-pagecache-en', 'name': 'http://www.huawei.com/en/psirt/security-advisories/huawei-sa-20200115-01-pagecache-en', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2020:0204', 'name': 'RHSA-2020:0204', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://www.oracle.com/security-alerts/cpujul2020.html', 'name': 'https://www.oracle.com/security-alerts/cpujul2020.html', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-319'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.19.13', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:element_software_management_node:-:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:active_iq_performance_analytics_services:-:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mincore() implementation in mm/mincore.c in the Linux kernel through 4.19.13 allowed local attackers to observe page cache access patterns of other processes on the same system, potentially allowing sniffing of secret information. (Fixing this affects the output of the fincore program.) Limited remote exploitation may be possible, as demonstrated by latency differences in accessing public files from an Apache HTTP Server.'}] | 2020-08-24T17:37Z | 2019-01-07T17:29Z | Cleartext Transmission of Sensitive Information | The software transmits sensitive or security-critical data in cleartext in a communication channel that can be sniffed by unauthorized actors. | Many communication channels can be "sniffed" by attackers during data transmission. For example, network traffic can often be sniffed by any attacker who has access to a network interface. This significantly lowers the difficulty of exploitation by attackers.
| https://cwe.mitre.org/data/definitions/319.html | 0 | Linus Torvalds | 2019-01-05 17:50:59-08:00 | Change mincore() to count "mapped" pages rather than "cached" pages
The semantics of what "in core" means for the mincore() system call are
somewhat unclear, but Linux has always (since 2.3.52, which is when
mincore() was initially done) treated it as "page is available in page
cache" rather than "page is mapped in the mapping".
The problem with that traditional semantic is that it exposes a lot of
system cache state that it really probably shouldn't, and that users
shouldn't really even care about.
So let's try to avoid that information leak by simply changing the
semantics to be that mincore() counts actual mapped pages, not pages
that might be cheaply mapped if they were faulted (note the "might be"
part of the old semantics: being in the cache doesn't actually guarantee
that you can access them without IO anyway, since things like network
filesystems may have to revalidate the cache before use).
In many ways the old semantics were somewhat insane even aside from the
information leak issue. From the very beginning (and that beginning is
a long time ago: 2.3.52 was released in March 2000, I think), the code
had a comment saying
Later we can get more picky about what "in core" means precisely.
and this is that "later". Admittedly it is much later than is really
comfortable.
NOTE! This is a real semantic change, and it is for example known to
change the output of "fincore", since that program literally does a
mmmap without populating it, and then doing "mincore()" on that mapping
that doesn't actually have any pages in it.
I'm hoping that nobody actually has any workflow that cares, and the
info leak is real.
We may have to do something different if it turns out that people have
valid reasons to want the old semantics, and if we can limit the
information leak sanely.
Cc: Kevin Easton <[email protected]>
Cc: Jiri Kosina <[email protected]>
Cc: Masatake YAMATO <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Greg KH <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Michal Hocko <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]> | 574823bfab82d9d8fa47f422778043fbb4b4f50e | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | mincore_pte_range | mincore_pte_range( pmd_t * pmd , unsigned long addr , unsigned long end , struct mm_walk * walk) | ['pmd', 'addr', 'end', 'walk'] | static int mincore_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
struct mm_walk *walk)
{
spinlock_t *ptl;
struct vm_area_struct *vma = walk->vma;
pte_t *ptep;
unsigned char *vec = walk->private;
int nr = (end - addr) >> PAGE_SHIFT;
ptl = pmd_trans_huge_lock(pmd, vma);
if (ptl) {
memset(vec, 1, nr);
spin_unlock(ptl);
goto out;
}
if (pmd_trans_unstable(pmd)) {
__mincore_unmapped_range(addr, end, vma, vec);
goto out;
}
ptep = pte_offset_map_lock(walk->mm, pmd, addr, &ptl);
for (; addr != end; ptep++, addr += PAGE_SIZE) {
pte_t pte = *ptep;
if (pte_none(pte))
__mincore_unmapped_range(addr, addr + PAGE_SIZE,
vma, vec);
else if (pte_present(pte))
*vec = 1;
else { /* pte is a swap entry */
swp_entry_t entry = pte_to_swp_entry(pte);
if (non_swap_entry(entry)) {
/*
* migration or hwpoison entries are always
* uptodate
*/
*vec = 1;
} else {
#ifdef CONFIG_SWAP
*vec = mincore_page(swap_address_space(entry),
swp_offset(entry));
#else
WARN_ON(1);
*vec = 1;
#endif
}
}
vec++;
}
pte_unmap_unlock(ptep - 1, ptl);
out:
walk->private += nr;
cond_resched();
return 0;
} | 266 | True | 1 |
|
CVE-2019-5489 | False | False | False | False | AV:L/AC:L/Au:N/C:P/I:N/A:N | LOCAL | LOW | NONE | PARTIAL | NONE | NONE | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N | LOCAL | LOW | LOW | NONE | UNCHANGED | HIGH | NONE | NONE | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://www.theregister.co.uk/2019/01/05/boffins_beat_page_cache/', 'name': 'https://www.theregister.co.uk/2019/01/05/boffins_beat_page_cache/', 'refsource': 'MISC', 'tags': ['Technical Description', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/574823bfab82d9d8fa47f422778043fbb4b4f50e', 'name': 'https://github.com/torvalds/linux/commit/574823bfab82d9d8fa47f422778043fbb4b4f50e', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.suse.com/show_bug.cgi?id=1120843', 'name': 'https://bugzilla.suse.com/show_bug.cgi?id=1120843', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://arxiv.org/abs/1901.01161', 'name': 'https://arxiv.org/abs/1901.01161', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=574823bfab82d9d8fa47f422778043fbb4b4f50e', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=574823bfab82d9d8fa47f422778043fbb4b4f50e', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/106478', 'name': '106478', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://security.netapp.com/advisory/ntap-20190307-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20190307-0001/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-05/msg00071.html', 'name': 'openSUSE-SU-2019:1479', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://www.debian.org/security/2019/dsa-4465', 'name': 'DSA-4465', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/06/msg00010.html', 'name': '[debian-lts-announce] 20190617 [SECURITY] [DLA 1823-1] linux security update', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/06/msg00011.html', 'name': '[debian-lts-announce] 20190618 [SECURITY] [DLA 1824-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00039.html', 'name': 'openSUSE-SU-2019:1570', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://seclists.org/bugtraq/2019/Jun/26', 'name': '20190618 [SECURITY] [DSA 4465-1] linux security update', 'refsource': 'BUGTRAQ', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00048.html', 'name': 'openSUSE-SU-2019:1579', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2043', 'name': 'RHSA-2019:2043', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2029', 'name': 'RHSA-2019:2029', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2473', 'name': 'RHSA-2019:2473', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2808', 'name': 'RHSA-2019:2808', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2837', 'name': 'RHSA-2019:2837', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2809', 'name': 'RHSA-2019:2809', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3517', 'name': 'RHSA-2019:3517', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3309', 'name': 'RHSA-2019:3309', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3967', 'name': 'RHSA-2019:3967', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4056', 'name': 'RHSA-2019:4056', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4058', 'name': 'RHSA-2019:4058', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4057', 'name': 'RHSA-2019:4057', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4164', 'name': 'RHSA-2019:4164', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4159', 'name': 'RHSA-2019:4159', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4255', 'name': 'RHSA-2019:4255', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.huawei.com/en/psirt/security-advisories/huawei-sa-20200115-01-pagecache-en', 'name': 'http://www.huawei.com/en/psirt/security-advisories/huawei-sa-20200115-01-pagecache-en', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2020:0204', 'name': 'RHSA-2020:0204', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://www.oracle.com/security-alerts/cpujul2020.html', 'name': 'https://www.oracle.com/security-alerts/cpujul2020.html', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-319'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.19.13', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:element_software_management_node:-:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:active_iq_performance_analytics_services:-:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mincore() implementation in mm/mincore.c in the Linux kernel through 4.19.13 allowed local attackers to observe page cache access patterns of other processes on the same system, potentially allowing sniffing of secret information. (Fixing this affects the output of the fincore program.) Limited remote exploitation may be possible, as demonstrated by latency differences in accessing public files from an Apache HTTP Server.'}] | 2020-08-24T17:37Z | 2019-01-07T17:29Z | Cleartext Transmission of Sensitive Information | The software transmits sensitive or security-critical data in cleartext in a communication channel that can be sniffed by unauthorized actors. | Many communication channels can be "sniffed" by attackers during data transmission. For example, network traffic can often be sniffed by any attacker who has access to a network interface. This significantly lowers the difficulty of exploitation by attackers.
| https://cwe.mitre.org/data/definitions/319.html | 0 | Linus Torvalds | 2019-01-05 17:50:59-08:00 | Change mincore() to count "mapped" pages rather than "cached" pages
The semantics of what "in core" means for the mincore() system call are
somewhat unclear, but Linux has always (since 2.3.52, which is when
mincore() was initially done) treated it as "page is available in page
cache" rather than "page is mapped in the mapping".
The problem with that traditional semantic is that it exposes a lot of
system cache state that it really probably shouldn't, and that users
shouldn't really even care about.
So let's try to avoid that information leak by simply changing the
semantics to be that mincore() counts actual mapped pages, not pages
that might be cheaply mapped if they were faulted (note the "might be"
part of the old semantics: being in the cache doesn't actually guarantee
that you can access them without IO anyway, since things like network
filesystems may have to revalidate the cache before use).
In many ways the old semantics were somewhat insane even aside from the
information leak issue. From the very beginning (and that beginning is
a long time ago: 2.3.52 was released in March 2000, I think), the code
had a comment saying
Later we can get more picky about what "in core" means precisely.
and this is that "later". Admittedly it is much later than is really
comfortable.
NOTE! This is a real semantic change, and it is for example known to
change the output of "fincore", since that program literally does a
mmmap without populating it, and then doing "mincore()" on that mapping
that doesn't actually have any pages in it.
I'm hoping that nobody actually has any workflow that cares, and the
info leak is real.
We may have to do something different if it turns out that people have
valid reasons to want the old semantics, and if we can limit the
information leak sanely.
Cc: Kevin Easton <[email protected]>
Cc: Jiri Kosina <[email protected]>
Cc: Masatake YAMATO <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Greg KH <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Michal Hocko <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]> | 574823bfab82d9d8fa47f422778043fbb4b4f50e | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | mincore_unmapped_range | mincore_unmapped_range( unsigned long addr , unsigned long end , struct mm_walk * walk) | ['addr', 'end', 'walk'] | static int mincore_unmapped_range(unsigned long addr, unsigned long end,
struct mm_walk *walk)
{
walk->private += __mincore_unmapped_range(addr, end,
walk->vma, walk->private);
return 0;
} | 39 | True | 1 |
|
CVE-2019-9003 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:C | NETWORK | LOW | NONE | NONE | NONE | COMPLETE | 7.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://github.com/torvalds/linux/commit/77f8269606bf95fcb232ee86f6da80886f1dfae8', 'name': 'https://github.com/torvalds/linux/commit/77f8269606bf95fcb232ee86f6da80886f1dfae8', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.5', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.5', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=77f8269606bf95fcb232ee86f6da80886f1dfae8', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=77f8269606bf95fcb232ee86f6da80886f1dfae8', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/107145', 'name': '107145', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://security.netapp.com/advisory/ntap-20190327-0002/', 'name': 'https://security.netapp.com/advisory/ntap-20190327-0002/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3930-2/', 'name': 'USN-3930-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3930-1/', 'name': 'USN-3930-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-05/msg00037.html', 'name': 'openSUSE-SU-2019:1404', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-416'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:5.0:rc1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:5.0:rc2:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:5.0:rc3:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:5.0:rc4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.18', 'versionEndExcluding': '4.19.18', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.20', 'versionEndExcluding': '4.20.5', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:solidfire:-:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:hci_management_node:-:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:snapprotect:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:cn1610_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:cn1610:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:15.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In the Linux kernel before 4.20.5, attackers can trigger a drivers/char/ipmi/ipmi_msghandler.c use-after-free and OOPS by arranging for certain simultaneous execution of the code, as demonstrated by a "service ipmievd restart" loop.'}] | 2021-06-02T15:31Z | 2019-02-22T15:29Z | Use After Free | Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. |
The use of previously-freed memory can have any number of adverse consequences, ranging from the corruption of valid data to the execution of arbitrary code, depending on the instantiation and timing of the flaw. The simplest way data corruption may occur involves the system's reuse of the freed memory. Use-after-free errors have two common and sometimes overlapping causes:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for freeing the memory.
In this scenario, the memory in question is allocated to another pointer validly at some point after it has been freed. The original pointer to the freed memory is used again and points to somewhere within the new allocation. As the data is changed, it corrupts the validly used memory; this induces undefined behavior in the process.
If the newly allocated data chances to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.
| https://cwe.mitre.org/data/definitions/416.html | 0 | Yang Yingliang | 2019-01-16 13:33:22+08:00 | ipmi: fix use-after-free of user->release_barrier.rda
When we do the following test, we got oops in ipmi_msghandler driver
while((1))
do
service ipmievd restart & service ipmievd restart
done
---------------------------------------------------------------
[ 294.230186] Unable to handle kernel paging request at virtual address 0000803fea6ea008
[ 294.230188] Mem abort info:
[ 294.230190] ESR = 0x96000004
[ 294.230191] Exception class = DABT (current EL), IL = 32 bits
[ 294.230193] SET = 0, FnV = 0
[ 294.230194] EA = 0, S1PTW = 0
[ 294.230195] Data abort info:
[ 294.230196] ISV = 0, ISS = 0x00000004
[ 294.230197] CM = 0, WnR = 0
[ 294.230199] user pgtable: 4k pages, 48-bit VAs, pgdp = 00000000a1c1b75a
[ 294.230201] [0000803fea6ea008] pgd=0000000000000000
[ 294.230204] Internal error: Oops: 96000004 [#1] SMP
[ 294.235211] Modules linked in: nls_utf8 isofs rpcrdma ib_iser ib_srpt target_core_mod ib_srp scsi_transport_srp ib_ipoib rdma_ucm ib_umad rdma_cm ib_cm iw_cm dm_mirror dm_region_hash dm_log dm_mod aes_ce_blk crypto_simd cryptd aes_ce_cipher ghash_ce sha2_ce ses sha256_arm64 sha1_ce hibmc_drm hisi_sas_v2_hw enclosure sg hisi_sas_main sbsa_gwdt ip_tables mlx5_ib ib_uverbs marvell ib_core mlx5_core ixgbe ipmi_si mdio hns_dsaf ipmi_devintf ipmi_msghandler hns_enet_drv hns_mdio
[ 294.277745] CPU: 3 PID: 0 Comm: swapper/3 Kdump: loaded Not tainted 5.0.0-rc2+ #113
[ 294.285511] Hardware name: Huawei TaiShan 2280 /BC11SPCD, BIOS 1.37 11/21/2017
[ 294.292835] pstate: 80000005 (Nzcv daif -PAN -UAO)
[ 294.297695] pc : __srcu_read_lock+0x38/0x58
[ 294.301940] lr : acquire_ipmi_user+0x2c/0x70 [ipmi_msghandler]
[ 294.307853] sp : ffff00001001bc80
[ 294.311208] x29: ffff00001001bc80 x28: ffff0000117e5000
[ 294.316594] x27: 0000000000000000 x26: dead000000000100
[ 294.321980] x25: dead000000000200 x24: ffff803f6bd06800
[ 294.327366] x23: 0000000000000000 x22: 0000000000000000
[ 294.332752] x21: ffff00001001bd04 x20: ffff80df33d19018
[ 294.338137] x19: ffff80df33d19018 x18: 0000000000000000
[ 294.343523] x17: 0000000000000000 x16: 0000000000000000
[ 294.348908] x15: 0000000000000000 x14: 0000000000000002
[ 294.354293] x13: 0000000000000000 x12: 0000000000000000
[ 294.359679] x11: 0000000000000000 x10: 0000000000100000
[ 294.365065] x9 : 0000000000000000 x8 : 0000000000000004
[ 294.370451] x7 : 0000000000000000 x6 : ffff80df34558678
[ 294.375836] x5 : 000000000000000c x4 : 0000000000000000
[ 294.381221] x3 : 0000000000000001 x2 : 0000803fea6ea000
[ 294.386607] x1 : 0000803fea6ea008 x0 : 0000000000000001
[ 294.391994] Process swapper/3 (pid: 0, stack limit = 0x0000000083087293)
[ 294.398791] Call trace:
[ 294.401266] __srcu_read_lock+0x38/0x58
[ 294.405154] acquire_ipmi_user+0x2c/0x70 [ipmi_msghandler]
[ 294.410716] deliver_response+0x80/0xf8 [ipmi_msghandler]
[ 294.416189] deliver_local_response+0x28/0x68 [ipmi_msghandler]
[ 294.422193] handle_one_recv_msg+0x158/0xcf8 [ipmi_msghandler]
[ 294.432050] handle_new_recv_msgs+0xc0/0x210 [ipmi_msghandler]
[ 294.441984] smi_recv_tasklet+0x8c/0x158 [ipmi_msghandler]
[ 294.451618] tasklet_action_common.isra.5+0x88/0x138
[ 294.460661] tasklet_action+0x2c/0x38
[ 294.468191] __do_softirq+0x120/0x2f8
[ 294.475561] irq_exit+0x134/0x140
[ 294.482445] __handle_domain_irq+0x6c/0xc0
[ 294.489954] gic_handle_irq+0xb8/0x178
[ 294.497037] el1_irq+0xb0/0x140
[ 294.503381] arch_cpu_idle+0x34/0x1a8
[ 294.510096] do_idle+0x1d4/0x290
[ 294.516322] cpu_startup_entry+0x28/0x30
[ 294.523230] secondary_start_kernel+0x184/0x1d0
[ 294.530657] Code: d538d082 d2800023 8b010c81 8b020021 (c85f7c25)
[ 294.539746] ---[ end trace 8a7a880dee570b29 ]---
[ 294.547341] Kernel panic - not syncing: Fatal exception in interrupt
[ 294.556837] SMP: stopping secondary CPUs
[ 294.563996] Kernel Offset: disabled
[ 294.570515] CPU features: 0x002,21006008
[ 294.577638] Memory Limit: none
[ 294.587178] Starting crashdump kernel...
[ 294.594314] Bye!
Because the user->release_barrier.rda is freed in ipmi_destroy_user(), but
the refcount is not zero, when acquire_ipmi_user() uses user->release_barrier.rda
in __srcu_read_lock(), it causes oops.
Fix this by calling cleanup_srcu_struct() when the refcount is zero.
Fixes: e86ee2d44b44 ("ipmi: Rework locking and shutdown for hot remove")
Cc: [email protected] # 4.18
Signed-off-by: Yang Yingliang <[email protected]>
Signed-off-by: Corey Minyard <[email protected]> | 77f8269606bf95fcb232ee86f6da80886f1dfae8 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ipmi_destroy_user | ipmi_destroy_user( struct ipmi_user * user) | ['user'] | int ipmi_destroy_user(struct ipmi_user *user)
{
_ipmi_destroy_user(user);
cleanup_srcu_struct(&user->release_barrier);
kref_put(&user->refcount, free_user);
return 0;
} | 35 | True | 1 |
|
CVE-2019-6974 | False | False | False | False | AV:N/AC:M/Au:N/C:P/I:P/A:P | NETWORK | MEDIUM | NONE | PARTIAL | PARTIAL | PARTIAL | 6.8 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | HIGH | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 8.1 | HIGH | 2.2 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/cfa39381173d5f969daf43582c95ad679189cbc9', 'name': 'https://github.com/torvalds/linux/commit/cfa39381173d5f969daf43582c95ad679189cbc9', 'refsource': 'MISC', 'tags': ['Exploit', 'Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.156', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.156', 'refsource': 'MISC', 'tags': ['Mailing List', 'Vendor Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.8', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.8', 'refsource': 'MISC', 'tags': ['Mailing List', 'Vendor Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.21', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.21', 'refsource': 'MISC', 'tags': ['Mailing List', 'Vendor Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.14.99', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.14.99', 'refsource': 'MISC', 'tags': ['Mailing List', 'Vendor Advisory']}, {'url': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1765', 'name': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1765', 'refsource': 'MISC', 'tags': ['Exploit', 'Mailing List', 'Patch', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=cfa39381173d5f969daf43582c95ad679189cbc9', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=cfa39381173d5f969daf43582c95ad679189cbc9', 'refsource': 'MISC', 'tags': ['Mailing List', 'Vendor Advisory', 'Patch']}, {'url': 'https://www.exploit-db.com/exploits/46388/', 'name': '46388', 'refsource': 'EXPLOIT-DB', 'tags': ['Exploit', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/107127', 'name': '107127', 'refsource': 'BID', 'tags': ['Broken Link']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00034.html', 'name': '[debian-lts-announce] 20190327 [SECURITY] [DLA 1731-1] linux security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/04/msg00004.html', 'name': '[debian-lts-announce] 20190401 [SECURITY] [DLA 1731-2] linux regression update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3933-2/', 'name': 'USN-3933-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3932-2/', 'name': 'USN-3932-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3932-1/', 'name': 'USN-3932-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3931-2/', 'name': 'USN-3931-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3931-1/', 'name': 'USN-3931-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3930-2/', 'name': 'USN-3930-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3930-1/', 'name': 'USN-3930-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3933-1/', 'name': 'USN-3933-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://support.f5.com/csp/article/K11186236', 'name': 'https://support.f5.com/csp/article/K11186236', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:0833', 'name': 'RHSA-2019:0833', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:0818', 'name': 'RHSA-2019:0818', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/05/msg00002.html', 'name': '[debian-lts-announce] 20190503 [SECURITY] [DLA 1771-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHBA-2019:0959', 'name': 'RHBA-2019:0959', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2809', 'name': 'RHSA-2019:2809', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://support.f5.com/csp/article/K11186236?utm_source=f5support&utm_medium=RSS', 'name': 'https://support.f5.com/csp/article/K11186236?utm_source=f5support&utm_medium=RSS', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3967', 'name': 'RHSA-2019:3967', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2020:0103', 'name': 'RHSA-2020:0103', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}, {'lang': 'en', 'value': 'CWE-416'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.20.8', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_local_traffic_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '13.0.0', 'versionEndIncluding': '13.1.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_application_acceleration_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '13.0.0', 'versionEndIncluding': '13.1.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_advanced_firewall_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '13.0.0', 'versionEndIncluding': '13.1.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_analytics:*:*:*:*:*:*:*:*', 'versionStartIncluding': '13.0.0', 'versionEndIncluding': '13.1.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_access_policy_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '13.0.0', 'versionEndIncluding': '13.1.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_application_security_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '13.0.0', 'versionEndIncluding': '13.1.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_edge_gateway:*:*:*:*:*:*:*:*', 'versionStartIncluding': '13.0.0', 'versionEndIncluding': '13.1.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_fraud_protection_service:*:*:*:*:*:*:*:*', 'versionStartIncluding': '13.0.0', 'versionEndIncluding': '13.1.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_global_traffic_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '13.0.0', 'versionEndIncluding': '13.1.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_access_policy_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '14.0.0', 'versionEndIncluding': '14.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_access_policy_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '15.0.0', 'versionEndExcluding': '15.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_advanced_firewall_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '14.0.0', 'versionEndIncluding': '14.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_analytics:*:*:*:*:*:*:*:*', 'versionStartIncluding': '14.0.0', 'versionEndIncluding': '14.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_application_acceleration_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '14.0.0', 'versionEndIncluding': '14.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_application_security_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '14.0.0', 'versionEndIncluding': '14.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_application_security_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '15.0.0', 'versionEndExcluding': '15.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_edge_gateway:*:*:*:*:*:*:*:*', 'versionStartIncluding': '14.0.0', 'versionEndIncluding': '14.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_fraud_protection_service:*:*:*:*:*:*:*:*', 'versionStartIncluding': '14.0.0', 'versionEndIncluding': '14.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_global_traffic_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '14.0.0', 'versionEndIncluding': '14.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_link_controller:*:*:*:*:*:*:*:*', 'versionStartIncluding': '13.0.0', 'versionEndIncluding': '13.1.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_link_controller:*:*:*:*:*:*:*:*', 'versionStartIncluding': '14.0.0', 'versionEndIncluding': '14.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_local_traffic_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '14.0.0', 'versionEndIncluding': '14.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_local_traffic_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '15.0.0', 'versionEndExcluding': '15.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_policy_enforcement_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '13.0.0', 'versionEndIncluding': '13.1.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_policy_enforcement_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '14.0.0', 'versionEndIncluding': '14.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_webaccelerator:*:*:*:*:*:*:*:*', 'versionStartIncluding': '13.0.0', 'versionEndIncluding': '13.1.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_webaccelerator:*:*:*:*:*:*:*:*', 'versionStartIncluding': '14.0.0', 'versionEndIncluding': '14.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_advanced_firewall_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '15.0.0', 'versionEndExcluding': '15.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_analytics:*:*:*:*:*:*:*:*', 'versionStartIncluding': '15.0.0', 'versionEndExcluding': '15.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_application_acceleration_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '15.0.0', 'versionEndExcluding': '15.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_edge_gateway:*:*:*:*:*:*:*:*', 'versionStartIncluding': '15.0.0', 'versionEndExcluding': '15.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_fraud_protection_service:*:*:*:*:*:*:*:*', 'versionStartIncluding': '15.0.0', 'versionEndExcluding': '15.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_global_traffic_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '15.0.0', 'versionEndExcluding': '15.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_link_controller:*:*:*:*:*:*:*:*', 'versionStartIncluding': '15.0.0', 'versionEndExcluding': '15.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_policy_enforcement_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '15.0.0', 'versionEndExcluding': '15.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_webaccelerator:*:*:*:*:*:*:*:*', 'versionStartIncluding': '15.0.0', 'versionEndExcluding': '15.1.0', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:redhat:openshift_container_platform:3.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In the Linux kernel before 4.20.8, kvm_ioctl_create_device in virt/kvm/kvm_main.c mishandles reference counting because of a race condition, leading to a use-after-free.'}] | 2022-04-05T20:40Z | 2019-02-15T15:29Z | Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') | The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently. |
This can have security implications when the expected synchronization is in security-critical code, such as recording whether a user is authenticated or modifying important state information that should not be influenced by an outsider.
A race condition occurs within concurrent environments, and is effectively a property of a code sequence. Depending on the context, a code sequence may be in the form of a function call, a small number of instructions, a series of program invocations, etc.
A race condition violates these properties, which are closely related:
Exclusivity - the code sequence is given exclusive access to the shared resource, i.e., no other code sequence can modify properties of the shared resource before the original sequence has completed execution.
Atomicity - the code sequence is behaviorally atomic, i.e., no other thread or process can concurrently execute the same sequence of instructions (or a subset) against the same resource.
A race condition exists when an "interfering code sequence" can still access the shared resource, violating exclusivity. Programmers may assume that certain code sequences execute too quickly to be affected by an interfering code sequence; when they are not, this violates atomicity. For example, the single "x++" statement may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read (the original value of x), followed by a computation (x+1), followed by a write (save the result to x).
The interfering code sequence could be "trusted" or "untrusted." A trusted interfering code sequence occurs within the program; it cannot be modified by the attacker, and it can only be invoked indirectly. An untrusted interfering code sequence can be authored directly by the attacker, and typically it is external to the vulnerable program.
| https://cwe.mitre.org/data/definitions/362.html | 0 | Jann Horn | 2019-01-26 01:54:33+01:00 | 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]> | cfa39381173d5f969daf43582c95ad679189cbc9 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | kvm_ioctl_create_device | kvm_ioctl_create_device( struct kvm * kvm , struct kvm_create_device * cd) | ['kvm', 'cd'] | static int kvm_ioctl_create_device(struct kvm *kvm,
struct kvm_create_device *cd)
{
struct kvm_device_ops *ops = NULL;
struct kvm_device *dev;
bool test = cd->flags & KVM_CREATE_DEVICE_TEST;
int ret;
if (cd->type >= ARRAY_SIZE(kvm_device_ops_table))
return -ENODEV;
ops = kvm_device_ops_table[cd->type];
if (ops == NULL)
return -ENODEV;
if (test)
return 0;
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
if (!dev)
return -ENOMEM;
dev->ops = ops;
dev->kvm = kvm;
mutex_lock(&kvm->lock);
ret = ops->create(dev, cd->type);
if (ret < 0) {
mutex_unlock(&kvm->lock);
kfree(dev);
return ret;
}
list_add(&dev->vm_node, &kvm->devices);
mutex_unlock(&kvm->lock);
if (ops->init)
ops->init(dev);
ret = anon_inode_getfd(ops->name, &kvm_device_fops, dev, O_RDWR | O_CLOEXEC);
if (ret < 0) {
mutex_lock(&kvm->lock);
list_del(&dev->vm_node);
mutex_unlock(&kvm->lock);
ops->destroy(dev);
return ret;
}
kvm_get_kvm(kvm);
cd->fd = ret;
return 0;
} | 266 | True | 1 |
|
CVE-2019-6974 | False | False | False | False | AV:N/AC:M/Au:N/C:P/I:P/A:P | NETWORK | MEDIUM | NONE | PARTIAL | PARTIAL | PARTIAL | 6.8 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H | NETWORK | HIGH | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 8.1 | HIGH | 2.2 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/cfa39381173d5f969daf43582c95ad679189cbc9', 'name': 'https://github.com/torvalds/linux/commit/cfa39381173d5f969daf43582c95ad679189cbc9', 'refsource': 'MISC', 'tags': ['Exploit', 'Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.156', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.156', 'refsource': 'MISC', 'tags': ['Mailing List', 'Vendor Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.8', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.8', 'refsource': 'MISC', 'tags': ['Mailing List', 'Vendor Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.21', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.21', 'refsource': 'MISC', 'tags': ['Mailing List', 'Vendor Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.14.99', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.14.99', 'refsource': 'MISC', 'tags': ['Mailing List', 'Vendor Advisory']}, {'url': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1765', 'name': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1765', 'refsource': 'MISC', 'tags': ['Exploit', 'Mailing List', 'Patch', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=cfa39381173d5f969daf43582c95ad679189cbc9', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=cfa39381173d5f969daf43582c95ad679189cbc9', 'refsource': 'MISC', 'tags': ['Mailing List', 'Vendor Advisory', 'Patch']}, {'url': 'https://www.exploit-db.com/exploits/46388/', 'name': '46388', 'refsource': 'EXPLOIT-DB', 'tags': ['Exploit', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/107127', 'name': '107127', 'refsource': 'BID', 'tags': ['Broken Link']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00034.html', 'name': '[debian-lts-announce] 20190327 [SECURITY] [DLA 1731-1] linux security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/04/msg00004.html', 'name': '[debian-lts-announce] 20190401 [SECURITY] [DLA 1731-2] linux regression update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3933-2/', 'name': 'USN-3933-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3932-2/', 'name': 'USN-3932-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3932-1/', 'name': 'USN-3932-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3931-2/', 'name': 'USN-3931-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3931-1/', 'name': 'USN-3931-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3930-2/', 'name': 'USN-3930-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3930-1/', 'name': 'USN-3930-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3933-1/', 'name': 'USN-3933-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://support.f5.com/csp/article/K11186236', 'name': 'https://support.f5.com/csp/article/K11186236', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:0833', 'name': 'RHSA-2019:0833', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:0818', 'name': 'RHSA-2019:0818', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/05/msg00002.html', 'name': '[debian-lts-announce] 20190503 [SECURITY] [DLA 1771-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHBA-2019:0959', 'name': 'RHBA-2019:0959', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:2809', 'name': 'RHSA-2019:2809', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://support.f5.com/csp/article/K11186236?utm_source=f5support&utm_medium=RSS', 'name': 'https://support.f5.com/csp/article/K11186236?utm_source=f5support&utm_medium=RSS', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3967', 'name': 'RHSA-2019:3967', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2020:0103', 'name': 'RHSA-2020:0103', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}, {'lang': 'en', 'value': 'CWE-416'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.20.8', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_local_traffic_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '13.0.0', 'versionEndIncluding': '13.1.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_application_acceleration_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '13.0.0', 'versionEndIncluding': '13.1.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_advanced_firewall_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '13.0.0', 'versionEndIncluding': '13.1.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_analytics:*:*:*:*:*:*:*:*', 'versionStartIncluding': '13.0.0', 'versionEndIncluding': '13.1.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_access_policy_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '13.0.0', 'versionEndIncluding': '13.1.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_application_security_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '13.0.0', 'versionEndIncluding': '13.1.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_edge_gateway:*:*:*:*:*:*:*:*', 'versionStartIncluding': '13.0.0', 'versionEndIncluding': '13.1.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_fraud_protection_service:*:*:*:*:*:*:*:*', 'versionStartIncluding': '13.0.0', 'versionEndIncluding': '13.1.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_global_traffic_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '13.0.0', 'versionEndIncluding': '13.1.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_access_policy_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '14.0.0', 'versionEndIncluding': '14.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_access_policy_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '15.0.0', 'versionEndExcluding': '15.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_advanced_firewall_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '14.0.0', 'versionEndIncluding': '14.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_analytics:*:*:*:*:*:*:*:*', 'versionStartIncluding': '14.0.0', 'versionEndIncluding': '14.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_application_acceleration_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '14.0.0', 'versionEndIncluding': '14.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_application_security_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '14.0.0', 'versionEndIncluding': '14.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_application_security_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '15.0.0', 'versionEndExcluding': '15.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_edge_gateway:*:*:*:*:*:*:*:*', 'versionStartIncluding': '14.0.0', 'versionEndIncluding': '14.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_fraud_protection_service:*:*:*:*:*:*:*:*', 'versionStartIncluding': '14.0.0', 'versionEndIncluding': '14.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_global_traffic_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '14.0.0', 'versionEndIncluding': '14.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_link_controller:*:*:*:*:*:*:*:*', 'versionStartIncluding': '13.0.0', 'versionEndIncluding': '13.1.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_link_controller:*:*:*:*:*:*:*:*', 'versionStartIncluding': '14.0.0', 'versionEndIncluding': '14.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_local_traffic_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '14.0.0', 'versionEndIncluding': '14.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_local_traffic_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '15.0.0', 'versionEndExcluding': '15.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_policy_enforcement_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '13.0.0', 'versionEndIncluding': '13.1.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_policy_enforcement_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '14.0.0', 'versionEndIncluding': '14.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_webaccelerator:*:*:*:*:*:*:*:*', 'versionStartIncluding': '13.0.0', 'versionEndIncluding': '13.1.1', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_webaccelerator:*:*:*:*:*:*:*:*', 'versionStartIncluding': '14.0.0', 'versionEndIncluding': '14.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_advanced_firewall_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '15.0.0', 'versionEndExcluding': '15.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_analytics:*:*:*:*:*:*:*:*', 'versionStartIncluding': '15.0.0', 'versionEndExcluding': '15.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_application_acceleration_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '15.0.0', 'versionEndExcluding': '15.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_edge_gateway:*:*:*:*:*:*:*:*', 'versionStartIncluding': '15.0.0', 'versionEndExcluding': '15.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_fraud_protection_service:*:*:*:*:*:*:*:*', 'versionStartIncluding': '15.0.0', 'versionEndExcluding': '15.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_global_traffic_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '15.0.0', 'versionEndExcluding': '15.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_link_controller:*:*:*:*:*:*:*:*', 'versionStartIncluding': '15.0.0', 'versionEndExcluding': '15.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_policy_enforcement_manager:*:*:*:*:*:*:*:*', 'versionStartIncluding': '15.0.0', 'versionEndExcluding': '15.1.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:f5:big-ip_webaccelerator:*:*:*:*:*:*:*:*', 'versionStartIncluding': '15.0.0', 'versionEndExcluding': '15.1.0', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_eus:7.5:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:redhat:openshift_container_platform:3.11:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In the Linux kernel before 4.20.8, kvm_ioctl_create_device in virt/kvm/kvm_main.c mishandles reference counting because of a race condition, leading to a use-after-free.'}] | 2022-04-05T20:40Z | 2019-02-15T15:29Z | Use After Free | Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. |
The use of previously-freed memory can have any number of adverse consequences, ranging from the corruption of valid data to the execution of arbitrary code, depending on the instantiation and timing of the flaw. The simplest way data corruption may occur involves the system's reuse of the freed memory. Use-after-free errors have two common and sometimes overlapping causes:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for freeing the memory.
In this scenario, the memory in question is allocated to another pointer validly at some point after it has been freed. The original pointer to the freed memory is used again and points to somewhere within the new allocation. As the data is changed, it corrupts the validly used memory; this induces undefined behavior in the process.
If the newly allocated data chances to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.
| https://cwe.mitre.org/data/definitions/416.html | 0 | Jann Horn | 2019-01-26 01:54:33+01:00 | 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]> | cfa39381173d5f969daf43582c95ad679189cbc9 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | kvm_ioctl_create_device | kvm_ioctl_create_device( struct kvm * kvm , struct kvm_create_device * cd) | ['kvm', 'cd'] | static int kvm_ioctl_create_device(struct kvm *kvm,
struct kvm_create_device *cd)
{
struct kvm_device_ops *ops = NULL;
struct kvm_device *dev;
bool test = cd->flags & KVM_CREATE_DEVICE_TEST;
int ret;
if (cd->type >= ARRAY_SIZE(kvm_device_ops_table))
return -ENODEV;
ops = kvm_device_ops_table[cd->type];
if (ops == NULL)
return -ENODEV;
if (test)
return 0;
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
if (!dev)
return -ENOMEM;
dev->ops = ops;
dev->kvm = kvm;
mutex_lock(&kvm->lock);
ret = ops->create(dev, cd->type);
if (ret < 0) {
mutex_unlock(&kvm->lock);
kfree(dev);
return ret;
}
list_add(&dev->vm_node, &kvm->devices);
mutex_unlock(&kvm->lock);
if (ops->init)
ops->init(dev);
ret = anon_inode_getfd(ops->name, &kvm_device_fops, dev, O_RDWR | O_CLOEXEC);
if (ret < 0) {
mutex_lock(&kvm->lock);
list_del(&dev->vm_node);
mutex_unlock(&kvm->lock);
ops->destroy(dev);
return ret;
}
kvm_get_kvm(kvm);
cd->fd = ret;
return 0;
} | 266 | True | 1 |
|
CVE-2019-11811 | False | False | False | False | AV:L/AC:M/Au:N/C:C/I:C/A:C | LOCAL | MEDIUM | NONE | COMPLETE | COMPLETE | COMPLETE | 6.9 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H | LOCAL | HIGH | LOW | NONE | UNCHANGED | HIGH | HIGH | HIGH | 7.0 | HIGH | 1.0 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/401e7e88d4ef80188ffa07095ac00456f901b8c4', 'name': 'https://github.com/torvalds/linux/commit/401e7e88d4ef80188ffa07095ac00456f901b8c4', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=401e7e88d4ef80188ffa07095ac00456f901b8c4', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=401e7e88d4ef80188ffa07095ac00456f901b8c4', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.0.4', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.0.4', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-05/msg00071.html', 'name': 'openSUSE-SU-2019:1479', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'https://support.f5.com/csp/article/K01512680', 'name': 'https://support.f5.com/csp/article/K01512680', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20190719-0003/', 'name': 'https://security.netapp.com/advisory/ntap-20190719-0003/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/108410', 'name': '108410', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:1873', 'name': 'RHSA-2019:1873', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:1891', 'name': 'RHSA-2019:1891', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:1959', 'name': 'RHSA-2019:1959', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:1971', 'name': 'RHSA-2019:1971', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4058', 'name': 'RHSA-2019:4058', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4057', 'name': 'RHSA-2019:4057', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2020:0036', 'name': 'RHSA-2020:0036', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-416'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.0.4', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:15.1:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel before 5.0.4. There is a use-after-free upon attempted read access to /proc/ioports after the ipmi_si module is removed, related to drivers/char/ipmi/ipmi_si_intf.c, drivers/char/ipmi/ipmi_si_mem_io.c, and drivers/char/ipmi/ipmi_si_port_io.c.'}] | 2020-05-06T15:14Z | 2019-05-07T14:29Z | Use After Free | Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. |
The use of previously-freed memory can have any number of adverse consequences, ranging from the corruption of valid data to the execution of arbitrary code, depending on the instantiation and timing of the flaw. The simplest way data corruption may occur involves the system's reuse of the freed memory. Use-after-free errors have two common and sometimes overlapping causes:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for freeing the memory.
In this scenario, the memory in question is allocated to another pointer validly at some point after it has been freed. The original pointer to the freed memory is used again and points to somewhere within the new allocation. As the data is changed, it corrupts the validly used memory; this induces undefined behavior in the process.
If the newly allocated data chances to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.
| https://cwe.mitre.org/data/definitions/416.html | 0 | Yang Yingliang | 2019-01-28 11:08:54+08:00 | ipmi_si: fix use-after-free of resource->name
When we excute the following commands, we got oops
rmmod ipmi_si
cat /proc/ioports
[ 1623.482380] Unable to handle kernel paging request at virtual address ffff00000901d478
[ 1623.482382] Mem abort info:
[ 1623.482383] ESR = 0x96000007
[ 1623.482385] Exception class = DABT (current EL), IL = 32 bits
[ 1623.482386] SET = 0, FnV = 0
[ 1623.482387] EA = 0, S1PTW = 0
[ 1623.482388] Data abort info:
[ 1623.482389] ISV = 0, ISS = 0x00000007
[ 1623.482390] CM = 0, WnR = 0
[ 1623.482393] swapper pgtable: 4k pages, 48-bit VAs, pgdp = 00000000d7d94a66
[ 1623.482395] [ffff00000901d478] pgd=000000dffbfff003, pud=000000dffbffe003, pmd=0000003f5d06e003, pte=0000000000000000
[ 1623.482399] Internal error: Oops: 96000007 [#1] SMP
[ 1623.487407] Modules linked in: ipmi_si(E) nls_utf8 isofs rpcrdma ib_iser ib_srpt target_core_mod ib_srp scsi_transport_srp ib_ipoib rdma_ucm ib_umad rdma_cm ib_cm dm_mirror dm_region_hash dm_log iw_cm dm_mod aes_ce_blk crypto_simd cryptd aes_ce_cipher ses ghash_ce sha2_ce enclosure sha256_arm64 sg sha1_ce hisi_sas_v2_hw hibmc_drm sbsa_gwdt hisi_sas_main ip_tables mlx5_ib ib_uverbs marvell ib_core mlx5_core ixgbe mdio hns_dsaf ipmi_devintf hns_enet_drv ipmi_msghandler hns_mdio [last unloaded: ipmi_si]
[ 1623.532410] CPU: 30 PID: 11438 Comm: cat Kdump: loaded Tainted: G E 5.0.0-rc3+ #168
[ 1623.541498] Hardware name: Huawei TaiShan 2280 /BC11SPCD, BIOS 1.37 11/21/2017
[ 1623.548822] pstate: a0000005 (NzCv daif -PAN -UAO)
[ 1623.553684] pc : string+0x28/0x98
[ 1623.557040] lr : vsnprintf+0x368/0x5e8
[ 1623.560837] sp : ffff000013213a80
[ 1623.564191] x29: ffff000013213a80 x28: ffff00001138abb5
[ 1623.569577] x27: ffff000013213c18 x26: ffff805f67d06049
[ 1623.574963] x25: 0000000000000000 x24: ffff00001138abb5
[ 1623.580349] x23: 0000000000000fb7 x22: ffff0000117ed000
[ 1623.585734] x21: ffff000011188fd8 x20: ffff805f67d07000
[ 1623.591119] x19: ffff805f67d06061 x18: ffffffffffffffff
[ 1623.596505] x17: 0000000000000200 x16: 0000000000000000
[ 1623.601890] x15: ffff0000117ed748 x14: ffff805f67d07000
[ 1623.607276] x13: ffff805f67d0605e x12: 0000000000000000
[ 1623.612661] x11: 0000000000000000 x10: 0000000000000000
[ 1623.618046] x9 : 0000000000000000 x8 : 000000000000000f
[ 1623.623432] x7 : ffff805f67d06061 x6 : fffffffffffffffe
[ 1623.628817] x5 : 0000000000000012 x4 : ffff00000901d478
[ 1623.634203] x3 : ffff0a00ffffff04 x2 : ffff805f67d07000
[ 1623.639588] x1 : ffff805f67d07000 x0 : ffffffffffffffff
[ 1623.644974] Process cat (pid: 11438, stack limit = 0x000000008d4cbc10)
[ 1623.651592] Call trace:
[ 1623.654068] string+0x28/0x98
[ 1623.657071] vsnprintf+0x368/0x5e8
[ 1623.660517] seq_vprintf+0x70/0x98
[ 1623.668009] seq_printf+0x7c/0xa0
[ 1623.675530] r_show+0xc8/0xf8
[ 1623.682558] seq_read+0x330/0x440
[ 1623.689877] proc_reg_read+0x78/0xd0
[ 1623.697346] __vfs_read+0x60/0x1a0
[ 1623.704564] vfs_read+0x94/0x150
[ 1623.711339] ksys_read+0x6c/0xd8
[ 1623.717939] __arm64_sys_read+0x24/0x30
[ 1623.725077] el0_svc_common+0x120/0x148
[ 1623.732035] el0_svc_handler+0x30/0x40
[ 1623.738757] el0_svc+0x8/0xc
[ 1623.744520] Code: d1000406 aa0103e2 54000149 b4000080 (39400085)
[ 1623.753441] ---[ end trace f91b6a4937de9835 ]---
[ 1623.760871] Kernel panic - not syncing: Fatal exception
[ 1623.768935] SMP: stopping secondary CPUs
[ 1623.775718] Kernel Offset: disabled
[ 1623.781998] CPU features: 0x002,21006008
[ 1623.788777] Memory Limit: none
[ 1623.798329] Starting crashdump kernel...
[ 1623.805202] Bye!
If io_setup is called successful in try_smi_init() but try_smi_init()
goes out_err before calling ipmi_register_smi(), so ipmi_unregister_smi()
will not be called while removing module. It leads to the resource that
allocated in io_setup() can not be freed, but the name(DEVICE_NAME) of
resource is freed while removing the module. It causes use-after-free
when cat /proc/ioports.
Fix this by calling io_cleanup() while try_smi_init() goes to out_err.
and don't call io_cleanup() until io_setup() returns successful to avoid
warning prints.
Fixes: 93c303d2045b ("ipmi_si: Clean up shutdown a bit")
Cc: [email protected]
Reported-by: NuoHan Qiao <[email protected]>
Suggested-by: Corey Minyard <[email protected]>
Signed-off-by: Yang Yingliang <[email protected]>
Signed-off-by: Corey Minyard <[email protected]> | 401e7e88d4ef80188ffa07095ac00456f901b8c4 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ipmi_si_mem_setup | ipmi_si_mem_setup( struct si_sm_io * io) | ['io'] | int ipmi_si_mem_setup(struct si_sm_io *io)
{
unsigned long addr = io->addr_data;
int mapsize, idx;
if (!addr)
return -ENODEV;
io->io_cleanup = mem_cleanup;
/*
* Figure out the actual readb/readw/readl/etc routine to use based
* upon the register size.
*/
switch (io->regsize) {
case 1:
io->inputb = intf_mem_inb;
io->outputb = intf_mem_outb;
break;
case 2:
io->inputb = intf_mem_inw;
io->outputb = intf_mem_outw;
break;
case 4:
io->inputb = intf_mem_inl;
io->outputb = intf_mem_outl;
break;
#ifdef readq
case 8:
io->inputb = mem_inq;
io->outputb = mem_outq;
break;
#endif
default:
dev_warn(io->dev, "Invalid register size: %d\n",
io->regsize);
return -EINVAL;
}
/*
* Some BIOSes reserve disjoint memory regions in their ACPI
* tables. This causes problems when trying to request the
* entire region. Therefore we must request each register
* separately.
*/
for (idx = 0; idx < io->io_size; idx++) {
if (request_mem_region(addr + idx * io->regspacing,
io->regsize, DEVICE_NAME) == NULL) {
/* Undo allocations */
mem_region_cleanup(io, idx);
return -EIO;
}
}
/*
* Calculate the total amount of memory to claim. This is an
* unusual looking calculation, but it avoids claiming any
* more memory than it has to. It will claim everything
* between the first address to the end of the last full
* register.
*/
mapsize = ((io->io_size * io->regspacing)
- (io->regspacing - io->regsize));
io->addr = ioremap(addr, mapsize);
if (io->addr == NULL) {
mem_region_cleanup(io, io->io_size);
return -EIO;
}
return 0;
} | 244 | True | 1 |
|
CVE-2019-11811 | False | False | False | False | AV:L/AC:M/Au:N/C:C/I:C/A:C | LOCAL | MEDIUM | NONE | COMPLETE | COMPLETE | COMPLETE | 6.9 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H | LOCAL | HIGH | LOW | NONE | UNCHANGED | HIGH | HIGH | HIGH | 7.0 | HIGH | 1.0 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/401e7e88d4ef80188ffa07095ac00456f901b8c4', 'name': 'https://github.com/torvalds/linux/commit/401e7e88d4ef80188ffa07095ac00456f901b8c4', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=401e7e88d4ef80188ffa07095ac00456f901b8c4', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=401e7e88d4ef80188ffa07095ac00456f901b8c4', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.0.4', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.0.4', 'refsource': 'MISC', 'tags': ['Release Notes', 'Vendor Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-05/msg00071.html', 'name': 'openSUSE-SU-2019:1479', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'https://support.f5.com/csp/article/K01512680', 'name': 'https://support.f5.com/csp/article/K01512680', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20190719-0003/', 'name': 'https://security.netapp.com/advisory/ntap-20190719-0003/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/108410', 'name': '108410', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:1873', 'name': 'RHSA-2019:1873', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:1891', 'name': 'RHSA-2019:1891', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:1959', 'name': 'RHSA-2019:1959', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:1971', 'name': 'RHSA-2019:1971', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4058', 'name': 'RHSA-2019:4058', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:4057', 'name': 'RHSA-2019:4057', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2020:0036', 'name': 'RHSA-2020:0036', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-416'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.0.4', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_aus:7.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.4:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux_aus:7.6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:15.1:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel before 5.0.4. There is a use-after-free upon attempted read access to /proc/ioports after the ipmi_si module is removed, related to drivers/char/ipmi/ipmi_si_intf.c, drivers/char/ipmi/ipmi_si_mem_io.c, and drivers/char/ipmi/ipmi_si_port_io.c.'}] | 2020-05-06T15:14Z | 2019-05-07T14:29Z | Use After Free | Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. |
The use of previously-freed memory can have any number of adverse consequences, ranging from the corruption of valid data to the execution of arbitrary code, depending on the instantiation and timing of the flaw. The simplest way data corruption may occur involves the system's reuse of the freed memory. Use-after-free errors have two common and sometimes overlapping causes:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for freeing the memory.
In this scenario, the memory in question is allocated to another pointer validly at some point after it has been freed. The original pointer to the freed memory is used again and points to somewhere within the new allocation. As the data is changed, it corrupts the validly used memory; this induces undefined behavior in the process.
If the newly allocated data chances to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.
| https://cwe.mitre.org/data/definitions/416.html | 0 | Yang Yingliang | 2019-01-28 11:08:54+08:00 | ipmi_si: fix use-after-free of resource->name
When we excute the following commands, we got oops
rmmod ipmi_si
cat /proc/ioports
[ 1623.482380] Unable to handle kernel paging request at virtual address ffff00000901d478
[ 1623.482382] Mem abort info:
[ 1623.482383] ESR = 0x96000007
[ 1623.482385] Exception class = DABT (current EL), IL = 32 bits
[ 1623.482386] SET = 0, FnV = 0
[ 1623.482387] EA = 0, S1PTW = 0
[ 1623.482388] Data abort info:
[ 1623.482389] ISV = 0, ISS = 0x00000007
[ 1623.482390] CM = 0, WnR = 0
[ 1623.482393] swapper pgtable: 4k pages, 48-bit VAs, pgdp = 00000000d7d94a66
[ 1623.482395] [ffff00000901d478] pgd=000000dffbfff003, pud=000000dffbffe003, pmd=0000003f5d06e003, pte=0000000000000000
[ 1623.482399] Internal error: Oops: 96000007 [#1] SMP
[ 1623.487407] Modules linked in: ipmi_si(E) nls_utf8 isofs rpcrdma ib_iser ib_srpt target_core_mod ib_srp scsi_transport_srp ib_ipoib rdma_ucm ib_umad rdma_cm ib_cm dm_mirror dm_region_hash dm_log iw_cm dm_mod aes_ce_blk crypto_simd cryptd aes_ce_cipher ses ghash_ce sha2_ce enclosure sha256_arm64 sg sha1_ce hisi_sas_v2_hw hibmc_drm sbsa_gwdt hisi_sas_main ip_tables mlx5_ib ib_uverbs marvell ib_core mlx5_core ixgbe mdio hns_dsaf ipmi_devintf hns_enet_drv ipmi_msghandler hns_mdio [last unloaded: ipmi_si]
[ 1623.532410] CPU: 30 PID: 11438 Comm: cat Kdump: loaded Tainted: G E 5.0.0-rc3+ #168
[ 1623.541498] Hardware name: Huawei TaiShan 2280 /BC11SPCD, BIOS 1.37 11/21/2017
[ 1623.548822] pstate: a0000005 (NzCv daif -PAN -UAO)
[ 1623.553684] pc : string+0x28/0x98
[ 1623.557040] lr : vsnprintf+0x368/0x5e8
[ 1623.560837] sp : ffff000013213a80
[ 1623.564191] x29: ffff000013213a80 x28: ffff00001138abb5
[ 1623.569577] x27: ffff000013213c18 x26: ffff805f67d06049
[ 1623.574963] x25: 0000000000000000 x24: ffff00001138abb5
[ 1623.580349] x23: 0000000000000fb7 x22: ffff0000117ed000
[ 1623.585734] x21: ffff000011188fd8 x20: ffff805f67d07000
[ 1623.591119] x19: ffff805f67d06061 x18: ffffffffffffffff
[ 1623.596505] x17: 0000000000000200 x16: 0000000000000000
[ 1623.601890] x15: ffff0000117ed748 x14: ffff805f67d07000
[ 1623.607276] x13: ffff805f67d0605e x12: 0000000000000000
[ 1623.612661] x11: 0000000000000000 x10: 0000000000000000
[ 1623.618046] x9 : 0000000000000000 x8 : 000000000000000f
[ 1623.623432] x7 : ffff805f67d06061 x6 : fffffffffffffffe
[ 1623.628817] x5 : 0000000000000012 x4 : ffff00000901d478
[ 1623.634203] x3 : ffff0a00ffffff04 x2 : ffff805f67d07000
[ 1623.639588] x1 : ffff805f67d07000 x0 : ffffffffffffffff
[ 1623.644974] Process cat (pid: 11438, stack limit = 0x000000008d4cbc10)
[ 1623.651592] Call trace:
[ 1623.654068] string+0x28/0x98
[ 1623.657071] vsnprintf+0x368/0x5e8
[ 1623.660517] seq_vprintf+0x70/0x98
[ 1623.668009] seq_printf+0x7c/0xa0
[ 1623.675530] r_show+0xc8/0xf8
[ 1623.682558] seq_read+0x330/0x440
[ 1623.689877] proc_reg_read+0x78/0xd0
[ 1623.697346] __vfs_read+0x60/0x1a0
[ 1623.704564] vfs_read+0x94/0x150
[ 1623.711339] ksys_read+0x6c/0xd8
[ 1623.717939] __arm64_sys_read+0x24/0x30
[ 1623.725077] el0_svc_common+0x120/0x148
[ 1623.732035] el0_svc_handler+0x30/0x40
[ 1623.738757] el0_svc+0x8/0xc
[ 1623.744520] Code: d1000406 aa0103e2 54000149 b4000080 (39400085)
[ 1623.753441] ---[ end trace f91b6a4937de9835 ]---
[ 1623.760871] Kernel panic - not syncing: Fatal exception
[ 1623.768935] SMP: stopping secondary CPUs
[ 1623.775718] Kernel Offset: disabled
[ 1623.781998] CPU features: 0x002,21006008
[ 1623.788777] Memory Limit: none
[ 1623.798329] Starting crashdump kernel...
[ 1623.805202] Bye!
If io_setup is called successful in try_smi_init() but try_smi_init()
goes out_err before calling ipmi_register_smi(), so ipmi_unregister_smi()
will not be called while removing module. It leads to the resource that
allocated in io_setup() can not be freed, but the name(DEVICE_NAME) of
resource is freed while removing the module. It causes use-after-free
when cat /proc/ioports.
Fix this by calling io_cleanup() while try_smi_init() goes to out_err.
and don't call io_cleanup() until io_setup() returns successful to avoid
warning prints.
Fixes: 93c303d2045b ("ipmi_si: Clean up shutdown a bit")
Cc: [email protected]
Reported-by: NuoHan Qiao <[email protected]>
Suggested-by: Corey Minyard <[email protected]>
Signed-off-by: Yang Yingliang <[email protected]>
Signed-off-by: Corey Minyard <[email protected]> | 401e7e88d4ef80188ffa07095ac00456f901b8c4 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ipmi_si_port_setup | ipmi_si_port_setup( struct si_sm_io * io) | ['io'] | int ipmi_si_port_setup(struct si_sm_io *io)
{
unsigned int addr = io->addr_data;
int idx;
if (!addr)
return -ENODEV;
io->io_cleanup = port_cleanup;
/*
* Figure out the actual inb/inw/inl/etc routine to use based
* upon the register size.
*/
switch (io->regsize) {
case 1:
io->inputb = port_inb;
io->outputb = port_outb;
break;
case 2:
io->inputb = port_inw;
io->outputb = port_outw;
break;
case 4:
io->inputb = port_inl;
io->outputb = port_outl;
break;
default:
dev_warn(io->dev, "Invalid register size: %d\n",
io->regsize);
return -EINVAL;
}
/*
* Some BIOSes reserve disjoint I/O regions in their ACPI
* tables. This causes problems when trying to register the
* entire I/O region. Therefore we must register each I/O
* port separately.
*/
for (idx = 0; idx < io->io_size; idx++) {
if (request_region(addr + idx * io->regspacing,
io->regsize, DEVICE_NAME) == NULL) {
/* Undo allocations */
while (idx--)
release_region(addr + idx * io->regspacing,
io->regsize);
return -EIO;
}
}
return 0;
} | 180 | True | 1 |
|
CVE-2019-9162 | False | False | False | False | AV:L/AC:L/Au:N/C:P/I:P/A:P | LOCAL | LOW | NONE | PARTIAL | PARTIAL | PARTIAL | 4.6 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/c4c07b4d6fa1f11880eab8e076d3d060ef3f55fc', 'name': 'https://github.com/torvalds/linux/commit/c4c07b4d6fa1f11880eab8e076d3d060ef3f55fc', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.12', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.12', 'refsource': 'MISC', 'tags': ['Mailing List', 'Vendor Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.25', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.25', 'refsource': 'MISC', 'tags': ['Mailing List', 'Vendor Advisory']}, {'url': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1776', 'name': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1776', 'refsource': 'MISC', 'tags': ['Issue Tracking', 'Exploit', 'Mailing List', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c4c07b4d6fa1f11880eab8e076d3d060ef3f55fc', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c4c07b4d6fa1f11880eab8e076d3d060ef3f55fc', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/107159', 'name': '107159', 'refsource': 'BID', 'tags': ['Broken Link']}, {'url': 'https://www.exploit-db.com/exploits/46477/', 'name': '46477', 'refsource': 'EXPLOIT-DB', 'tags': ['Exploit', 'Patch', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://security.netapp.com/advisory/ntap-20190327-0002/', 'name': 'https://security.netapp.com/advisory/ntap-20190327-0002/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3930-2/', 'name': 'USN-3930-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3930-1/', 'name': 'USN-3930-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://support.f5.com/csp/article/K31864522', 'name': 'https://support.f5.com/csp/article/K31864522', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-787'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.20', 'versionEndExcluding': '4.20.12', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.19', 'versionEndExcluding': '4.19.25', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:solidfire:-:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:hci_management_node:-:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:snapprotect:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:cn1610_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:cn1610:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}] | [{'lang': 'en', 'value': 'In the Linux kernel before 4.20.12, net/ipv4/netfilter/nf_nat_snmp_basic_main.c in the SNMP NAT module has insufficient ASN.1 length checks (aka an array index error), making out-of-bounds read and write operations possible, leading to an OOPS or local privilege escalation. This affects snmp_version and snmp_helper.'}] | 2022-04-05T20:46Z | 2019-02-25T23:29Z | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | Typically, this can result in corruption of data, a crash, or code execution. The software may modify an index or perform pointer arithmetic that references a memory location that is outside of the boundaries of the buffer. A subsequent write operation then produces undefined or unexpected results.
| https://cwe.mitre.org/data/definitions/787.html | 0 | Jann Horn | 2019-02-06 22:56:15+01:00 | netfilter: nf_nat_snmp_basic: add missing length checks in ASN.1 cbs
The generic ASN.1 decoder infrastructure doesn't guarantee that callbacks
will get as much data as they expect; callbacks have to check the `datalen`
parameter before looking at `data`. Make sure that snmp_version() and
snmp_helper() don't read/write beyond the end of the packet data.
(Also move the assignment to `pdata` down below the check to make it clear
that it isn't necessarily a pointer we can use before the `datalen` check.)
Fixes: cc2d58634e0f ("netfilter: nf_nat_snmp_basic: use asn1 decoder library")
Signed-off-by: Jann Horn <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]> | c4c07b4d6fa1f11880eab8e076d3d060ef3f55fc | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | snmp_helper | snmp_helper( void * context , size_t hdrlen , unsigned char tag , const void * data , size_t datalen) | ['context', 'hdrlen', 'tag', 'data', 'datalen'] | int snmp_helper(void *context, size_t hdrlen, unsigned char tag,
const void *data, size_t datalen)
{
struct snmp_ctx *ctx = (struct snmp_ctx *)context;
__be32 *pdata = (__be32 *)data;
if (*pdata == ctx->from) {
pr_debug("%s: %pI4 to %pI4\n", __func__,
(void *)&ctx->from, (void *)&ctx->to);
if (*ctx->check)
fast_csum(ctx, (unsigned char *)data - ctx->begin);
*pdata = ctx->to;
}
return 1;
} | 114 | True | 1 |
|
CVE-2019-12819 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/torvalds/linux/commit/6ff7b060535e87c2ae14dd8548512abfdda528fb', 'name': 'https://github.com/torvalds/linux/commit/6ff7b060535e87c2ae14dd8548512abfdda528fb', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6ff7b060535e87c2ae14dd8548512abfdda528fb', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6ff7b060535e87c2ae14dd8548512abfdda528fb', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/108768', 'name': '108768', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00039.html', 'name': 'openSUSE-SU-2019:1570', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00040.html', 'name': 'openSUSE-SU-2019:1571', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00048.html', 'name': 'openSUSE-SU-2019:1579', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://security.netapp.com/advisory/ntap-20190710-0002/', 'name': 'https://security.netapp.com/advisory/ntap-20190710-0002/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://usn.ubuntu.com/4094-1/', 'name': 'USN-4094-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://packetstormsecurity.com/files/154245/Kernel-Live-Patch-Security-Notice-LSN-0054-1.html', 'name': 'http://packetstormsecurity.com/files/154245/Kernel-Live-Patch-Security-Notice-LSN-0054-1.html', 'refsource': 'MISC', 'tags': []}, {'url': 'https://usn.ubuntu.com/4118-1/', 'name': 'USN-4118-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-416'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel before 5.0. The function __mdiobus_register() in drivers/net/phy/mdio_bus.c calls put_device(), which will trigger a fixed_mdio_bus_init use-after-free. This will cause a denial of service.'}] | 2019-06-18T15:15Z | 2019-06-14T02:29Z | Use After Free | Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. |
The use of previously-freed memory can have any number of adverse consequences, ranging from the corruption of valid data to the execution of arbitrary code, depending on the instantiation and timing of the flaw. The simplest way data corruption may occur involves the system's reuse of the freed memory. Use-after-free errors have two common and sometimes overlapping causes:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for freeing the memory.
In this scenario, the memory in question is allocated to another pointer validly at some point after it has been freed. The original pointer to the freed memory is used again and points to somewhere within the new allocation. As the data is changed, it corrupts the validly used memory; this induces undefined behavior in the process.
If the newly allocated data chances to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.
| https://cwe.mitre.org/data/definitions/416.html | 0 | YueHaibing | 2019-02-21 22:42:01+08:00 | mdio_bus: Fix use-after-free on device_register fails
KASAN has found use-after-free in fixed_mdio_bus_init,
commit 0c692d07842a ("drivers/net/phy/mdio_bus.c: call
put_device on device_register() failure") call put_device()
while device_register() fails,give up the last reference
to the device and allow mdiobus_release to be executed
,kfreeing the bus. However in most drives, mdiobus_free
be called to free the bus while mdiobus_register fails.
use-after-free occurs when access bus again, this patch
revert it to let mdiobus_free free the bus.
KASAN report details as below:
BUG: KASAN: use-after-free in mdiobus_free+0x85/0x90 drivers/net/phy/mdio_bus.c:482
Read of size 4 at addr ffff8881dc824d78 by task syz-executor.0/3524
CPU: 1 PID: 3524 Comm: syz-executor.0 Not tainted 5.0.0-rc7+ #45
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0xfa/0x1ce lib/dump_stack.c:113
print_address_description+0x65/0x270 mm/kasan/report.c:187
kasan_report+0x149/0x18d mm/kasan/report.c:317
mdiobus_free+0x85/0x90 drivers/net/phy/mdio_bus.c:482
fixed_mdio_bus_init+0x283/0x1000 [fixed_phy]
? 0xffffffffc0e40000
? 0xffffffffc0e40000
? 0xffffffffc0e40000
do_one_initcall+0xfa/0x5ca init/main.c:887
do_init_module+0x204/0x5f6 kernel/module.c:3460
load_module+0x66b2/0x8570 kernel/module.c:3808
__do_sys_finit_module+0x238/0x2a0 kernel/module.c:3902
do_syscall_64+0x147/0x600 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x462e99
Code: f7 d8 64 89 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f6215c19c58 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
RAX: ffffffffffffffda RBX: 000000000073bf00 RCX: 0000000000462e99
RDX: 0000000000000000 RSI: 0000000020000080 RDI: 0000000000000003
RBP: 00007f6215c19c70 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f6215c1a6bc
R13: 00000000004bcefb R14: 00000000006f7030 R15: 0000000000000004
Allocated by task 3524:
set_track mm/kasan/common.c:85 [inline]
__kasan_kmalloc.constprop.3+0xa0/0xd0 mm/kasan/common.c:496
kmalloc include/linux/slab.h:545 [inline]
kzalloc include/linux/slab.h:740 [inline]
mdiobus_alloc_size+0x54/0x1b0 drivers/net/phy/mdio_bus.c:143
fixed_mdio_bus_init+0x163/0x1000 [fixed_phy]
do_one_initcall+0xfa/0x5ca init/main.c:887
do_init_module+0x204/0x5f6 kernel/module.c:3460
load_module+0x66b2/0x8570 kernel/module.c:3808
__do_sys_finit_module+0x238/0x2a0 kernel/module.c:3902
do_syscall_64+0x147/0x600 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
Freed by task 3524:
set_track mm/kasan/common.c:85 [inline]
__kasan_slab_free+0x130/0x180 mm/kasan/common.c:458
slab_free_hook mm/slub.c:1409 [inline]
slab_free_freelist_hook mm/slub.c:1436 [inline]
slab_free mm/slub.c:2986 [inline]
kfree+0xe1/0x270 mm/slub.c:3938
device_release+0x78/0x200 drivers/base/core.c:919
kobject_cleanup lib/kobject.c:662 [inline]
kobject_release lib/kobject.c:691 [inline]
kref_put include/linux/kref.h:67 [inline]
kobject_put+0x146/0x240 lib/kobject.c:708
put_device+0x1c/0x30 drivers/base/core.c:2060
__mdiobus_register+0x483/0x560 drivers/net/phy/mdio_bus.c:382
fixed_mdio_bus_init+0x26b/0x1000 [fixed_phy]
do_one_initcall+0xfa/0x5ca init/main.c:887
do_init_module+0x204/0x5f6 kernel/module.c:3460
load_module+0x66b2/0x8570 kernel/module.c:3808
__do_sys_finit_module+0x238/0x2a0 kernel/module.c:3902
do_syscall_64+0x147/0x600 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
The buggy address belongs to the object at ffff8881dc824c80
which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 248 bytes inside of
2048-byte region [ffff8881dc824c80, ffff8881dc825480)
The buggy address belongs to the page:
page:ffffea0007720800 count:1 mapcount:0 mapping:ffff8881f6c02800 index:0x0 compound_mapcount: 0
flags: 0x2fffc0000010200(slab|head)
raw: 02fffc0000010200 0000000000000000 0000000500000001 ffff8881f6c02800
raw: 0000000000000000 00000000800f000f 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff8881dc824c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8881dc824c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8881dc824d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8881dc824d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8881dc824e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
Fixes: 0c692d07842a ("drivers/net/phy/mdio_bus.c: call put_device on device_register() failure")
Signed-off-by: YueHaibing <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Signed-off-by: David S. Miller <[email protected]> | 6ff7b060535e87c2ae14dd8548512abfdda528fb | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | __mdiobus_register | __mdiobus_register( struct mii_bus * bus , struct module * owner) | ['bus', 'owner'] | int __mdiobus_register(struct mii_bus *bus, struct module *owner)
{
struct mdio_device *mdiodev;
int i, err;
struct gpio_desc *gpiod;
if (NULL == bus || NULL == bus->name ||
NULL == bus->read || NULL == bus->write)
return -EINVAL;
BUG_ON(bus->state != MDIOBUS_ALLOCATED &&
bus->state != MDIOBUS_UNREGISTERED);
bus->owner = owner;
bus->dev.parent = bus->parent;
bus->dev.class = &mdio_bus_class;
bus->dev.groups = NULL;
dev_set_name(&bus->dev, "%s", bus->id);
err = device_register(&bus->dev);
if (err) {
pr_err("mii_bus %s failed to register\n", bus->id);
put_device(&bus->dev);
return -EINVAL;
}
mutex_init(&bus->mdio_lock);
/* de-assert bus level PHY GPIO reset */
gpiod = devm_gpiod_get_optional(&bus->dev, "reset", GPIOD_OUT_LOW);
if (IS_ERR(gpiod)) {
dev_err(&bus->dev, "mii_bus %s couldn't get reset GPIO\n",
bus->id);
device_del(&bus->dev);
return PTR_ERR(gpiod);
} else if (gpiod) {
bus->reset_gpiod = gpiod;
gpiod_set_value_cansleep(gpiod, 1);
udelay(bus->reset_delay_us);
gpiod_set_value_cansleep(gpiod, 0);
}
if (bus->reset)
bus->reset(bus);
for (i = 0; i < PHY_MAX_ADDR; i++) {
if ((bus->phy_mask & (1 << i)) == 0) {
struct phy_device *phydev;
phydev = mdiobus_scan(bus, i);
if (IS_ERR(phydev) && (PTR_ERR(phydev) != -ENODEV)) {
err = PTR_ERR(phydev);
goto error;
}
}
}
mdiobus_setup_mdiodev_from_board_info(bus, mdiobus_create_device);
bus->state = MDIOBUS_REGISTERED;
pr_info("%s: probed\n", bus->name);
return 0;
error:
while (--i >= 0) {
mdiodev = bus->mdio_map[i];
if (!mdiodev)
continue;
mdiodev->device_remove(mdiodev);
mdiodev->device_free(mdiodev);
}
/* Put PHYs in RESET to save power */
if (bus->reset_gpiod)
gpiod_set_value_cansleep(bus->reset_gpiod, 1);
device_del(&bus->dev);
return err;
} | 431 | True | 1 |
|
CVE-2019-18885 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/bobfuzzer/CVE-2019-18885', 'name': 'https://github.com/bobfuzzer/CVE-2019-18885', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-1/', 'name': 'USN-4254-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-2/', 'name': 'USN-4254-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'name': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'refsource': 'MISC', 'tags': []}, {'url': 'https://usn.ubuntu.com/4258-1/', 'name': 'USN-4258-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-1/', 'name': 'USN-4287-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-2/', 'name': 'USN-4287-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/08/msg00019.html', 'name': '[debian-lts-announce] 20200812 [SECURITY] [DLA 2323-1] linux-4.19 new package', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'name': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'fs/btrfs/volumes.c in the Linux kernel before 5.1 allows a btrfs_verify_dev_extents NULL pointer dereference via a crafted btrfs image because fs_devices->devices is mishandled within find_device, aka CID-09ba3bc9dd15.'}] | 2021-06-14T18:15Z | 2019-11-14T14:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Anand Jain | 2019-01-19 14:48:55+08:00 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]> | 09ba3bc9dd150457c506e4661380a6183af651c1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | btrfs_init_dev_replace | btrfs_init_dev_replace( struct btrfs_fs_info * fs_info) | ['fs_info'] | int btrfs_init_dev_replace(struct btrfs_fs_info *fs_info)
{
struct btrfs_key key;
struct btrfs_root *dev_root = fs_info->dev_root;
struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace;
struct extent_buffer *eb;
int slot;
int ret = 0;
struct btrfs_path *path = NULL;
int item_size;
struct btrfs_dev_replace_item *ptr;
u64 src_devid;
path = btrfs_alloc_path();
if (!path) {
ret = -ENOMEM;
goto out;
}
key.objectid = 0;
key.type = BTRFS_DEV_REPLACE_KEY;
key.offset = 0;
ret = btrfs_search_slot(NULL, dev_root, &key, path, 0, 0);
if (ret) {
no_valid_dev_replace_entry_found:
ret = 0;
dev_replace->replace_state =
BTRFS_DEV_REPLACE_ITEM_STATE_NEVER_STARTED;
dev_replace->cont_reading_from_srcdev_mode =
BTRFS_DEV_REPLACE_ITEM_CONT_READING_FROM_SRCDEV_MODE_ALWAYS;
dev_replace->time_started = 0;
dev_replace->time_stopped = 0;
atomic64_set(&dev_replace->num_write_errors, 0);
atomic64_set(&dev_replace->num_uncorrectable_read_errors, 0);
dev_replace->cursor_left = 0;
dev_replace->committed_cursor_left = 0;
dev_replace->cursor_left_last_write_of_item = 0;
dev_replace->cursor_right = 0;
dev_replace->srcdev = NULL;
dev_replace->tgtdev = NULL;
dev_replace->is_valid = 0;
dev_replace->item_needs_writeback = 0;
goto out;
}
slot = path->slots[0];
eb = path->nodes[0];
item_size = btrfs_item_size_nr(eb, slot);
ptr = btrfs_item_ptr(eb, slot, struct btrfs_dev_replace_item);
if (item_size != sizeof(struct btrfs_dev_replace_item)) {
btrfs_warn(fs_info,
"dev_replace entry found has unexpected size, ignore entry");
goto no_valid_dev_replace_entry_found;
}
src_devid = btrfs_dev_replace_src_devid(eb, ptr);
dev_replace->cont_reading_from_srcdev_mode =
btrfs_dev_replace_cont_reading_from_srcdev_mode(eb, ptr);
dev_replace->replace_state = btrfs_dev_replace_replace_state(eb, ptr);
dev_replace->time_started = btrfs_dev_replace_time_started(eb, ptr);
dev_replace->time_stopped =
btrfs_dev_replace_time_stopped(eb, ptr);
atomic64_set(&dev_replace->num_write_errors,
btrfs_dev_replace_num_write_errors(eb, ptr));
atomic64_set(&dev_replace->num_uncorrectable_read_errors,
btrfs_dev_replace_num_uncorrectable_read_errors(eb, ptr));
dev_replace->cursor_left = btrfs_dev_replace_cursor_left(eb, ptr);
dev_replace->committed_cursor_left = dev_replace->cursor_left;
dev_replace->cursor_left_last_write_of_item = dev_replace->cursor_left;
dev_replace->cursor_right = btrfs_dev_replace_cursor_right(eb, ptr);
dev_replace->is_valid = 1;
dev_replace->item_needs_writeback = 0;
switch (dev_replace->replace_state) {
case BTRFS_IOCTL_DEV_REPLACE_STATE_NEVER_STARTED:
case BTRFS_IOCTL_DEV_REPLACE_STATE_FINISHED:
case BTRFS_IOCTL_DEV_REPLACE_STATE_CANCELED:
dev_replace->srcdev = NULL;
dev_replace->tgtdev = NULL;
break;
case BTRFS_IOCTL_DEV_REPLACE_STATE_STARTED:
case BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED:
dev_replace->srcdev = btrfs_find_device(fs_info->fs_devices,
src_devid, NULL, NULL);
dev_replace->tgtdev = btrfs_find_device(fs_info->fs_devices,
BTRFS_DEV_REPLACE_DEVID,
NULL, NULL);
/*
* allow 'btrfs dev replace_cancel' if src/tgt device is
* missing
*/
if (!dev_replace->srcdev &&
!btrfs_test_opt(fs_info, DEGRADED)) {
ret = -EIO;
btrfs_warn(fs_info,
"cannot mount because device replace operation is ongoing and");
btrfs_warn(fs_info,
"srcdev (devid %llu) is missing, need to run 'btrfs dev scan'?",
src_devid);
}
if (!dev_replace->tgtdev &&
!btrfs_test_opt(fs_info, DEGRADED)) {
ret = -EIO;
btrfs_warn(fs_info,
"cannot mount because device replace operation is ongoing and");
btrfs_warn(fs_info,
"tgtdev (devid %llu) is missing, need to run 'btrfs dev scan'?",
BTRFS_DEV_REPLACE_DEVID);
}
if (dev_replace->tgtdev) {
if (dev_replace->srcdev) {
dev_replace->tgtdev->total_bytes =
dev_replace->srcdev->total_bytes;
dev_replace->tgtdev->disk_total_bytes =
dev_replace->srcdev->disk_total_bytes;
dev_replace->tgtdev->commit_total_bytes =
dev_replace->srcdev->commit_total_bytes;
dev_replace->tgtdev->bytes_used =
dev_replace->srcdev->bytes_used;
dev_replace->tgtdev->commit_bytes_used =
dev_replace->srcdev->commit_bytes_used;
}
set_bit(BTRFS_DEV_STATE_REPLACE_TGT,
&dev_replace->tgtdev->dev_state);
WARN_ON(fs_info->fs_devices->rw_devices == 0);
dev_replace->tgtdev->io_width = fs_info->sectorsize;
dev_replace->tgtdev->io_align = fs_info->sectorsize;
dev_replace->tgtdev->sector_size = fs_info->sectorsize;
dev_replace->tgtdev->fs_info = fs_info;
set_bit(BTRFS_DEV_STATE_IN_FS_METADATA,
&dev_replace->tgtdev->dev_state);
}
break;
}
out:
btrfs_free_path(path);
return ret;
} | 729 | True | 1 |
|
CVE-2019-18885 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/bobfuzzer/CVE-2019-18885', 'name': 'https://github.com/bobfuzzer/CVE-2019-18885', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-1/', 'name': 'USN-4254-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-2/', 'name': 'USN-4254-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'name': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'refsource': 'MISC', 'tags': []}, {'url': 'https://usn.ubuntu.com/4258-1/', 'name': 'USN-4258-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-1/', 'name': 'USN-4287-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-2/', 'name': 'USN-4287-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/08/msg00019.html', 'name': '[debian-lts-announce] 20200812 [SECURITY] [DLA 2323-1] linux-4.19 new package', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'name': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'fs/btrfs/volumes.c in the Linux kernel before 5.1 allows a btrfs_verify_dev_extents NULL pointer dereference via a crafted btrfs image because fs_devices->devices is mishandled within find_device, aka CID-09ba3bc9dd15.'}] | 2021-06-14T18:15Z | 2019-11-14T14:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Anand Jain | 2019-01-19 14:48:55+08:00 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]> | 09ba3bc9dd150457c506e4661380a6183af651c1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | btrfs_ioctl_dev_info | btrfs_ioctl_dev_info( struct btrfs_fs_info * fs_info , void __user * arg) | ['fs_info', 'arg'] | static long btrfs_ioctl_dev_info(struct btrfs_fs_info *fs_info,
void __user *arg)
{
struct btrfs_ioctl_dev_info_args *di_args;
struct btrfs_device *dev;
int ret = 0;
char *s_uuid = NULL;
di_args = memdup_user(arg, sizeof(*di_args));
if (IS_ERR(di_args))
return PTR_ERR(di_args);
if (!btrfs_is_empty_uuid(di_args->uuid))
s_uuid = di_args->uuid;
rcu_read_lock();
dev = btrfs_find_device(fs_info->fs_devices, di_args->devid, s_uuid,
NULL);
if (!dev) {
ret = -ENODEV;
goto out;
}
di_args->devid = dev->devid;
di_args->bytes_used = btrfs_device_get_bytes_used(dev);
di_args->total_bytes = btrfs_device_get_total_bytes(dev);
memcpy(di_args->uuid, dev->uuid, sizeof(di_args->uuid));
if (dev->name) {
strncpy(di_args->path, rcu_str_deref(dev->name),
sizeof(di_args->path) - 1);
di_args->path[sizeof(di_args->path) - 1] = 0;
} else {
di_args->path[0] = '\0';
}
out:
rcu_read_unlock();
if (ret == 0 && copy_to_user(arg, di_args, sizeof(*di_args)))
ret = -EFAULT;
kfree(di_args);
return ret;
} | 254 | True | 1 |
|
CVE-2019-18885 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/bobfuzzer/CVE-2019-18885', 'name': 'https://github.com/bobfuzzer/CVE-2019-18885', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-1/', 'name': 'USN-4254-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-2/', 'name': 'USN-4254-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'name': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'refsource': 'MISC', 'tags': []}, {'url': 'https://usn.ubuntu.com/4258-1/', 'name': 'USN-4258-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-1/', 'name': 'USN-4287-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-2/', 'name': 'USN-4287-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/08/msg00019.html', 'name': '[debian-lts-announce] 20200812 [SECURITY] [DLA 2323-1] linux-4.19 new package', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'name': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'fs/btrfs/volumes.c in the Linux kernel before 5.1 allows a btrfs_verify_dev_extents NULL pointer dereference via a crafted btrfs image because fs_devices->devices is mishandled within find_device, aka CID-09ba3bc9dd15.'}] | 2021-06-14T18:15Z | 2019-11-14T14:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Anand Jain | 2019-01-19 14:48:55+08:00 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]> | 09ba3bc9dd150457c506e4661380a6183af651c1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | btrfs_ioctl_resize | btrfs_ioctl_resize( struct file * file , void __user * arg) | ['file', 'arg'] | static noinline int btrfs_ioctl_resize(struct file *file,
void __user *arg)
{
struct inode *inode = file_inode(file);
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
u64 new_size;
u64 old_size;
u64 devid = 1;
struct btrfs_root *root = BTRFS_I(inode)->root;
struct btrfs_ioctl_vol_args *vol_args;
struct btrfs_trans_handle *trans;
struct btrfs_device *device = NULL;
char *sizestr;
char *retptr;
char *devstr = NULL;
int ret = 0;
int mod = 0;
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
ret = mnt_want_write_file(file);
if (ret)
return ret;
if (test_and_set_bit(BTRFS_FS_EXCL_OP, &fs_info->flags)) {
mnt_drop_write_file(file);
return BTRFS_ERROR_DEV_EXCL_RUN_IN_PROGRESS;
}
vol_args = memdup_user(arg, sizeof(*vol_args));
if (IS_ERR(vol_args)) {
ret = PTR_ERR(vol_args);
goto out;
}
vol_args->name[BTRFS_PATH_NAME_MAX] = '\0';
sizestr = vol_args->name;
devstr = strchr(sizestr, ':');
if (devstr) {
sizestr = devstr + 1;
*devstr = '\0';
devstr = vol_args->name;
ret = kstrtoull(devstr, 10, &devid);
if (ret)
goto out_free;
if (!devid) {
ret = -EINVAL;
goto out_free;
}
btrfs_info(fs_info, "resizing devid %llu", devid);
}
device = btrfs_find_device(fs_info->fs_devices, devid, NULL, NULL);
if (!device) {
btrfs_info(fs_info, "resizer unable to find device %llu",
devid);
ret = -ENODEV;
goto out_free;
}
if (!test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state)) {
btrfs_info(fs_info,
"resizer unable to apply on readonly device %llu",
devid);
ret = -EPERM;
goto out_free;
}
if (!strcmp(sizestr, "max"))
new_size = device->bdev->bd_inode->i_size;
else {
if (sizestr[0] == '-') {
mod = -1;
sizestr++;
} else if (sizestr[0] == '+') {
mod = 1;
sizestr++;
}
new_size = memparse(sizestr, &retptr);
if (*retptr != '\0' || new_size == 0) {
ret = -EINVAL;
goto out_free;
}
}
if (test_bit(BTRFS_DEV_STATE_REPLACE_TGT, &device->dev_state)) {
ret = -EPERM;
goto out_free;
}
old_size = btrfs_device_get_total_bytes(device);
if (mod < 0) {
if (new_size > old_size) {
ret = -EINVAL;
goto out_free;
}
new_size = old_size - new_size;
} else if (mod > 0) {
if (new_size > ULLONG_MAX - old_size) {
ret = -ERANGE;
goto out_free;
}
new_size = old_size + new_size;
}
if (new_size < SZ_256M) {
ret = -EINVAL;
goto out_free;
}
if (new_size > device->bdev->bd_inode->i_size) {
ret = -EFBIG;
goto out_free;
}
new_size = round_down(new_size, fs_info->sectorsize);
btrfs_info_in_rcu(fs_info, "new size for %s is %llu",
rcu_str_deref(device->name), new_size);
if (new_size > old_size) {
trans = btrfs_start_transaction(root, 0);
if (IS_ERR(trans)) {
ret = PTR_ERR(trans);
goto out_free;
}
ret = btrfs_grow_device(trans, device, new_size);
btrfs_commit_transaction(trans);
} else if (new_size < old_size) {
ret = btrfs_shrink_device(device, new_size);
} /* equal, nothing need to do */
out_free:
kfree(vol_args);
out:
clear_bit(BTRFS_FS_EXCL_OP, &fs_info->flags);
mnt_drop_write_file(file);
return ret;
} | 687 | True | 1 |
|
CVE-2019-18885 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/bobfuzzer/CVE-2019-18885', 'name': 'https://github.com/bobfuzzer/CVE-2019-18885', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-1/', 'name': 'USN-4254-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-2/', 'name': 'USN-4254-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'name': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'refsource': 'MISC', 'tags': []}, {'url': 'https://usn.ubuntu.com/4258-1/', 'name': 'USN-4258-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-1/', 'name': 'USN-4287-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-2/', 'name': 'USN-4287-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/08/msg00019.html', 'name': '[debian-lts-announce] 20200812 [SECURITY] [DLA 2323-1] linux-4.19 new package', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'name': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'fs/btrfs/volumes.c in the Linux kernel before 5.1 allows a btrfs_verify_dev_extents NULL pointer dereference via a crafted btrfs image because fs_devices->devices is mishandled within find_device, aka CID-09ba3bc9dd15.'}] | 2021-06-14T18:15Z | 2019-11-14T14:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Anand Jain | 2019-01-19 14:48:55+08:00 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]> | 09ba3bc9dd150457c506e4661380a6183af651c1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | btrfs_scrub_dev | btrfs_scrub_dev( struct btrfs_fs_info * fs_info , u64 devid , u64 start , u64 end , struct btrfs_scrub_progress * progress , int readonly , int is_dev_replace) | ['fs_info', 'devid', 'start', 'end', 'progress', 'readonly', 'is_dev_replace'] | int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start,
u64 end, struct btrfs_scrub_progress *progress,
int readonly, int is_dev_replace)
{
struct scrub_ctx *sctx;
int ret;
struct btrfs_device *dev;
unsigned int nofs_flag;
if (btrfs_fs_closing(fs_info))
return -EINVAL;
if (fs_info->nodesize > BTRFS_STRIPE_LEN) {
/*
* in this case scrub is unable to calculate the checksum
* the way scrub is implemented. Do not handle this
* situation at all because it won't ever happen.
*/
btrfs_err(fs_info,
"scrub: size assumption nodesize <= BTRFS_STRIPE_LEN (%d <= %d) fails",
fs_info->nodesize,
BTRFS_STRIPE_LEN);
return -EINVAL;
}
if (fs_info->sectorsize != PAGE_SIZE) {
/* not supported for data w/o checksums */
btrfs_err_rl(fs_info,
"scrub: size assumption sectorsize != PAGE_SIZE (%d != %lu) fails",
fs_info->sectorsize, PAGE_SIZE);
return -EINVAL;
}
if (fs_info->nodesize >
PAGE_SIZE * SCRUB_MAX_PAGES_PER_BLOCK ||
fs_info->sectorsize > PAGE_SIZE * SCRUB_MAX_PAGES_PER_BLOCK) {
/*
* would exhaust the array bounds of pagev member in
* struct scrub_block
*/
btrfs_err(fs_info,
"scrub: size assumption nodesize and sectorsize <= SCRUB_MAX_PAGES_PER_BLOCK (%d <= %d && %d <= %d) fails",
fs_info->nodesize,
SCRUB_MAX_PAGES_PER_BLOCK,
fs_info->sectorsize,
SCRUB_MAX_PAGES_PER_BLOCK);
return -EINVAL;
}
/* Allocate outside of device_list_mutex */
sctx = scrub_setup_ctx(fs_info, is_dev_replace);
if (IS_ERR(sctx))
return PTR_ERR(sctx);
mutex_lock(&fs_info->fs_devices->device_list_mutex);
dev = btrfs_find_device(fs_info->fs_devices, devid, NULL, NULL);
if (!dev || (test_bit(BTRFS_DEV_STATE_MISSING, &dev->dev_state) &&
!is_dev_replace)) {
mutex_unlock(&fs_info->fs_devices->device_list_mutex);
ret = -ENODEV;
goto out_free_ctx;
}
if (!is_dev_replace && !readonly &&
!test_bit(BTRFS_DEV_STATE_WRITEABLE, &dev->dev_state)) {
mutex_unlock(&fs_info->fs_devices->device_list_mutex);
btrfs_err_in_rcu(fs_info, "scrub: device %s is not writable",
rcu_str_deref(dev->name));
ret = -EROFS;
goto out_free_ctx;
}
mutex_lock(&fs_info->scrub_lock);
if (!test_bit(BTRFS_DEV_STATE_IN_FS_METADATA, &dev->dev_state) ||
test_bit(BTRFS_DEV_STATE_REPLACE_TGT, &dev->dev_state)) {
mutex_unlock(&fs_info->scrub_lock);
mutex_unlock(&fs_info->fs_devices->device_list_mutex);
ret = -EIO;
goto out_free_ctx;
}
down_read(&fs_info->dev_replace.rwsem);
if (dev->scrub_ctx ||
(!is_dev_replace &&
btrfs_dev_replace_is_ongoing(&fs_info->dev_replace))) {
up_read(&fs_info->dev_replace.rwsem);
mutex_unlock(&fs_info->scrub_lock);
mutex_unlock(&fs_info->fs_devices->device_list_mutex);
ret = -EINPROGRESS;
goto out_free_ctx;
}
up_read(&fs_info->dev_replace.rwsem);
ret = scrub_workers_get(fs_info, is_dev_replace);
if (ret) {
mutex_unlock(&fs_info->scrub_lock);
mutex_unlock(&fs_info->fs_devices->device_list_mutex);
goto out_free_ctx;
}
sctx->readonly = readonly;
dev->scrub_ctx = sctx;
mutex_unlock(&fs_info->fs_devices->device_list_mutex);
/*
* checking @scrub_pause_req here, we can avoid
* race between committing transaction and scrubbing.
*/
__scrub_blocked_if_needed(fs_info);
atomic_inc(&fs_info->scrubs_running);
mutex_unlock(&fs_info->scrub_lock);
/*
* In order to avoid deadlock with reclaim when there is a transaction
* trying to pause scrub, make sure we use GFP_NOFS for all the
* allocations done at btrfs_scrub_pages() and scrub_pages_for_parity()
* invoked by our callees. The pausing request is done when the
* transaction commit starts, and it blocks the transaction until scrub
* is paused (done at specific points at scrub_stripe() or right above
* before incrementing fs_info->scrubs_running).
*/
nofs_flag = memalloc_nofs_save();
if (!is_dev_replace) {
/*
* by holding device list mutex, we can
* kick off writing super in log tree sync.
*/
mutex_lock(&fs_info->fs_devices->device_list_mutex);
ret = scrub_supers(sctx, dev);
mutex_unlock(&fs_info->fs_devices->device_list_mutex);
}
if (!ret)
ret = scrub_enumerate_chunks(sctx, dev, start, end);
memalloc_nofs_restore(nofs_flag);
wait_event(sctx->list_wait, atomic_read(&sctx->bios_in_flight) == 0);
atomic_dec(&fs_info->scrubs_running);
wake_up(&fs_info->scrub_pause_wait);
wait_event(sctx->list_wait, atomic_read(&sctx->workers_pending) == 0);
if (progress)
memcpy(progress, &sctx->stat, sizeof(*progress));
mutex_lock(&fs_info->scrub_lock);
dev->scrub_ctx = NULL;
scrub_workers_put(fs_info);
mutex_unlock(&fs_info->scrub_lock);
scrub_put_ctx(sctx);
return ret;
out_free_ctx:
scrub_free_ctx(sctx);
return ret;
} | 689 | True | 1 |
|
CVE-2019-18885 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/bobfuzzer/CVE-2019-18885', 'name': 'https://github.com/bobfuzzer/CVE-2019-18885', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-1/', 'name': 'USN-4254-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-2/', 'name': 'USN-4254-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'name': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'refsource': 'MISC', 'tags': []}, {'url': 'https://usn.ubuntu.com/4258-1/', 'name': 'USN-4258-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-1/', 'name': 'USN-4287-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-2/', 'name': 'USN-4287-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/08/msg00019.html', 'name': '[debian-lts-announce] 20200812 [SECURITY] [DLA 2323-1] linux-4.19 new package', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'name': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'fs/btrfs/volumes.c in the Linux kernel before 5.1 allows a btrfs_verify_dev_extents NULL pointer dereference via a crafted btrfs image because fs_devices->devices is mishandled within find_device, aka CID-09ba3bc9dd15.'}] | 2021-06-14T18:15Z | 2019-11-14T14:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Anand Jain | 2019-01-19 14:48:55+08:00 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]> | 09ba3bc9dd150457c506e4661380a6183af651c1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | btrfs_scrub_progress | btrfs_scrub_progress( struct btrfs_fs_info * fs_info , u64 devid , struct btrfs_scrub_progress * progress) | ['fs_info', 'devid', 'progress'] | int btrfs_scrub_progress(struct btrfs_fs_info *fs_info, u64 devid,
struct btrfs_scrub_progress *progress)
{
struct btrfs_device *dev;
struct scrub_ctx *sctx = NULL;
mutex_lock(&fs_info->fs_devices->device_list_mutex);
dev = btrfs_find_device(fs_info->fs_devices, devid, NULL, NULL);
if (dev)
sctx = dev->scrub_ctx;
if (sctx)
memcpy(progress, &sctx->stat, sizeof(*progress));
mutex_unlock(&fs_info->fs_devices->device_list_mutex);
return dev ? (sctx ? 0 : -ENOTCONN) : -ENODEV;
} | 109 | True | 1 |
|
CVE-2019-18885 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/bobfuzzer/CVE-2019-18885', 'name': 'https://github.com/bobfuzzer/CVE-2019-18885', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-1/', 'name': 'USN-4254-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-2/', 'name': 'USN-4254-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'name': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'refsource': 'MISC', 'tags': []}, {'url': 'https://usn.ubuntu.com/4258-1/', 'name': 'USN-4258-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-1/', 'name': 'USN-4287-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-2/', 'name': 'USN-4287-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/08/msg00019.html', 'name': '[debian-lts-announce] 20200812 [SECURITY] [DLA 2323-1] linux-4.19 new package', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'name': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'fs/btrfs/volumes.c in the Linux kernel before 5.1 allows a btrfs_verify_dev_extents NULL pointer dereference via a crafted btrfs image because fs_devices->devices is mishandled within find_device, aka CID-09ba3bc9dd15.'}] | 2021-06-14T18:15Z | 2019-11-14T14:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Anand Jain | 2019-01-19 14:48:55+08:00 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]> | 09ba3bc9dd150457c506e4661380a6183af651c1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | btrfs_find_device | btrfs_find_device( struct btrfs_fs_devices * fs_devices , u64 devid , u8 * uuid , u8 * fsid) | ['fs_devices', 'devid', 'uuid', 'fsid'] | struct btrfs_device *btrfs_find_device(struct btrfs_fs_devices *fs_devices,
u64 devid, u8 *uuid, u8 *fsid)
{
struct btrfs_device *device;
while (fs_devices) {
if (!fsid ||
!memcmp(fs_devices->metadata_uuid, fsid, BTRFS_FSID_SIZE)) {
device = find_device(fs_devices, devid, uuid);
if (device)
return device;
}
fs_devices = fs_devices->seed;
}
return NULL;
} | 77 | True | 1 |
|
CVE-2019-18885 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/bobfuzzer/CVE-2019-18885', 'name': 'https://github.com/bobfuzzer/CVE-2019-18885', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-1/', 'name': 'USN-4254-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-2/', 'name': 'USN-4254-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'name': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'refsource': 'MISC', 'tags': []}, {'url': 'https://usn.ubuntu.com/4258-1/', 'name': 'USN-4258-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-1/', 'name': 'USN-4287-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-2/', 'name': 'USN-4287-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/08/msg00019.html', 'name': '[debian-lts-announce] 20200812 [SECURITY] [DLA 2323-1] linux-4.19 new package', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'name': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'fs/btrfs/volumes.c in the Linux kernel before 5.1 allows a btrfs_verify_dev_extents NULL pointer dereference via a crafted btrfs image because fs_devices->devices is mishandled within find_device, aka CID-09ba3bc9dd15.'}] | 2021-06-14T18:15Z | 2019-11-14T14:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Anand Jain | 2019-01-19 14:48:55+08:00 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]> | 09ba3bc9dd150457c506e4661380a6183af651c1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | btrfs_find_device_by_devspec | btrfs_find_device_by_devspec( struct btrfs_fs_info * fs_info , u64 devid , const char * device_path) | ['fs_info', 'devid', 'device_path'] | struct btrfs_device *btrfs_find_device_by_devspec(
struct btrfs_fs_info *fs_info, u64 devid,
const char *device_path)
{
struct btrfs_device *device;
if (devid) {
device = btrfs_find_device(fs_info->fs_devices, devid, NULL,
NULL);
if (!device)
return ERR_PTR(-ENOENT);
return device;
}
if (!device_path || !device_path[0])
return ERR_PTR(-EINVAL);
if (strcmp(device_path, "missing") == 0) {
/* Find first missing device */
list_for_each_entry(device, &fs_info->fs_devices->devices,
dev_list) {
if (test_bit(BTRFS_DEV_STATE_IN_FS_METADATA,
&device->dev_state) && !device->bdev)
return device;
}
return ERR_PTR(-ENOENT);
}
return btrfs_find_device_by_path(fs_info, device_path);
} | 139 | True | 1 |
|
CVE-2019-18885 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/bobfuzzer/CVE-2019-18885', 'name': 'https://github.com/bobfuzzer/CVE-2019-18885', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-1/', 'name': 'USN-4254-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-2/', 'name': 'USN-4254-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'name': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'refsource': 'MISC', 'tags': []}, {'url': 'https://usn.ubuntu.com/4258-1/', 'name': 'USN-4258-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-1/', 'name': 'USN-4287-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-2/', 'name': 'USN-4287-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/08/msg00019.html', 'name': '[debian-lts-announce] 20200812 [SECURITY] [DLA 2323-1] linux-4.19 new package', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'name': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'fs/btrfs/volumes.c in the Linux kernel before 5.1 allows a btrfs_verify_dev_extents NULL pointer dereference via a crafted btrfs image because fs_devices->devices is mishandled within find_device, aka CID-09ba3bc9dd15.'}] | 2021-06-14T18:15Z | 2019-11-14T14:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Anand Jain | 2019-01-19 14:48:55+08:00 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]> | 09ba3bc9dd150457c506e4661380a6183af651c1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | btrfs_find_device_by_path | btrfs_find_device_by_path( struct btrfs_fs_info * fs_info , const char * device_path) | ['fs_info', 'device_path'] | static struct btrfs_device *btrfs_find_device_by_path(
struct btrfs_fs_info *fs_info, const char *device_path)
{
int ret = 0;
struct btrfs_super_block *disk_super;
u64 devid;
u8 *dev_uuid;
struct block_device *bdev;
struct buffer_head *bh;
struct btrfs_device *device;
ret = btrfs_get_bdev_and_sb(device_path, FMODE_READ,
fs_info->bdev_holder, 0, &bdev, &bh);
if (ret)
return ERR_PTR(ret);
disk_super = (struct btrfs_super_block *)bh->b_data;
devid = btrfs_stack_device_id(&disk_super->dev_item);
dev_uuid = disk_super->dev_item.uuid;
if (btrfs_fs_incompat(fs_info, METADATA_UUID))
device = btrfs_find_device(fs_info->fs_devices, devid, dev_uuid,
disk_super->metadata_uuid);
else
device = btrfs_find_device(fs_info->fs_devices, devid, dev_uuid,
disk_super->fsid);
brelse(bh);
if (!device)
device = ERR_PTR(-ENOENT);
blkdev_put(bdev, FMODE_READ);
return device;
} | 178 | True | 1 |
|
CVE-2019-18885 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/bobfuzzer/CVE-2019-18885', 'name': 'https://github.com/bobfuzzer/CVE-2019-18885', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-1/', 'name': 'USN-4254-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-2/', 'name': 'USN-4254-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'name': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'refsource': 'MISC', 'tags': []}, {'url': 'https://usn.ubuntu.com/4258-1/', 'name': 'USN-4258-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-1/', 'name': 'USN-4287-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-2/', 'name': 'USN-4287-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/08/msg00019.html', 'name': '[debian-lts-announce] 20200812 [SECURITY] [DLA 2323-1] linux-4.19 new package', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'name': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'fs/btrfs/volumes.c in the Linux kernel before 5.1 allows a btrfs_verify_dev_extents NULL pointer dereference via a crafted btrfs image because fs_devices->devices is mishandled within find_device, aka CID-09ba3bc9dd15.'}] | 2021-06-14T18:15Z | 2019-11-14T14:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Anand Jain | 2019-01-19 14:48:55+08:00 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]> | 09ba3bc9dd150457c506e4661380a6183af651c1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | btrfs_finish_sprout | btrfs_finish_sprout( struct btrfs_trans_handle * trans , struct btrfs_fs_info * fs_info) | ['trans', 'fs_info'] | static int btrfs_finish_sprout(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info)
{
struct btrfs_root *root = fs_info->chunk_root;
struct btrfs_path *path;
struct extent_buffer *leaf;
struct btrfs_dev_item *dev_item;
struct btrfs_device *device;
struct btrfs_key key;
u8 fs_uuid[BTRFS_FSID_SIZE];
u8 dev_uuid[BTRFS_UUID_SIZE];
u64 devid;
int ret;
path = btrfs_alloc_path();
if (!path)
return -ENOMEM;
key.objectid = BTRFS_DEV_ITEMS_OBJECTID;
key.offset = 0;
key.type = BTRFS_DEV_ITEM_KEY;
while (1) {
ret = btrfs_search_slot(trans, root, &key, path, 0, 1);
if (ret < 0)
goto error;
leaf = path->nodes[0];
next_slot:
if (path->slots[0] >= btrfs_header_nritems(leaf)) {
ret = btrfs_next_leaf(root, path);
if (ret > 0)
break;
if (ret < 0)
goto error;
leaf = path->nodes[0];
btrfs_item_key_to_cpu(leaf, &key, path->slots[0]);
btrfs_release_path(path);
continue;
}
btrfs_item_key_to_cpu(leaf, &key, path->slots[0]);
if (key.objectid != BTRFS_DEV_ITEMS_OBJECTID ||
key.type != BTRFS_DEV_ITEM_KEY)
break;
dev_item = btrfs_item_ptr(leaf, path->slots[0],
struct btrfs_dev_item);
devid = btrfs_device_id(leaf, dev_item);
read_extent_buffer(leaf, dev_uuid, btrfs_device_uuid(dev_item),
BTRFS_UUID_SIZE);
read_extent_buffer(leaf, fs_uuid, btrfs_device_fsid(dev_item),
BTRFS_FSID_SIZE);
device = btrfs_find_device(fs_info->fs_devices, devid, dev_uuid,
fs_uuid);
BUG_ON(!device); /* Logic error */
if (device->fs_devices->seeding) {
btrfs_set_device_generation(leaf, dev_item,
device->generation);
btrfs_mark_buffer_dirty(leaf);
}
path->slots[0]++;
goto next_slot;
}
ret = 0;
error:
btrfs_free_path(path);
return ret;
} | 372 | True | 1 |
|
CVE-2019-18885 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/bobfuzzer/CVE-2019-18885', 'name': 'https://github.com/bobfuzzer/CVE-2019-18885', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-1/', 'name': 'USN-4254-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-2/', 'name': 'USN-4254-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'name': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'refsource': 'MISC', 'tags': []}, {'url': 'https://usn.ubuntu.com/4258-1/', 'name': 'USN-4258-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-1/', 'name': 'USN-4287-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-2/', 'name': 'USN-4287-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/08/msg00019.html', 'name': '[debian-lts-announce] 20200812 [SECURITY] [DLA 2323-1] linux-4.19 new package', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'name': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'fs/btrfs/volumes.c in the Linux kernel before 5.1 allows a btrfs_verify_dev_extents NULL pointer dereference via a crafted btrfs image because fs_devices->devices is mishandled within find_device, aka CID-09ba3bc9dd15.'}] | 2021-06-14T18:15Z | 2019-11-14T14:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Anand Jain | 2019-01-19 14:48:55+08:00 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]> | 09ba3bc9dd150457c506e4661380a6183af651c1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | btrfs_get_dev_stats | btrfs_get_dev_stats( struct btrfs_fs_info * fs_info , struct btrfs_ioctl_get_dev_stats * stats) | ['fs_info', 'stats'] | int btrfs_get_dev_stats(struct btrfs_fs_info *fs_info,
struct btrfs_ioctl_get_dev_stats *stats)
{
struct btrfs_device *dev;
struct btrfs_fs_devices *fs_devices = fs_info->fs_devices;
int i;
mutex_lock(&fs_devices->device_list_mutex);
dev = btrfs_find_device(fs_info->fs_devices, stats->devid, NULL, NULL);
mutex_unlock(&fs_devices->device_list_mutex);
if (!dev) {
btrfs_warn(fs_info, "get dev_stats failed, device not found");
return -ENODEV;
} else if (!dev->dev_stats_valid) {
btrfs_warn(fs_info, "get dev_stats failed, not yet valid");
return -ENODEV;
} else if (stats->flags & BTRFS_DEV_STATS_RESET) {
for (i = 0; i < BTRFS_DEV_STAT_VALUES_MAX; i++) {
if (stats->nr_items > i)
stats->values[i] =
btrfs_dev_stat_read_and_reset(dev, i);
else
btrfs_dev_stat_reset(dev, i);
}
} else {
for (i = 0; i < BTRFS_DEV_STAT_VALUES_MAX; i++)
if (stats->nr_items > i)
stats->values[i] = btrfs_dev_stat_read(dev, i);
}
if (stats->nr_items > BTRFS_DEV_STAT_VALUES_MAX)
stats->nr_items = BTRFS_DEV_STAT_VALUES_MAX;
return 0;
} | 214 | True | 1 |
|
CVE-2019-18885 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/bobfuzzer/CVE-2019-18885', 'name': 'https://github.com/bobfuzzer/CVE-2019-18885', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-1/', 'name': 'USN-4254-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-2/', 'name': 'USN-4254-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'name': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'refsource': 'MISC', 'tags': []}, {'url': 'https://usn.ubuntu.com/4258-1/', 'name': 'USN-4258-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-1/', 'name': 'USN-4287-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-2/', 'name': 'USN-4287-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/08/msg00019.html', 'name': '[debian-lts-announce] 20200812 [SECURITY] [DLA 2323-1] linux-4.19 new package', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'name': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'fs/btrfs/volumes.c in the Linux kernel before 5.1 allows a btrfs_verify_dev_extents NULL pointer dereference via a crafted btrfs image because fs_devices->devices is mishandled within find_device, aka CID-09ba3bc9dd15.'}] | 2021-06-14T18:15Z | 2019-11-14T14:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Anand Jain | 2019-01-19 14:48:55+08:00 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]> | 09ba3bc9dd150457c506e4661380a6183af651c1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | device_list_add | device_list_add( const char * path , struct btrfs_super_block * disk_super , bool * new_device_added) | ['path', 'disk_super', 'new_device_added'] | static noinline struct btrfs_device *device_list_add(const char *path,
struct btrfs_super_block *disk_super,
bool *new_device_added)
{
struct btrfs_device *device;
struct btrfs_fs_devices *fs_devices = NULL;
struct rcu_string *name;
u64 found_transid = btrfs_super_generation(disk_super);
u64 devid = btrfs_stack_device_id(&disk_super->dev_item);
bool has_metadata_uuid = (btrfs_super_incompat_flags(disk_super) &
BTRFS_FEATURE_INCOMPAT_METADATA_UUID);
bool fsid_change_in_progress = (btrfs_super_flags(disk_super) &
BTRFS_SUPER_FLAG_CHANGING_FSID_V2);
if (fsid_change_in_progress) {
if (!has_metadata_uuid) {
/*
* When we have an image which has CHANGING_FSID_V2 set
* it might belong to either a filesystem which has
* disks with completed fsid change or it might belong
* to fs with no UUID changes in effect, handle both.
*/
fs_devices = find_fsid_inprogress(disk_super);
if (!fs_devices)
fs_devices = find_fsid(disk_super->fsid, NULL);
} else {
fs_devices = find_fsid_changed(disk_super);
}
} else if (has_metadata_uuid) {
fs_devices = find_fsid(disk_super->fsid,
disk_super->metadata_uuid);
} else {
fs_devices = find_fsid(disk_super->fsid, NULL);
}
if (!fs_devices) {
if (has_metadata_uuid)
fs_devices = alloc_fs_devices(disk_super->fsid,
disk_super->metadata_uuid);
else
fs_devices = alloc_fs_devices(disk_super->fsid, NULL);
if (IS_ERR(fs_devices))
return ERR_CAST(fs_devices);
fs_devices->fsid_change = fsid_change_in_progress;
mutex_lock(&fs_devices->device_list_mutex);
list_add(&fs_devices->fs_list, &fs_uuids);
device = NULL;
} else {
mutex_lock(&fs_devices->device_list_mutex);
device = find_device(fs_devices, devid,
disk_super->dev_item.uuid);
/*
* If this disk has been pulled into an fs devices created by
* a device which had the CHANGING_FSID_V2 flag then replace the
* metadata_uuid/fsid values of the fs_devices.
*/
if (has_metadata_uuid && fs_devices->fsid_change &&
found_transid > fs_devices->latest_generation) {
memcpy(fs_devices->fsid, disk_super->fsid,
BTRFS_FSID_SIZE);
memcpy(fs_devices->metadata_uuid,
disk_super->metadata_uuid, BTRFS_FSID_SIZE);
fs_devices->fsid_change = false;
}
}
if (!device) {
if (fs_devices->opened) {
mutex_unlock(&fs_devices->device_list_mutex);
return ERR_PTR(-EBUSY);
}
device = btrfs_alloc_device(NULL, &devid,
disk_super->dev_item.uuid);
if (IS_ERR(device)) {
mutex_unlock(&fs_devices->device_list_mutex);
/* we can safely leave the fs_devices entry around */
return device;
}
name = rcu_string_strdup(path, GFP_NOFS);
if (!name) {
btrfs_free_device(device);
mutex_unlock(&fs_devices->device_list_mutex);
return ERR_PTR(-ENOMEM);
}
rcu_assign_pointer(device->name, name);
list_add_rcu(&device->dev_list, &fs_devices->devices);
fs_devices->num_devices++;
device->fs_devices = fs_devices;
*new_device_added = true;
if (disk_super->label[0])
pr_info("BTRFS: device label %s devid %llu transid %llu %s\n",
disk_super->label, devid, found_transid, path);
else
pr_info("BTRFS: device fsid %pU devid %llu transid %llu %s\n",
disk_super->fsid, devid, found_transid, path);
} else if (!device->name || strcmp(device->name->str, path)) {
/*
* When FS is already mounted.
* 1. If you are here and if the device->name is NULL that
* means this device was missing at time of FS mount.
* 2. If you are here and if the device->name is different
* from 'path' that means either
* a. The same device disappeared and reappeared with
* different name. or
* b. The missing-disk-which-was-replaced, has
* reappeared now.
*
* We must allow 1 and 2a above. But 2b would be a spurious
* and unintentional.
*
* Further in case of 1 and 2a above, the disk at 'path'
* would have missed some transaction when it was away and
* in case of 2a the stale bdev has to be updated as well.
* 2b must not be allowed at all time.
*/
/*
* For now, we do allow update to btrfs_fs_device through the
* btrfs dev scan cli after FS has been mounted. We're still
* tracking a problem where systems fail mount by subvolume id
* when we reject replacement on a mounted FS.
*/
if (!fs_devices->opened && found_transid < device->generation) {
/*
* That is if the FS is _not_ mounted and if you
* are here, that means there is more than one
* disk with same uuid and devid.We keep the one
* with larger generation number or the last-in if
* generation are equal.
*/
mutex_unlock(&fs_devices->device_list_mutex);
return ERR_PTR(-EEXIST);
}
/*
* We are going to replace the device path for a given devid,
* make sure it's the same device if the device is mounted
*/
if (device->bdev) {
struct block_device *path_bdev;
path_bdev = lookup_bdev(path);
if (IS_ERR(path_bdev)) {
mutex_unlock(&fs_devices->device_list_mutex);
return ERR_CAST(path_bdev);
}
if (device->bdev != path_bdev) {
bdput(path_bdev);
mutex_unlock(&fs_devices->device_list_mutex);
btrfs_warn_in_rcu(device->fs_info,
"duplicate device fsid:devid for %pU:%llu old:%s new:%s",
disk_super->fsid, devid,
rcu_str_deref(device->name), path);
return ERR_PTR(-EEXIST);
}
bdput(path_bdev);
btrfs_info_in_rcu(device->fs_info,
"device fsid %pU devid %llu moved old:%s new:%s",
disk_super->fsid, devid,
rcu_str_deref(device->name), path);
}
name = rcu_string_strdup(path, GFP_NOFS);
if (!name) {
mutex_unlock(&fs_devices->device_list_mutex);
return ERR_PTR(-ENOMEM);
}
rcu_string_free(device->name);
rcu_assign_pointer(device->name, name);
if (test_bit(BTRFS_DEV_STATE_MISSING, &device->dev_state)) {
fs_devices->missing_devices--;
clear_bit(BTRFS_DEV_STATE_MISSING, &device->dev_state);
}
}
/*
* Unmount does not free the btrfs_device struct but would zero
* generation along with most of the other members. So just update
* it back. We need it to pick the disk with largest generation
* (as above).
*/
if (!fs_devices->opened) {
device->generation = found_transid;
fs_devices->latest_generation = max_t(u64, found_transid,
fs_devices->latest_generation);
}
fs_devices->total_devices = btrfs_super_num_devices(disk_super);
mutex_unlock(&fs_devices->device_list_mutex);
return device;
} | 793 | True | 1 |
|
CVE-2019-18885 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/bobfuzzer/CVE-2019-18885', 'name': 'https://github.com/bobfuzzer/CVE-2019-18885', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-1/', 'name': 'USN-4254-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-2/', 'name': 'USN-4254-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'name': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'refsource': 'MISC', 'tags': []}, {'url': 'https://usn.ubuntu.com/4258-1/', 'name': 'USN-4258-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-1/', 'name': 'USN-4287-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-2/', 'name': 'USN-4287-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/08/msg00019.html', 'name': '[debian-lts-announce] 20200812 [SECURITY] [DLA 2323-1] linux-4.19 new package', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'name': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'fs/btrfs/volumes.c in the Linux kernel before 5.1 allows a btrfs_verify_dev_extents NULL pointer dereference via a crafted btrfs image because fs_devices->devices is mishandled within find_device, aka CID-09ba3bc9dd15.'}] | 2021-06-14T18:15Z | 2019-11-14T14:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Anand Jain | 2019-01-19 14:48:55+08:00 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]> | 09ba3bc9dd150457c506e4661380a6183af651c1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | find_device | find_device( struct btrfs_fs_devices * fs_devices , u64 devid , const u8 * uuid) | ['fs_devices', 'devid', 'uuid'] | static struct btrfs_device *find_device(struct btrfs_fs_devices *fs_devices,
u64 devid, const u8 *uuid)
{
struct btrfs_device *dev;
list_for_each_entry(dev, &fs_devices->devices, dev_list) {
if (dev->devid == devid &&
(!uuid || !memcmp(dev->uuid, uuid, BTRFS_UUID_SIZE))) {
return dev;
}
}
return NULL;
} | 68 | True | 1 |
|
CVE-2019-18885 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/bobfuzzer/CVE-2019-18885', 'name': 'https://github.com/bobfuzzer/CVE-2019-18885', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-1/', 'name': 'USN-4254-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-2/', 'name': 'USN-4254-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'name': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'refsource': 'MISC', 'tags': []}, {'url': 'https://usn.ubuntu.com/4258-1/', 'name': 'USN-4258-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-1/', 'name': 'USN-4287-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-2/', 'name': 'USN-4287-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/08/msg00019.html', 'name': '[debian-lts-announce] 20200812 [SECURITY] [DLA 2323-1] linux-4.19 new package', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'name': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'fs/btrfs/volumes.c in the Linux kernel before 5.1 allows a btrfs_verify_dev_extents NULL pointer dereference via a crafted btrfs image because fs_devices->devices is mishandled within find_device, aka CID-09ba3bc9dd15.'}] | 2021-06-14T18:15Z | 2019-11-14T14:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Anand Jain | 2019-01-19 14:48:55+08:00 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]> | 09ba3bc9dd150457c506e4661380a6183af651c1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | read_one_chunk | read_one_chunk( struct btrfs_fs_info * fs_info , struct btrfs_key * key , struct extent_buffer * leaf , struct btrfs_chunk * chunk) | ['fs_info', 'key', 'leaf', 'chunk'] | static int read_one_chunk(struct btrfs_fs_info *fs_info, struct btrfs_key *key,
struct extent_buffer *leaf,
struct btrfs_chunk *chunk)
{
struct btrfs_mapping_tree *map_tree = &fs_info->mapping_tree;
struct map_lookup *map;
struct extent_map *em;
u64 logical;
u64 length;
u64 devid;
u8 uuid[BTRFS_UUID_SIZE];
int num_stripes;
int ret;
int i;
logical = key->offset;
length = btrfs_chunk_length(leaf, chunk);
num_stripes = btrfs_chunk_num_stripes(leaf, chunk);
ret = btrfs_check_chunk_valid(fs_info, leaf, chunk, logical);
if (ret)
return ret;
read_lock(&map_tree->map_tree.lock);
em = lookup_extent_mapping(&map_tree->map_tree, logical, 1);
read_unlock(&map_tree->map_tree.lock);
/* already mapped? */
if (em && em->start <= logical && em->start + em->len > logical) {
free_extent_map(em);
return 0;
} else if (em) {
free_extent_map(em);
}
em = alloc_extent_map();
if (!em)
return -ENOMEM;
map = kmalloc(map_lookup_size(num_stripes), GFP_NOFS);
if (!map) {
free_extent_map(em);
return -ENOMEM;
}
set_bit(EXTENT_FLAG_FS_MAPPING, &em->flags);
em->map_lookup = map;
em->start = logical;
em->len = length;
em->orig_start = 0;
em->block_start = 0;
em->block_len = em->len;
map->num_stripes = num_stripes;
map->io_width = btrfs_chunk_io_width(leaf, chunk);
map->io_align = btrfs_chunk_io_align(leaf, chunk);
map->stripe_len = btrfs_chunk_stripe_len(leaf, chunk);
map->type = btrfs_chunk_type(leaf, chunk);
map->sub_stripes = btrfs_chunk_sub_stripes(leaf, chunk);
map->verified_stripes = 0;
for (i = 0; i < num_stripes; i++) {
map->stripes[i].physical =
btrfs_stripe_offset_nr(leaf, chunk, i);
devid = btrfs_stripe_devid_nr(leaf, chunk, i);
read_extent_buffer(leaf, uuid, (unsigned long)
btrfs_stripe_dev_uuid_nr(chunk, i),
BTRFS_UUID_SIZE);
map->stripes[i].dev = btrfs_find_device(fs_info->fs_devices,
devid, uuid, NULL);
if (!map->stripes[i].dev &&
!btrfs_test_opt(fs_info, DEGRADED)) {
free_extent_map(em);
btrfs_report_missing_device(fs_info, devid, uuid, true);
return -ENOENT;
}
if (!map->stripes[i].dev) {
map->stripes[i].dev =
add_missing_dev(fs_info->fs_devices, devid,
uuid);
if (IS_ERR(map->stripes[i].dev)) {
free_extent_map(em);
btrfs_err(fs_info,
"failed to init missing dev %llu: %ld",
devid, PTR_ERR(map->stripes[i].dev));
return PTR_ERR(map->stripes[i].dev);
}
btrfs_report_missing_device(fs_info, devid, uuid, false);
}
set_bit(BTRFS_DEV_STATE_IN_FS_METADATA,
&(map->stripes[i].dev->dev_state));
}
write_lock(&map_tree->map_tree.lock);
ret = add_extent_mapping(&map_tree->map_tree, em, 0);
write_unlock(&map_tree->map_tree.lock);
if (ret < 0) {
btrfs_err(fs_info,
"failed to add chunk map, start=%llu len=%llu: %d",
em->start, em->len, ret);
}
free_extent_map(em);
return ret;
} | 660 | True | 1 |
|
CVE-2019-18885 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/bobfuzzer/CVE-2019-18885', 'name': 'https://github.com/bobfuzzer/CVE-2019-18885', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-1/', 'name': 'USN-4254-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-2/', 'name': 'USN-4254-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'name': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'refsource': 'MISC', 'tags': []}, {'url': 'https://usn.ubuntu.com/4258-1/', 'name': 'USN-4258-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-1/', 'name': 'USN-4287-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-2/', 'name': 'USN-4287-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/08/msg00019.html', 'name': '[debian-lts-announce] 20200812 [SECURITY] [DLA 2323-1] linux-4.19 new package', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'name': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'fs/btrfs/volumes.c in the Linux kernel before 5.1 allows a btrfs_verify_dev_extents NULL pointer dereference via a crafted btrfs image because fs_devices->devices is mishandled within find_device, aka CID-09ba3bc9dd15.'}] | 2021-06-14T18:15Z | 2019-11-14T14:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Anand Jain | 2019-01-19 14:48:55+08:00 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]> | 09ba3bc9dd150457c506e4661380a6183af651c1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | read_one_dev | read_one_dev( struct btrfs_fs_info * fs_info , struct extent_buffer * leaf , struct btrfs_dev_item * dev_item) | ['fs_info', 'leaf', 'dev_item'] | static int read_one_dev(struct btrfs_fs_info *fs_info,
struct extent_buffer *leaf,
struct btrfs_dev_item *dev_item)
{
struct btrfs_fs_devices *fs_devices = fs_info->fs_devices;
struct btrfs_device *device;
u64 devid;
int ret;
u8 fs_uuid[BTRFS_FSID_SIZE];
u8 dev_uuid[BTRFS_UUID_SIZE];
devid = btrfs_device_id(leaf, dev_item);
read_extent_buffer(leaf, dev_uuid, btrfs_device_uuid(dev_item),
BTRFS_UUID_SIZE);
read_extent_buffer(leaf, fs_uuid, btrfs_device_fsid(dev_item),
BTRFS_FSID_SIZE);
if (memcmp(fs_uuid, fs_devices->metadata_uuid, BTRFS_FSID_SIZE)) {
fs_devices = open_seed_devices(fs_info, fs_uuid);
if (IS_ERR(fs_devices))
return PTR_ERR(fs_devices);
}
device = btrfs_find_device(fs_info->fs_devices, devid, dev_uuid,
fs_uuid);
if (!device) {
if (!btrfs_test_opt(fs_info, DEGRADED)) {
btrfs_report_missing_device(fs_info, devid,
dev_uuid, true);
return -ENOENT;
}
device = add_missing_dev(fs_devices, devid, dev_uuid);
if (IS_ERR(device)) {
btrfs_err(fs_info,
"failed to add missing dev %llu: %ld",
devid, PTR_ERR(device));
return PTR_ERR(device);
}
btrfs_report_missing_device(fs_info, devid, dev_uuid, false);
} else {
if (!device->bdev) {
if (!btrfs_test_opt(fs_info, DEGRADED)) {
btrfs_report_missing_device(fs_info,
devid, dev_uuid, true);
return -ENOENT;
}
btrfs_report_missing_device(fs_info, devid,
dev_uuid, false);
}
if (!device->bdev &&
!test_bit(BTRFS_DEV_STATE_MISSING, &device->dev_state)) {
/*
* this happens when a device that was properly setup
* in the device info lists suddenly goes bad.
* device->bdev is NULL, and so we have to set
* device->missing to one here
*/
device->fs_devices->missing_devices++;
set_bit(BTRFS_DEV_STATE_MISSING, &device->dev_state);
}
/* Move the device to its own fs_devices */
if (device->fs_devices != fs_devices) {
ASSERT(test_bit(BTRFS_DEV_STATE_MISSING,
&device->dev_state));
list_move(&device->dev_list, &fs_devices->devices);
device->fs_devices->num_devices--;
fs_devices->num_devices++;
device->fs_devices->missing_devices--;
fs_devices->missing_devices++;
device->fs_devices = fs_devices;
}
}
if (device->fs_devices != fs_info->fs_devices) {
BUG_ON(test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state));
if (device->generation !=
btrfs_device_generation(leaf, dev_item))
return -EINVAL;
}
fill_device_from_item(leaf, dev_item, device);
set_bit(BTRFS_DEV_STATE_IN_FS_METADATA, &device->dev_state);
if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state) &&
!test_bit(BTRFS_DEV_STATE_REPLACE_TGT, &device->dev_state)) {
device->fs_devices->total_rw_bytes += device->total_bytes;
atomic64_add(device->total_bytes - device->bytes_used,
&fs_info->free_chunk_space);
}
ret = 0;
return ret;
} | 497 | True | 1 |
|
CVE-2019-18885 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:P | LOCAL | LOW | NONE | NONE | NONE | PARTIAL | 2.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/bobfuzzer/CVE-2019-18885', 'name': 'https://github.com/bobfuzzer/CVE-2019-18885', 'refsource': 'MISC', 'tags': ['Exploit', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'name': 'https://github.com/torvalds/linux/commit/09ba3bc9dd150457c506e4661380a6183af651c1', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20191205-0001/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-1/', 'name': 'USN-4254-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4254-2/', 'name': 'USN-4254-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'name': 'http://packetstormsecurity.com/files/156185/Kernel-Live-Patch-Security-Notice-LSN-0062-1.html', 'refsource': 'MISC', 'tags': []}, {'url': 'https://usn.ubuntu.com/4258-1/', 'name': 'USN-4258-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-1/', 'name': 'USN-4287-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4287-2/', 'name': 'USN-4287-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/08/msg00019.html', 'name': '[debian-lts-announce] 20200812 [SECURITY] [DLA 2323-1] linux-4.19 new package', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'name': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'fs/btrfs/volumes.c in the Linux kernel before 5.1 allows a btrfs_verify_dev_extents NULL pointer dereference via a crafted btrfs image because fs_devices->devices is mishandled within find_device, aka CID-09ba3bc9dd15.'}] | 2021-06-14T18:15Z | 2019-11-14T14:15Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Anand Jain | 2019-01-19 14:48:55+08:00 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]> | 09ba3bc9dd150457c506e4661380a6183af651c1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | verify_one_dev_extent | verify_one_dev_extent( struct btrfs_fs_info * fs_info , u64 chunk_offset , u64 devid , u64 physical_offset , u64 physical_len) | ['fs_info', 'chunk_offset', 'devid', 'physical_offset', 'physical_len'] | static int verify_one_dev_extent(struct btrfs_fs_info *fs_info,
u64 chunk_offset, u64 devid,
u64 physical_offset, u64 physical_len)
{
struct extent_map_tree *em_tree = &fs_info->mapping_tree.map_tree;
struct extent_map *em;
struct map_lookup *map;
struct btrfs_device *dev;
u64 stripe_len;
bool found = false;
int ret = 0;
int i;
read_lock(&em_tree->lock);
em = lookup_extent_mapping(em_tree, chunk_offset, 1);
read_unlock(&em_tree->lock);
if (!em) {
btrfs_err(fs_info,
"dev extent physical offset %llu on devid %llu doesn't have corresponding chunk",
physical_offset, devid);
ret = -EUCLEAN;
goto out;
}
map = em->map_lookup;
stripe_len = calc_stripe_length(map->type, em->len, map->num_stripes);
if (physical_len != stripe_len) {
btrfs_err(fs_info,
"dev extent physical offset %llu on devid %llu length doesn't match chunk %llu, have %llu expect %llu",
physical_offset, devid, em->start, physical_len,
stripe_len);
ret = -EUCLEAN;
goto out;
}
for (i = 0; i < map->num_stripes; i++) {
if (map->stripes[i].dev->devid == devid &&
map->stripes[i].physical == physical_offset) {
found = true;
if (map->verified_stripes >= map->num_stripes) {
btrfs_err(fs_info,
"too many dev extents for chunk %llu found",
em->start);
ret = -EUCLEAN;
goto out;
}
map->verified_stripes++;
break;
}
}
if (!found) {
btrfs_err(fs_info,
"dev extent physical offset %llu devid %llu has no corresponding chunk",
physical_offset, devid);
ret = -EUCLEAN;
}
/* Make sure no dev extent is beyond device bondary */
dev = btrfs_find_device(fs_info->fs_devices, devid, NULL, NULL);
if (!dev) {
btrfs_err(fs_info, "failed to find devid %llu", devid);
ret = -EUCLEAN;
goto out;
}
/* It's possible this device is a dummy for seed device */
if (dev->disk_total_bytes == 0) {
dev = find_device(fs_info->fs_devices->seed, devid, NULL);
if (!dev) {
btrfs_err(fs_info, "failed to find seed devid %llu",
devid);
ret = -EUCLEAN;
goto out;
}
}
if (physical_offset + physical_len > dev->disk_total_bytes) {
btrfs_err(fs_info,
"dev extent devid %llu physical offset %llu len %llu is beyond device boundary %llu",
devid, physical_offset, physical_len,
dev->disk_total_bytes);
ret = -EUCLEAN;
goto out;
}
out:
free_extent_map(em);
return ret;
} | 420 | True | 1 |
|
CVE-2019-15917 | False | False | False | False | AV:L/AC:M/Au:N/C:C/I:C/A:C | LOCAL | MEDIUM | NONE | COMPLETE | COMPLETE | COMPLETE | 6.9 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H | LOCAL | HIGH | LOW | NONE | UNCHANGED | HIGH | HIGH | HIGH | 7.0 | HIGH | 1.0 | 5.9 | False | [{'url': 'https://github.com/torvalds/linux/commit/56897b217a1d0a91c9920cb418d6b3fe922f590a', 'name': 'https://github.com/torvalds/linux/commit/56897b217a1d0a91c9920cb418d6b3fe922f590a', 'refsource': 'MISC', 'tags': ['Patch']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.0.5', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.0.5', 'refsource': 'MISC', 'tags': ['Release Notes']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00064.html', 'name': 'openSUSE-SU-2019:2173', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00066.html', 'name': 'openSUSE-SU-2019:2181', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/09/msg00025.html', 'name': '[debian-lts-announce] 20190925 [SECURITY] [DLA 1930-1] linux security update', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20191004-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20191004-0001/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://seclists.org/bugtraq/2020/Jan/10', 'name': '20200109 [slackware-security] Slackware 14.2 kernel (SSA:2020-008-01)', 'refsource': 'BUGTRAQ', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://packetstormsecurity.com/files/155890/Slackware-Security-Advisory-Slackware-14.2-kernel-Updates.html', 'name': 'http://packetstormsecurity.com/files/155890/Slackware-Security-Advisory-Slackware-14.2-kernel-Updates.html', 'refsource': 'MISC', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://lists.debian.org/debian-lts-announce/2020/03/msg00001.html', 'name': '[debian-lts-announce] 20200302 [SECURITY] [DLA 2114-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-416'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.0.5', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:15.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:15.1:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel before 5.0.5. There is a use-after-free issue when hci_uart_register_dev() fails in hci_uart_set_proto() in drivers/bluetooth/hci_ldisc.c.'}] | 2020-03-09T14:29Z | 2019-09-04T19:15Z | Use After Free | Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. |
The use of previously-freed memory can have any number of adverse consequences, ranging from the corruption of valid data to the execution of arbitrary code, depending on the instantiation and timing of the flaw. The simplest way data corruption may occur involves the system's reuse of the freed memory. Use-after-free errors have two common and sometimes overlapping causes:
Error conditions and other exceptional circumstances.
Confusion over which part of the program is responsible for freeing the memory.
In this scenario, the memory in question is allocated to another pointer validly at some point after it has been freed. The original pointer to the freed memory is used again and points to somewhere within the new allocation. As the data is changed, it corrupts the validly used memory; this induces undefined behavior in the process.
If the newly allocated data chances to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.
| https://cwe.mitre.org/data/definitions/416.html | 0 | Kefeng Wang | 2019-02-23 12:33:27+08:00 | Bluetooth: hci_ldisc: Postpone HCI_UART_PROTO_READY bit set in hci_uart_set_proto()
task A: task B:
hci_uart_set_proto flush_to_ldisc
- p->open(hu) -> h5_open //alloc h5 - receive_buf
- set_bit HCI_UART_PROTO_READY - tty_port_default_receive_buf
- hci_uart_register_dev - tty_ldisc_receive_buf
- hci_uart_tty_receive
- test_bit HCI_UART_PROTO_READY
- h5_recv
- clear_bit HCI_UART_PROTO_READY while() {
- p->open(hu) -> h5_close //free h5
- h5_rx_3wire_hdr
- h5_reset() //use-after-free
}
It could use ioctl to set hci uart proto, but there is
a use-after-free issue when hci_uart_register_dev() fail in
hci_uart_set_proto(), see stack above, fix this by setting
HCI_UART_PROTO_READY bit only when hci_uart_register_dev()
return success.
Reported-by: [email protected]
Signed-off-by: Kefeng Wang <[email protected]>
Reviewed-by: Jeremy Cline <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]> | 56897b217a1d0a91c9920cb418d6b3fe922f590a | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | hci_uart_set_proto | hci_uart_set_proto( struct hci_uart * hu , int id) | ['hu', 'id'] | static int hci_uart_set_proto(struct hci_uart *hu, int id)
{
const struct hci_uart_proto *p;
int err;
p = hci_uart_get_proto(id);
if (!p)
return -EPROTONOSUPPORT;
hu->proto = p;
set_bit(HCI_UART_PROTO_READY, &hu->flags);
err = hci_uart_register_dev(hu);
if (err) {
clear_bit(HCI_UART_PROTO_READY, &hu->flags);
return err;
}
return 0;
} | 82 | True | 1 |
|
CVE-2019-12818 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:P | NETWORK | LOW | NONE | NONE | NONE | PARTIAL | 5.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.15', 'name': 'https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.15', 'refsource': 'MISC', 'tags': ['Mailing List', 'Release Notes', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/58bdd544e2933a21a51eecf17c3f5f94038261b5', 'name': 'https://github.com/torvalds/linux/commit/58bdd544e2933a21a51eecf17c3f5f94038261b5', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=58bdd544e2933a21a51eecf17c3f5f94038261b5', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=58bdd544e2933a21a51eecf17c3f5f94038261b5', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/108776', 'name': '108776', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00039.html', 'name': 'openSUSE-SU-2019:1570', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00040.html', 'name': 'openSUSE-SU-2019:1571', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00048.html', 'name': 'openSUSE-SU-2019:1579', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K91444306', 'name': 'https://support.f5.com/csp/article/K91444306', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://security.netapp.com/advisory/ntap-20190710-0002/', 'name': 'https://security.netapp.com/advisory/ntap-20190710-0002/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://usn.ubuntu.com/4094-1/', 'name': 'USN-4094-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://packetstormsecurity.com/files/154245/Kernel-Live-Patch-Security-Notice-LSN-0054-1.html', 'name': 'http://packetstormsecurity.com/files/154245/Kernel-Live-Patch-Security-Notice-LSN-0054-1.html', 'refsource': 'MISC', 'tags': []}, {'url': 'https://usn.ubuntu.com/4118-1/', 'name': 'USN-4118-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.20.15', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel before 4.20.15. The nfc_llcp_build_tlv function in net/nfc/llcp_commands.c may return NULL. If the caller does not check for this, it will trigger a NULL pointer dereference. This will cause denial of service. This affects nfc_llcp_build_gb in net/nfc/llcp_core.c.'}] | 2019-06-18T15:15Z | 2019-06-14T02:29Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | YueHaibing | 2019-02-22 15:37:58+08:00 | net: nfc: Fix NULL dereference on nfc_llcp_build_tlv fails
KASAN report this:
BUG: KASAN: null-ptr-deref in nfc_llcp_build_gb+0x37f/0x540 [nfc]
Read of size 3 at addr 0000000000000000 by task syz-executor.0/5401
CPU: 0 PID: 5401 Comm: syz-executor.0 Not tainted 5.0.0-rc7+ #45
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0xfa/0x1ce lib/dump_stack.c:113
kasan_report+0x171/0x18d mm/kasan/report.c:321
memcpy+0x1f/0x50 mm/kasan/common.c:130
nfc_llcp_build_gb+0x37f/0x540 [nfc]
nfc_llcp_register_device+0x6eb/0xb50 [nfc]
nfc_register_device+0x50/0x1d0 [nfc]
nfcsim_device_new+0x394/0x67d [nfcsim]
? 0xffffffffc1080000
nfcsim_init+0x6b/0x1000 [nfcsim]
do_one_initcall+0xfa/0x5ca init/main.c:887
do_init_module+0x204/0x5f6 kernel/module.c:3460
load_module+0x66b2/0x8570 kernel/module.c:3808
__do_sys_finit_module+0x238/0x2a0 kernel/module.c:3902
do_syscall_64+0x147/0x600 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x462e99
Code: f7 d8 64 89 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f9cb79dcc58 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
RAX: ffffffffffffffda RBX: 000000000073bf00 RCX: 0000000000462e99
RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000000000003
RBP: 00007f9cb79dcc70 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f9cb79dd6bc
R13: 00000000004bcefb R14: 00000000006f7030 R15: 0000000000000004
nfc_llcp_build_tlv will return NULL on fails, caller should check it,
otherwise will trigger a NULL dereference.
Reported-by: Hulk Robot <[email protected]>
Fixes: eda21f16a5ed ("NFC: Set MIU and RW values from CONNECT and CC LLCP frames")
Fixes: d646960f7986 ("NFC: Initial LLCP support")
Signed-off-by: YueHaibing <[email protected]>
Signed-off-by: David S. Miller <[email protected]> | 58bdd544e2933a21a51eecf17c3f5f94038261b5 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | nfc_llcp_build_gb | nfc_llcp_build_gb( struct nfc_llcp_local * local) | ['local'] | static int nfc_llcp_build_gb(struct nfc_llcp_local *local)
{
u8 *gb_cur, *version_tlv, version, version_length;
u8 *lto_tlv, lto_length;
u8 *wks_tlv, wks_length;
u8 *miux_tlv, miux_length;
__be16 wks = cpu_to_be16(local->local_wks);
u8 gb_len = 0;
int ret = 0;
version = LLCP_VERSION_11;
version_tlv = nfc_llcp_build_tlv(LLCP_TLV_VERSION, &version,
1, &version_length);
gb_len += version_length;
lto_tlv = nfc_llcp_build_tlv(LLCP_TLV_LTO, &local->lto, 1, <o_length);
gb_len += lto_length;
pr_debug("Local wks 0x%lx\n", local->local_wks);
wks_tlv = nfc_llcp_build_tlv(LLCP_TLV_WKS, (u8 *)&wks, 2, &wks_length);
gb_len += wks_length;
miux_tlv = nfc_llcp_build_tlv(LLCP_TLV_MIUX, (u8 *)&local->miux, 0,
&miux_length);
gb_len += miux_length;
gb_len += ARRAY_SIZE(llcp_magic);
if (gb_len > NFC_MAX_GT_LEN) {
ret = -EINVAL;
goto out;
}
gb_cur = local->gb;
memcpy(gb_cur, llcp_magic, ARRAY_SIZE(llcp_magic));
gb_cur += ARRAY_SIZE(llcp_magic);
memcpy(gb_cur, version_tlv, version_length);
gb_cur += version_length;
memcpy(gb_cur, lto_tlv, lto_length);
gb_cur += lto_length;
memcpy(gb_cur, wks_tlv, wks_length);
gb_cur += wks_length;
memcpy(gb_cur, miux_tlv, miux_length);
gb_cur += miux_length;
local->gb_len = gb_len;
out:
kfree(version_tlv);
kfree(lto_tlv);
kfree(wks_tlv);
kfree(miux_tlv);
return ret;
} | 290 | True | 1 |
|
CVE-2019-9213 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:C | LOCAL | LOW | NONE | NONE | NONE | COMPLETE | 4.9 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/torvalds/linux/commit/0a1d52994d440e21def1c2174932410b4f2a98a1', 'name': 'https://github.com/torvalds/linux/commit/0a1d52994d440e21def1c2174932410b4f2a98a1', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.162', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.162', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.14', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.20.14', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.27', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.27', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.14.105', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.14.105', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1792', 'name': 'https://bugs.chromium.org/p/project-zero/issues/detail?id=1792', 'refsource': 'MISC', 'tags': ['Exploit', 'Mailing List', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=0a1d52994d440e21def1c2174932410b4f2a98a1', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=0a1d52994d440e21def1c2174932410b4f2a98a1', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://www.exploit-db.com/exploits/46502/', 'name': '46502', 'refsource': 'EXPLOIT-DB', 'tags': ['Exploit', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/107296', 'name': '107296', 'refsource': 'BID', 'tags': ['VDB Entry', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/03/msg00034.html', 'name': '[debian-lts-announce] 20190327 [SECURITY] [DLA 1731-1] linux security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-03/msg00045.html', 'name': 'openSUSE-SU-2019:1085', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/04/msg00004.html', 'name': '[debian-lts-announce] 20190401 [SECURITY] [DLA 1731-2] linux regression update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3933-2/', 'name': 'USN-3933-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3932-2/', 'name': 'USN-3932-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3932-1/', 'name': 'USN-3932-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3931-2/', 'name': 'USN-3931-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3931-1/', 'name': 'USN-3931-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3930-2/', 'name': 'USN-3930-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3930-1/', 'name': 'USN-3930-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/3933-1/', 'name': 'USN-3933-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00052.html', 'name': 'openSUSE-SU-2019:1193', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:0831', 'name': 'RHSA-2019:0831', 'refsource': 'REDHAT', 'tags': ['Third Party Advisory']}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/05/msg00002.html', 'name': '[debian-lts-announce] 20190503 [SECURITY] [DLA 1771-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://access.redhat.com/errata/RHSA-2019:1479', 'name': 'RHSA-2019:1479', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:1480', 'name': 'RHSA-2019:1480', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://packetstormsecurity.com/files/156053/Reliable-Datagram-Sockets-RDS-rds_atomic_free_op-Privilege-Escalation.html', 'name': 'http://packetstormsecurity.com/files/156053/Reliable-Datagram-Sockets-RDS-rds_atomic_free_op-Privilege-Escalation.html', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-476'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.9', 'versionEndExcluding': '4.9.162', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.14', 'versionEndExcluding': '4.14.105', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.19', 'versionEndExcluding': '4.19.27', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.20', 'versionEndExcluding': '4.20.14', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:42.3:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:15.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:esm:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In the Linux kernel before 4.20.14, expand_downwards in mm/mmap.c lacks a check for the mmap minimum address, which makes it easier for attackers to exploit kernel NULL pointer dereferences on non-SMAP platforms. This is related to a capability check for the wrong task.'}] | 2019-06-17T21:15Z | 2019-03-05T22:29Z | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | NULL pointer dereference issues can occur through a number of flaws, including race conditions, and simple programming omissions.
| https://cwe.mitre.org/data/definitions/476.html | 0 | Jann Horn | 2019-02-27 21:29:52+01:00 | mm: enforce min addr even if capable() in expand_downwards()
security_mmap_addr() does a capability check with current_cred(), but
we can reach this code from contexts like a VFS write handler where
current_cred() must not be used.
This can be abused on systems without SMAP to make NULL pointer
dereferences exploitable again.
Fixes: 8869477a49c3 ("security: protect from stack expansion into low vm addresses")
Cc: [email protected]
Signed-off-by: Jann Horn <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]> | 0a1d52994d440e21def1c2174932410b4f2a98a1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | expand_downwards | expand_downwards( struct vm_area_struct * vma , unsigned long address) | ['vma', 'address'] | int expand_downwards(struct vm_area_struct *vma,
unsigned long address)
{
struct mm_struct *mm = vma->vm_mm;
struct vm_area_struct *prev;
int error;
address &= PAGE_MASK;
error = security_mmap_addr(address);
if (error)
return error;
/* Enforce stack_guard_gap */
prev = vma->vm_prev;
/* Check that both stack segments have the same anon_vma? */
if (prev && !(prev->vm_flags & VM_GROWSDOWN) &&
(prev->vm_flags & (VM_WRITE|VM_READ|VM_EXEC))) {
if (address - prev->vm_end < stack_guard_gap)
return -ENOMEM;
}
/* We must make sure the anon_vma is allocated. */
if (unlikely(anon_vma_prepare(vma)))
return -ENOMEM;
/*
* vma->vm_start/vm_end cannot change under us because the caller
* is required to hold the mmap_sem in read mode. We need the
* anon_vma lock to serialize against concurrent expand_stacks.
*/
anon_vma_lock_write(vma->anon_vma);
/* Somebody else might have raced and expanded it already */
if (address < vma->vm_start) {
unsigned long size, grow;
size = vma->vm_end - address;
grow = (vma->vm_start - address) >> PAGE_SHIFT;
error = -ENOMEM;
if (grow <= vma->vm_pgoff) {
error = acct_stack_growth(vma, size, grow);
if (!error) {
/*
* vma_gap_update() doesn't support concurrent
* updates, but we only hold a shared mmap_sem
* lock here, so we need to protect against
* concurrent vma expansions.
* anon_vma_lock_write() doesn't help here, as
* we don't guarantee that all growable vmas
* in a mm share the same root anon vma.
* So, we reuse mm->page_table_lock to guard
* against concurrent vma expansions.
*/
spin_lock(&mm->page_table_lock);
if (vma->vm_flags & VM_LOCKED)
mm->locked_vm += grow;
vm_stat_account(mm, vma->vm_flags, grow);
anon_vma_interval_tree_pre_update_vma(vma);
vma->vm_start = address;
vma->vm_pgoff -= grow;
anon_vma_interval_tree_post_update_vma(vma);
vma_gap_update(vma);
spin_unlock(&mm->page_table_lock);
perf_event_mmap(vma);
}
}
}
anon_vma_unlock_write(vma->anon_vma);
khugepaged_enter_vma_merge(vma, vma->vm_flags);
validate_mm(mm);
return error;
} | 285 | True | 1 |
|
CVE-2019-16995 | False | False | False | False | AV:N/AC:L/Au:N/C:N/I:N/A:C | NETWORK | LOW | NONE | NONE | NONE | COMPLETE | 7.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NETWORK | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 7.5 | HIGH | 3.9 | 3.6 | False | [{'url': 'https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.0.3', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.0.3', 'refsource': 'MISC', 'tags': ['Exploit', 'Release Notes', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/6caabe7f197d3466d238f70915d65301f1716626', 'name': 'https://github.com/torvalds/linux/commit/6caabe7f197d3466d238f70915d65301f1716626', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6caabe7f197d3466d238f70915d65301f1716626', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6caabe7f197d3466d238f70915d65301f1716626', 'refsource': 'MISC', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20191031-0005/', 'name': 'https://security.netapp.com/advisory/ntap-20191031-0005/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00010.html', 'name': 'openSUSE-SU-2019:2444', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00035.html', 'name': 'openSUSE-SU-2019:2503', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-401'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:5.1:rc1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '5.0', 'versionEndExcluding': '5.0.3', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '3.17', 'versionEndExcluding': '3.18.137', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.14', 'versionEndExcluding': '4.14.107', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.20', 'versionEndExcluding': '4.20.17', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.4', 'versionEndExcluding': '4.4.177', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.9', 'versionEndExcluding': '4.9.164', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionStartIncluding': '4.19', 'versionEndExcluding': '4.19.30', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:15.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:15.1:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:aff_a700s_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:aff_a700s:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h300s_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h300s:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h500s_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h500s:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h700s_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h700s:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h300e_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h300e:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h500e_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h500e:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h700e_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h700e:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h410s_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h410s:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h410c_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h410c:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'AND', 'children': [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:netapp:h610s_firmware:-:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': False, 'cpe23Uri': 'cpe:2.3:h:netapp:h610s:-:*:*:*:*:*:*:*', 'cpe_name': []}]}], 'cpe_match': []}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:steelstore_cloud_integrated_storage:-:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:service_processor:-:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:data_availability_services:-:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:solidfire:-:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:netapp:hci_management_node:-:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In the Linux kernel before 5.0.3, a memory leak exits in hsr_dev_finalize() in net/hsr/hsr_device.c if hsr_add_port fails to add a port, which may cause denial of service, aka CID-6caabe7f197d.'}] | 2021-07-21T11:39Z | 2019-09-30T13:15Z | Missing Release of Memory after Effective Lifetime | The software does not sufficiently track and release allocated memory after it has been used, which slowly consumes remaining memory. | This is often triggered by improper handling of malformed data or unexpectedly interrupted sessions. In some languages, developers are responsible for tracking memory allocation and releasing the memory. If there are no more pointers or references to the memory, then it can no longer be tracked and identified for release.
| https://cwe.mitre.org/data/definitions/401.html | 0 | Mao Wenan | 2019-03-06 22:45:01+08:00 | net: hsr: fix memory leak in hsr_dev_finalize()
If hsr_add_port(hsr, hsr_dev, HSR_PT_MASTER) failed to
add port, it directly returns res and forgets to free the node
that allocated in hsr_create_self_node(), and forgets to delete
the node->mac_list linked in hsr->self_node_db.
BUG: memory leak
unreferenced object 0xffff8881cfa0c780 (size 64):
comm "syz-executor.0", pid 2077, jiffies 4294717969 (age 2415.377s)
hex dump (first 32 bytes):
e0 c7 a0 cf 81 88 ff ff 00 02 00 00 00 00 ad de ................
00 e6 49 cd 81 88 ff ff c0 9b 87 d0 81 88 ff ff ..I.............
backtrace:
[<00000000e2ff5070>] hsr_dev_finalize+0x736/0x960 [hsr]
[<000000003ed2e597>] hsr_newlink+0x2b2/0x3e0 [hsr]
[<000000003fa8c6b6>] __rtnl_newlink+0xf1f/0x1600 net/core/rtnetlink.c:3182
[<000000001247a7ad>] rtnl_newlink+0x66/0x90 net/core/rtnetlink.c:3240
[<00000000e7d1b61d>] rtnetlink_rcv_msg+0x54e/0xb90 net/core/rtnetlink.c:5130
[<000000005556bd3a>] netlink_rcv_skb+0x129/0x340 net/netlink/af_netlink.c:2477
[<00000000741d5ee6>] netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline]
[<00000000741d5ee6>] netlink_unicast+0x49a/0x650 net/netlink/af_netlink.c:1336
[<000000009d56f9b7>] netlink_sendmsg+0x88b/0xdf0 net/netlink/af_netlink.c:1917
[<0000000046b35c59>] sock_sendmsg_nosec net/socket.c:621 [inline]
[<0000000046b35c59>] sock_sendmsg+0xc3/0x100 net/socket.c:631
[<00000000d208adc9>] __sys_sendto+0x33e/0x560 net/socket.c:1786
[<00000000b582837a>] __do_sys_sendto net/socket.c:1798 [inline]
[<00000000b582837a>] __se_sys_sendto net/socket.c:1794 [inline]
[<00000000b582837a>] __x64_sys_sendto+0xdd/0x1b0 net/socket.c:1794
[<00000000c866801d>] do_syscall_64+0x147/0x600 arch/x86/entry/common.c:290
[<00000000fea382d9>] entry_SYSCALL_64_after_hwframe+0x49/0xbe
[<00000000e01dacb3>] 0xffffffffffffffff
Fixes: c5a759117210 ("net/hsr: Use list_head (and rcu) instead of array for slave devices.")
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Mao Wenan <[email protected]>
Signed-off-by: David S. Miller <[email protected]> | 6caabe7f197d3466d238f70915d65301f1716626 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | hsr_dev_finalize | hsr_dev_finalize( struct net_device * hsr_dev , struct net_device * slave [ 2 ] , unsigned char multicast_spec , u8 protocol_version) | ['hsr_dev', 'multicast_spec', 'protocol_version'] | int hsr_dev_finalize(struct net_device *hsr_dev, struct net_device *slave[2],
unsigned char multicast_spec, u8 protocol_version)
{
struct hsr_priv *hsr;
struct hsr_port *port;
int res;
hsr = netdev_priv(hsr_dev);
INIT_LIST_HEAD(&hsr->ports);
INIT_LIST_HEAD(&hsr->node_db);
INIT_LIST_HEAD(&hsr->self_node_db);
ether_addr_copy(hsr_dev->dev_addr, slave[0]->dev_addr);
/* Make sure we recognize frames from ourselves in hsr_rcv() */
res = hsr_create_self_node(&hsr->self_node_db, hsr_dev->dev_addr,
slave[1]->dev_addr);
if (res < 0)
return res;
spin_lock_init(&hsr->seqnr_lock);
/* Overflow soon to find bugs easier: */
hsr->sequence_nr = HSR_SEQNR_START;
hsr->sup_sequence_nr = HSR_SUP_SEQNR_START;
timer_setup(&hsr->announce_timer, hsr_announce, 0);
timer_setup(&hsr->prune_timer, hsr_prune_nodes, 0);
ether_addr_copy(hsr->sup_multicast_addr, def_multicast_addr);
hsr->sup_multicast_addr[ETH_ALEN - 1] = multicast_spec;
hsr->protVersion = protocol_version;
/* FIXME: should I modify the value of these?
*
* - hsr_dev->flags - i.e.
* IFF_MASTER/SLAVE?
* - hsr_dev->priv_flags - i.e.
* IFF_EBRIDGE?
* IFF_TX_SKB_SHARING?
* IFF_HSR_MASTER/SLAVE?
*/
/* Make sure the 1st call to netif_carrier_on() gets through */
netif_carrier_off(hsr_dev);
res = hsr_add_port(hsr, hsr_dev, HSR_PT_MASTER);
if (res)
return res;
res = register_netdevice(hsr_dev);
if (res)
goto fail;
res = hsr_add_port(hsr, slave[0], HSR_PT_SLAVE_A);
if (res)
goto fail;
res = hsr_add_port(hsr, slave[1], HSR_PT_SLAVE_B);
if (res)
goto fail;
mod_timer(&hsr->prune_timer, jiffies + msecs_to_jiffies(PRUNE_PERIOD));
return 0;
fail:
hsr_for_each_port(hsr, port)
hsr_del_port(port);
return res;
} | 295 | True | 1 |
|
CVE-2019-14763 | False | False | False | False | AV:L/AC:L/Au:N/C:N/I:N/A:C | LOCAL | LOW | NONE | NONE | NONE | COMPLETE | 4.9 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 5.5 | MEDIUM | 1.8 | 3.6 | False | [{'url': 'https://github.com/torvalds/linux/commit/c91815b596245fd7da349ecc43c8def670d2269e', 'name': 'https://github.com/torvalds/linux/commit/c91815b596245fd7da349ecc43c8def670d2269e', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/072684e8c58d17e853f8e8b9f6d9ce2e58d2b036', 'name': 'https://github.com/torvalds/linux/commit/072684e8c58d17e853f8e8b9f6d9ce2e58d2b036', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://www.spinics.net/lists/linux-usb/msg167393.html', 'name': 'https://www.spinics.net/lists/linux-usb/msg167393.html', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Third Party Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.16.4', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.16.4', 'refsource': 'MISC', 'tags': ['Mailing List', 'Vendor Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=072684e8c58d17e853f8e8b9f6d9ce2e58d2b036', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=072684e8c58d17e853f8e8b9f6d9ce2e58d2b036', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'https://www.spinics.net/lists/linux-usb/msg167355.html', 'name': 'https://www.spinics.net/lists/linux-usb/msg167355.html', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Third Party Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c91815b596245fd7da349ecc43c8def670d2269e', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c91815b596245fd7da349ecc43c8def670d2269e', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'https://usn.ubuntu.com/4115-1/', 'name': 'USN-4115-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'https://usn.ubuntu.com/4118-1/', 'name': 'USN-4118-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-667'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.16.4', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:esm:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In the Linux kernel before 4.16.4, a double-locking error in drivers/usb/dwc3/gadget.c may potentially cause a deadlock with f_hid.'}] | 2022-04-18T16:04Z | 2019-08-07T22:15Z | Improper Locking | The software does not properly acquire or release a lock on a resource, leading to unexpected resource state changes and behaviors. |
Locking is a type of synchronization behavior that ensures that multiple independently-operating processes or threads do not interfere with each other when accessing the same resource. All processes/threads are expected to follow the same steps for locking. If these steps are not followed precisely - or if no locking is done at all - then another process/thread could modify the shared resource in a way that is not visible or predictable to the original process. This can lead to data or memory corruption, denial of service, etc.
| https://cwe.mitre.org/data/definitions/667.html | 0 | Radoslav Gerganov | 2019-03-05 10:10:34+00:00 | USB: gadget: f_hid: fix deadlock in f_hidg_write()
In f_hidg_write() the write_spinlock is acquired before calling
usb_ep_queue() which causes a deadlock when dummy_hcd is being used.
This is because dummy_queue() callbacks into f_hidg_req_complete() which
tries to acquire the same spinlock. This is (part of) the backtrace when
the deadlock occurs:
0xffffffffc06b1410 in f_hidg_req_complete
0xffffffffc06a590a in usb_gadget_giveback_request
0xffffffffc06cfff2 in dummy_queue
0xffffffffc06a4b96 in usb_ep_queue
0xffffffffc06b1eb6 in f_hidg_write
0xffffffff8127730b in __vfs_write
0xffffffff812774d1 in vfs_write
0xffffffff81277725 in SYSC_write
Fix this by releasing the write_spinlock before calling usb_ep_queue()
Reviewed-by: James Bottomley <[email protected]>
Tested-by: James Bottomley <[email protected]>
Cc: [email protected] # 4.11+
Fixes: 749494b6bdbb ("usb: gadget: f_hid: fix: Move IN request allocation to set_alt()")
Signed-off-by: Radoslav Gerganov <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]> | 072684e8c58d17e853f8e8b9f6d9ce2e58d2b036 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | f_hidg_write | f_hidg_write( struct file * file , const char __user * buffer , size_t count , loff_t * offp) | ['file', 'buffer', 'count', 'offp'] | static ssize_t f_hidg_write(struct file *file, const char __user *buffer,
size_t count, loff_t *offp)
{
struct f_hidg *hidg = file->private_data;
struct usb_request *req;
unsigned long flags;
ssize_t status = -ENOMEM;
if (!access_ok(buffer, count))
return -EFAULT;
spin_lock_irqsave(&hidg->write_spinlock, flags);
#define WRITE_COND (!hidg->write_pending)
try_again:
/* write queue */
while (!WRITE_COND) {
spin_unlock_irqrestore(&hidg->write_spinlock, flags);
if (file->f_flags & O_NONBLOCK)
return -EAGAIN;
if (wait_event_interruptible_exclusive(
hidg->write_queue, WRITE_COND))
return -ERESTARTSYS;
spin_lock_irqsave(&hidg->write_spinlock, flags);
}
hidg->write_pending = 1;
req = hidg->req;
count = min_t(unsigned, count, hidg->report_length);
spin_unlock_irqrestore(&hidg->write_spinlock, flags);
status = copy_from_user(req->buf, buffer, count);
if (status != 0) {
ERROR(hidg->func.config->cdev,
"copy_from_user error\n");
status = -EINVAL;
goto release_write_pending;
}
spin_lock_irqsave(&hidg->write_spinlock, flags);
/* when our function has been disabled by host */
if (!hidg->req) {
free_ep_req(hidg->in_ep, req);
/*
* TODO
* Should we fail with error here?
*/
goto try_again;
}
req->status = 0;
req->zero = 0;
req->length = count;
req->complete = f_hidg_req_complete;
req->context = hidg;
status = usb_ep_queue(hidg->in_ep, req, GFP_ATOMIC);
if (status < 0) {
ERROR(hidg->func.config->cdev,
"usb_ep_queue error on int endpoint %zd\n", status);
goto release_write_pending_unlocked;
} else {
status = count;
}
spin_unlock_irqrestore(&hidg->write_spinlock, flags);
return status;
release_write_pending:
spin_lock_irqsave(&hidg->write_spinlock, flags);
release_write_pending_unlocked:
hidg->write_pending = 0;
spin_unlock_irqrestore(&hidg->write_spinlock, flags);
wake_up(&hidg->write_queue);
return status;
} | 364 | True | 1 |
|
CVE-2019-15921 | False | False | False | False | AV:L/AC:M/Au:N/C:N/I:N/A:C | LOCAL | MEDIUM | NONE | NONE | NONE | COMPLETE | 4.7 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H | LOCAL | HIGH | LOW | NONE | UNCHANGED | NONE | NONE | HIGH | 4.7 | MEDIUM | 1.0 | 3.6 | False | [{'url': 'https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.0.6', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.0.6', 'refsource': 'MISC', 'tags': ['Mailing List', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/ceabee6c59943bdd5e1da1a6a20dc7ee5f8113a2', 'name': 'https://github.com/torvalds/linux/commit/ceabee6c59943bdd5e1da1a6a20dc7ee5f8113a2', 'refsource': 'MISC', 'tags': ['Exploit', 'Patch', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00064.html', 'name': 'openSUSE-SU-2019:2173', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00066.html', 'name': 'openSUSE-SU-2019:2181', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://security.netapp.com/advisory/ntap-20191004-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20191004-0001/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}] | [{'description': [{'lang': 'en', 'value': 'CWE-401'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.0.6', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:15.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:15.1:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'An issue was discovered in the Linux kernel before 5.0.6. There is a memory leak issue when idr_alloc() fails in genl_register_family() in net/netlink/genetlink.c.'}] | 2020-08-24T17:37Z | 2019-09-04T19:15Z | Missing Release of Memory after Effective Lifetime | The software does not sufficiently track and release allocated memory after it has been used, which slowly consumes remaining memory. | This is often triggered by improper handling of malformed data or unexpectedly interrupted sessions. In some languages, developers are responsible for tracking memory allocation and releasing the memory. If there are no more pointers or references to the memory, then it can no longer be tracked and identified for release.
| https://cwe.mitre.org/data/definitions/401.html | 0 | YueHaibing | 2019-03-21 15:02:50+08:00 | genetlink: Fix a memory leak on error path
In genl_register_family(), when idr_alloc() fails,
we forget to free the memory we possibly allocate for
family->attrbuf.
Reported-by: Hulk Robot <[email protected]>
Fixes: 2ae0f17df1cd ("genetlink: use idr to track families")
Signed-off-by: YueHaibing <[email protected]>
Reviewed-by: Kirill Tkhai <[email protected]>
Signed-off-by: David S. Miller <[email protected]> | ceabee6c59943bdd5e1da1a6a20dc7ee5f8113a2 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | genl_register_family | genl_register_family( struct genl_family * family) | ['family'] | int genl_register_family(struct genl_family *family)
{
int err, i;
int start = GENL_START_ALLOC, end = GENL_MAX_ID;
err = genl_validate_ops(family);
if (err)
return err;
genl_lock_all();
if (genl_family_find_byname(family->name)) {
err = -EEXIST;
goto errout_locked;
}
/*
* Sadly, a few cases need to be special-cased
* due to them having previously abused the API
* and having used their family ID also as their
* multicast group ID, so we use reserved IDs
* for both to be sure we can do that mapping.
*/
if (family == &genl_ctrl) {
/* and this needs to be special for initial family lookups */
start = end = GENL_ID_CTRL;
} else if (strcmp(family->name, "pmcraid") == 0) {
start = end = GENL_ID_PMCRAID;
} else if (strcmp(family->name, "VFS_DQUOT") == 0) {
start = end = GENL_ID_VFS_DQUOT;
}
if (family->maxattr && !family->parallel_ops) {
family->attrbuf = kmalloc_array(family->maxattr + 1,
sizeof(struct nlattr *),
GFP_KERNEL);
if (family->attrbuf == NULL) {
err = -ENOMEM;
goto errout_locked;
}
} else
family->attrbuf = NULL;
family->id = idr_alloc(&genl_fam_idr, family,
start, end + 1, GFP_KERNEL);
if (family->id < 0) {
err = family->id;
goto errout_locked;
}
err = genl_validate_assign_mc_groups(family);
if (err)
goto errout_remove;
genl_unlock_all();
/* send all events */
genl_ctrl_event(CTRL_CMD_NEWFAMILY, family, NULL, 0);
for (i = 0; i < family->n_mcgrps; i++)
genl_ctrl_event(CTRL_CMD_NEWMCAST_GRP, family,
&family->mcgrps[i], family->mcgrp_offset + i);
return 0;
errout_remove:
idr_remove(&genl_fam_idr, family->id);
kfree(family->attrbuf);
errout_locked:
genl_unlock_all();
return err;
} | 314 | True | 1 |
|
CVE-2019-10638 | False | False | False | True | AV:N/AC:M/Au:N/C:P/I:N/A:N | NETWORK | MEDIUM | NONE | PARTIAL | NONE | NONE | 4.3 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N | NETWORK | LOW | NONE | REQUIRED | UNCHANGED | HIGH | NONE | NONE | 6.5 | MEDIUM | 2.8 | 3.6 | False | [{'url': 'https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.1.7', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.1.7', 'refsource': 'MISC', 'tags': ['Mailing List', 'Release Notes', 'Vendor Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.0.8', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.0.8', 'refsource': 'MISC', 'tags': ['Mailing List', 'Release Notes', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/55f0fc7a02de8f12757f4937143d8d5091b2e40b', 'name': 'https://github.com/torvalds/linux/commit/55f0fc7a02de8f12757f4937143d8d5091b2e40b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://arxiv.org/pdf/1906.10478.pdf', 'name': 'https://arxiv.org/pdf/1906.10478.pdf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=355b98553789b646ed97ad801a619ff898471b92', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=355b98553789b646ed97ad801a619ff898471b92', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/df453700e8d81b1bdafdf684365ee2b9431fb702', 'name': 'https://github.com/torvalds/linux/commit/df453700e8d81b1bdafdf684365ee2b9431fb702', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/355b98553789b646ed97ad801a619ff898471b92', 'name': 'https://github.com/torvalds/linux/commit/355b98553789b646ed97ad801a619ff898471b92', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=df453700e8d81b1bdafdf684365ee2b9431fb702', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=df453700e8d81b1bdafdf684365ee2b9431fb702', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/109092', 'name': '109092', 'refsource': 'BID', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00014.html', 'name': 'openSUSE-SU-2019:1716', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00025.html', 'name': 'openSUSE-SU-2019:1757', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://security.netapp.com/advisory/ntap-20190806-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20190806-0001/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://www.debian.org/security/2019/dsa-4495', 'name': 'DSA-4495', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://seclists.org/bugtraq/2019/Aug/13', 'name': '20190812 [SECURITY] [DSA 4495-1] linux security update', 'refsource': 'BUGTRAQ', 'tags': []}, {'url': 'https://www.debian.org/security/2019/dsa-4497', 'name': 'DSA-4497', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://seclists.org/bugtraq/2019/Aug/18', 'name': '20190813 [SECURITY] [DSA 4497-1] linux security update', 'refsource': 'BUGTRAQ', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/08/msg00016.html', 'name': '[debian-lts-announce] 20190814 [SECURITY] [DLA 1884-1] linux security update', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/08/msg00017.html', 'name': '[debian-lts-announce] 20190814 [SECURITY] [DLA 1885-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://usn.ubuntu.com/4114-1/', 'name': 'USN-4114-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4117-1/', 'name': 'USN-4117-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4116-1/', 'name': 'USN-4116-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4115-1/', 'name': 'USN-4115-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4118-1/', 'name': 'USN-4118-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3309', 'name': 'RHSA-2019:3309', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3517', 'name': 'RHSA-2019:3517', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://seclists.org/bugtraq/2019/Nov/11', 'name': '20191108 [slackware-security] Slackware 14.2 kernel (SSA:2019-311-01)', 'refsource': 'BUGTRAQ', 'tags': []}, {'url': 'http://packetstormsecurity.com/files/155212/Slackware-Security-Advisory-Slackware-14.2-kernel-Updates.html', 'name': 'http://packetstormsecurity.com/files/155212/Slackware-Security-Advisory-Slackware-14.2-kernel-Updates.html', 'refsource': 'MISC', 'tags': []}, {'url': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'name': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-326'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.1.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In the Linux kernel before 5.1.7, a device can be tracked by an attacker using the IP ID values the kernel produces for connection-less protocols (e.g., UDP and ICMP). When such traffic is sent to multiple destination IP addresses, it is possible to obtain hash collisions (of indices to the counter array) and thereby obtain the hashing key (via enumeration). An attack may be conducted by hosting a crafted web page that uses WebRTC or gQUIC to force UDP traffic to attacker-controlled IP addresses.'}] | 2021-06-14T18:15Z | 2019-07-05T23:15Z | Inadequate Encryption Strength | The software stores or transmits sensitive data using an encryption scheme that is theoretically sound, but is not strong enough for the level of protection required. | A weak encryption scheme can be subjected to brute force attacks that have a reasonable chance of succeeding using current attack methods and resources.
| https://cwe.mitre.org/data/definitions/326.html | 0 | Eric Dumazet | 2019-03-27 12:40:33-07:00 | inet: switch IP ID generator to siphash
According to Amit Klein and Benny Pinkas, IP ID generation is too weak
and might be used by attackers.
Even with recent net_hash_mix() fix (netns: provide pure entropy for net_hash_mix())
having 64bit key and Jenkins hash is risky.
It is time to switch to siphash and its 128bit keys.
Signed-off-by: Eric Dumazet <[email protected]>
Reported-by: Amit Klein <[email protected]>
Reported-by: Benny Pinkas <[email protected]>
Signed-off-by: David S. Miller <[email protected]> | df453700e8d81b1bdafdf684365ee2b9431fb702 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | __ip_select_ident | __ip_select_ident( struct net * net , struct iphdr * iph , int segs) | ['net', 'iph', 'segs'] | void __ip_select_ident(struct net *net, struct iphdr *iph, int segs)
{
static u32 ip_idents_hashrnd __read_mostly;
u32 hash, id;
net_get_random_once(&ip_idents_hashrnd, sizeof(ip_idents_hashrnd));
hash = jhash_3words((__force u32)iph->daddr,
(__force u32)iph->saddr,
iph->protocol ^ net_hash_mix(net),
ip_idents_hashrnd);
id = ip_idents_reserve(hash, segs);
iph->id = htons(id);
} | 88 | True | 1 |
|
CVE-2019-10638 | False | False | False | True | AV:N/AC:M/Au:N/C:P/I:N/A:N | NETWORK | MEDIUM | NONE | PARTIAL | NONE | NONE | 4.3 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N | NETWORK | LOW | NONE | REQUIRED | UNCHANGED | HIGH | NONE | NONE | 6.5 | MEDIUM | 2.8 | 3.6 | False | [{'url': 'https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.1.7', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.1.7', 'refsource': 'MISC', 'tags': ['Mailing List', 'Release Notes', 'Vendor Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.0.8', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.0.8', 'refsource': 'MISC', 'tags': ['Mailing List', 'Release Notes', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/55f0fc7a02de8f12757f4937143d8d5091b2e40b', 'name': 'https://github.com/torvalds/linux/commit/55f0fc7a02de8f12757f4937143d8d5091b2e40b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://arxiv.org/pdf/1906.10478.pdf', 'name': 'https://arxiv.org/pdf/1906.10478.pdf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=355b98553789b646ed97ad801a619ff898471b92', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=355b98553789b646ed97ad801a619ff898471b92', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/df453700e8d81b1bdafdf684365ee2b9431fb702', 'name': 'https://github.com/torvalds/linux/commit/df453700e8d81b1bdafdf684365ee2b9431fb702', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/355b98553789b646ed97ad801a619ff898471b92', 'name': 'https://github.com/torvalds/linux/commit/355b98553789b646ed97ad801a619ff898471b92', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=df453700e8d81b1bdafdf684365ee2b9431fb702', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=df453700e8d81b1bdafdf684365ee2b9431fb702', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/109092', 'name': '109092', 'refsource': 'BID', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00014.html', 'name': 'openSUSE-SU-2019:1716', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00025.html', 'name': 'openSUSE-SU-2019:1757', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://security.netapp.com/advisory/ntap-20190806-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20190806-0001/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://www.debian.org/security/2019/dsa-4495', 'name': 'DSA-4495', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://seclists.org/bugtraq/2019/Aug/13', 'name': '20190812 [SECURITY] [DSA 4495-1] linux security update', 'refsource': 'BUGTRAQ', 'tags': []}, {'url': 'https://www.debian.org/security/2019/dsa-4497', 'name': 'DSA-4497', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://seclists.org/bugtraq/2019/Aug/18', 'name': '20190813 [SECURITY] [DSA 4497-1] linux security update', 'refsource': 'BUGTRAQ', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/08/msg00016.html', 'name': '[debian-lts-announce] 20190814 [SECURITY] [DLA 1884-1] linux security update', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/08/msg00017.html', 'name': '[debian-lts-announce] 20190814 [SECURITY] [DLA 1885-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://usn.ubuntu.com/4114-1/', 'name': 'USN-4114-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4117-1/', 'name': 'USN-4117-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4116-1/', 'name': 'USN-4116-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4115-1/', 'name': 'USN-4115-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4118-1/', 'name': 'USN-4118-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3309', 'name': 'RHSA-2019:3309', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3517', 'name': 'RHSA-2019:3517', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://seclists.org/bugtraq/2019/Nov/11', 'name': '20191108 [slackware-security] Slackware 14.2 kernel (SSA:2019-311-01)', 'refsource': 'BUGTRAQ', 'tags': []}, {'url': 'http://packetstormsecurity.com/files/155212/Slackware-Security-Advisory-Slackware-14.2-kernel-Updates.html', 'name': 'http://packetstormsecurity.com/files/155212/Slackware-Security-Advisory-Slackware-14.2-kernel-Updates.html', 'refsource': 'MISC', 'tags': []}, {'url': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'name': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-326'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.1.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In the Linux kernel before 5.1.7, a device can be tracked by an attacker using the IP ID values the kernel produces for connection-less protocols (e.g., UDP and ICMP). When such traffic is sent to multiple destination IP addresses, it is possible to obtain hash collisions (of indices to the counter array) and thereby obtain the hashing key (via enumeration). An attack may be conducted by hosting a crafted web page that uses WebRTC or gQUIC to force UDP traffic to attacker-controlled IP addresses.'}] | 2021-06-14T18:15Z | 2019-07-05T23:15Z | Inadequate Encryption Strength | The software stores or transmits sensitive data using an encryption scheme that is theoretically sound, but is not strong enough for the level of protection required. | A weak encryption scheme can be subjected to brute force attacks that have a reasonable chance of succeeding using current attack methods and resources.
| https://cwe.mitre.org/data/definitions/326.html | 0 | Eric Dumazet | 2019-03-27 12:40:33-07:00 | inet: switch IP ID generator to siphash
According to Amit Klein and Benny Pinkas, IP ID generation is too weak
and might be used by attackers.
Even with recent net_hash_mix() fix (netns: provide pure entropy for net_hash_mix())
having 64bit key and Jenkins hash is risky.
It is time to switch to siphash and its 128bit keys.
Signed-off-by: Eric Dumazet <[email protected]>
Reported-by: Amit Klein <[email protected]>
Reported-by: Benny Pinkas <[email protected]>
Signed-off-by: David S. Miller <[email protected]> | df453700e8d81b1bdafdf684365ee2b9431fb702 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | __ipv6_select_ident | __ipv6_select_ident( struct net * net , u32 hashrnd , const struct in6_addr * dst , const struct in6_addr * src) | ['net', 'hashrnd', 'dst', 'src'] | static u32 __ipv6_select_ident(struct net *net, u32 hashrnd,
const struct in6_addr *dst,
const struct in6_addr *src)
{
u32 hash, id;
hash = __ipv6_addr_jhash(dst, hashrnd);
hash = __ipv6_addr_jhash(src, hash);
hash ^= net_hash_mix(net);
/* Treat id of 0 as unset and if we get 0 back from ip_idents_reserve,
* set the hight order instead thus minimizing possible future
* collisions.
*/
id = ip_idents_reserve(hash, 1);
if (unlikely(!id))
id = 1 << 31;
return id;
} | 81 | True | 1 |
|
CVE-2019-10638 | False | False | False | True | AV:N/AC:M/Au:N/C:P/I:N/A:N | NETWORK | MEDIUM | NONE | PARTIAL | NONE | NONE | 4.3 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N | NETWORK | LOW | NONE | REQUIRED | UNCHANGED | HIGH | NONE | NONE | 6.5 | MEDIUM | 2.8 | 3.6 | False | [{'url': 'https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.1.7', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.1.7', 'refsource': 'MISC', 'tags': ['Mailing List', 'Release Notes', 'Vendor Advisory']}, {'url': 'https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.0.8', 'name': 'https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.0.8', 'refsource': 'MISC', 'tags': ['Mailing List', 'Release Notes', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/55f0fc7a02de8f12757f4937143d8d5091b2e40b', 'name': 'https://github.com/torvalds/linux/commit/55f0fc7a02de8f12757f4937143d8d5091b2e40b', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://arxiv.org/pdf/1906.10478.pdf', 'name': 'https://arxiv.org/pdf/1906.10478.pdf', 'refsource': 'MISC', 'tags': ['Third Party Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=355b98553789b646ed97ad801a619ff898471b92', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=355b98553789b646ed97ad801a619ff898471b92', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/df453700e8d81b1bdafdf684365ee2b9431fb702', 'name': 'https://github.com/torvalds/linux/commit/df453700e8d81b1bdafdf684365ee2b9431fb702', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/355b98553789b646ed97ad801a619ff898471b92', 'name': 'https://github.com/torvalds/linux/commit/355b98553789b646ed97ad801a619ff898471b92', 'refsource': 'MISC', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=df453700e8d81b1bdafdf684365ee2b9431fb702', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=df453700e8d81b1bdafdf684365ee2b9431fb702', 'refsource': 'MISC', 'tags': ['Mailing List', 'Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/109092', 'name': '109092', 'refsource': 'BID', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00014.html', 'name': 'openSUSE-SU-2019:1716', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00025.html', 'name': 'openSUSE-SU-2019:1757', 'refsource': 'SUSE', 'tags': []}, {'url': 'https://security.netapp.com/advisory/ntap-20190806-0001/', 'name': 'https://security.netapp.com/advisory/ntap-20190806-0001/', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://www.debian.org/security/2019/dsa-4495', 'name': 'DSA-4495', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://seclists.org/bugtraq/2019/Aug/13', 'name': '20190812 [SECURITY] [DSA 4495-1] linux security update', 'refsource': 'BUGTRAQ', 'tags': []}, {'url': 'https://www.debian.org/security/2019/dsa-4497', 'name': 'DSA-4497', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'https://seclists.org/bugtraq/2019/Aug/18', 'name': '20190813 [SECURITY] [DSA 4497-1] linux security update', 'refsource': 'BUGTRAQ', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/08/msg00016.html', 'name': '[debian-lts-announce] 20190814 [SECURITY] [DLA 1884-1] linux security update', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://lists.debian.org/debian-lts-announce/2019/08/msg00017.html', 'name': '[debian-lts-announce] 20190814 [SECURITY] [DLA 1885-1] linux-4.9 security update', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://usn.ubuntu.com/4114-1/', 'name': 'USN-4114-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4117-1/', 'name': 'USN-4117-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4116-1/', 'name': 'USN-4116-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4115-1/', 'name': 'USN-4115-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/4118-1/', 'name': 'USN-4118-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3309', 'name': 'RHSA-2019:3309', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:3517', 'name': 'RHSA-2019:3517', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://seclists.org/bugtraq/2019/Nov/11', 'name': '20191108 [slackware-security] Slackware 14.2 kernel (SSA:2019-311-01)', 'refsource': 'BUGTRAQ', 'tags': []}, {'url': 'http://packetstormsecurity.com/files/155212/Slackware-Security-Advisory-Slackware-14.2-kernel-Updates.html', 'name': 'http://packetstormsecurity.com/files/155212/Slackware-Security-Advisory-Slackware-14.2-kernel-Updates.html', 'refsource': 'MISC', 'tags': []}, {'url': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'name': 'https://www.oracle.com/security-alerts/cpuApr2021.html', 'refsource': 'MISC', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-326'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '5.1.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'In the Linux kernel before 5.1.7, a device can be tracked by an attacker using the IP ID values the kernel produces for connection-less protocols (e.g., UDP and ICMP). When such traffic is sent to multiple destination IP addresses, it is possible to obtain hash collisions (of indices to the counter array) and thereby obtain the hashing key (via enumeration). An attack may be conducted by hosting a crafted web page that uses WebRTC or gQUIC to force UDP traffic to attacker-controlled IP addresses.'}] | 2021-06-14T18:15Z | 2019-07-05T23:15Z | Inadequate Encryption Strength | The software stores or transmits sensitive data using an encryption scheme that is theoretically sound, but is not strong enough for the level of protection required. | A weak encryption scheme can be subjected to brute force attacks that have a reasonable chance of succeeding using current attack methods and resources.
| https://cwe.mitre.org/data/definitions/326.html | 0 | Eric Dumazet | 2019-03-27 12:40:33-07:00 | inet: switch IP ID generator to siphash
According to Amit Klein and Benny Pinkas, IP ID generation is too weak
and might be used by attackers.
Even with recent net_hash_mix() fix (netns: provide pure entropy for net_hash_mix())
having 64bit key and Jenkins hash is risky.
It is time to switch to siphash and its 128bit keys.
Signed-off-by: Eric Dumazet <[email protected]>
Reported-by: Amit Klein <[email protected]>
Reported-by: Benny Pinkas <[email protected]>
Signed-off-by: David S. Miller <[email protected]> | df453700e8d81b1bdafdf684365ee2b9431fb702 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ipv6_proxy_select_ident | ipv6_proxy_select_ident( struct net * net , struct sk_buff * skb) | ['net', 'skb'] | __be32 ipv6_proxy_select_ident(struct net *net, struct sk_buff *skb)
{
static u32 ip6_proxy_idents_hashrnd __read_mostly;
struct in6_addr buf[2];
struct in6_addr *addrs;
u32 id;
addrs = skb_header_pointer(skb,
skb_network_offset(skb) +
offsetof(struct ipv6hdr, saddr),
sizeof(buf), buf);
if (!addrs)
return 0;
net_get_random_once(&ip6_proxy_idents_hashrnd,
sizeof(ip6_proxy_idents_hashrnd));
id = __ipv6_select_ident(net, ip6_proxy_idents_hashrnd,
&addrs[1], &addrs[0]);
return htonl(id);
} | 107 | True | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.