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-2015-8812 | False | False | False | False | AV:N/AC:L/Au:N/C:C/I:C/A:C | NETWORK | LOW | NONE | COMPLETE | COMPLETE | COMPLETE | 10.0 | CVSS:3.0/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 | nan | [{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1303532', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1303532', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/02/11/1', 'name': '[oss-security] 20160211 Linux kernel: Flaw in CXGB3 driver.', 'refsource': 'MLIST', 'tags': ['Release Notes']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=67f1aee6f45059fd6b0f5b0ecb2c97ad0451f6b3', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=67f1aee6f45059fd6b0f5b0ecb2c97ad0451f6b3', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/67f1aee6f45059fd6b0f5b0ecb2c97ad0451f6b3', 'name': 'https://github.com/torvalds/linux/commit/67f1aee6f45059fd6b0f5b0ecb2c97ad0451f6b3', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-07/msg00005.html', 'name': 'SUSE-SU-2016:1764', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/83218', 'name': '83218', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00015.html', 'name': 'openSUSE-SU-2016:1008', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00032.html', 'name': 'SUSE-SU-2016:1039', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00029.html', 'name': 'SUSE-SU-2016:1035', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00027.html', 'name': 'SUSE-SU-2016:1033', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2946-2', 'name': 'USN-2946-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00036.html', 'name': 'SUSE-SU-2016:1045', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00034.html', 'name': 'SUSE-SU-2016:1041', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00030.html', 'name': 'SUSE-SU-2016:1037', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2947-3', 'name': 'USN-2947-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2948-2', 'name': 'USN-2948-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00037.html', 'name': 'SUSE-SU-2016:1046', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2947-1', 'name': 'USN-2947-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00025.html', 'name': 'SUSE-SU-2016:1031', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2949-1', 'name': 'USN-2949-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00033.html', 'name': 'SUSE-SU-2016:1040', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00028.html', 'name': 'SUSE-SU-2016:1034', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2947-2', 'name': 'USN-2947-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2946-1', 'name': 'USN-2946-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00031.html', 'name': 'SUSE-SU-2016:1038', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00019.html', 'name': 'SUSE-SU-2016:1019', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00094.html', 'name': 'SUSE-SU-2016:0911', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00026.html', 'name': 'SUSE-SU-2016:1032', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00045.html', 'name': 'SUSE-SU-2016:1102', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2948-1', 'name': 'USN-2948-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2584.html', 'name': 'RHSA-2016:2584', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2574.html', 'name': 'RHSA-2016:2574', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_real_time_extension:12:sp1:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4.8', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'drivers/infiniband/hw/cxgb3/iwch_cm.c in the Linux kernel before 4.5 does not properly identify error conditions, which allows remote attackers to execute arbitrary code or cause a denial of service (use-after-free) via crafted packets.'}] | 2018-01-05T02:30Z | 2016-04-27T17:59Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Hariprasad S | 2015-12-11 13:47:17+05:18 | iw_cxgb3: Fix incorrectly returning error on success
The cxgb3_*_send() functions return NET_XMIT_ values, which are
positive integers values. So don't treat positive return values
as an error.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: Doug Ledford <dledford@redhat.com> | 67f1aee6f45059fd6b0f5b0ecb2c97ad0451f6b3 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | iwch_l2t_send | iwch_l2t_send( struct t3cdev * tdev , struct sk_buff * skb , struct l2t_entry * l2e) | ['tdev', 'skb', 'l2e'] | static int iwch_l2t_send(struct t3cdev *tdev, struct sk_buff *skb, struct l2t_entry *l2e)
{
int error = 0;
struct cxio_rdev *rdev;
rdev = (struct cxio_rdev *)tdev->ulp;
if (cxio_fatal_error(rdev)) {
kfree_skb(skb);
return -EIO;
}
error = l2t_send(tdev, skb, l2e);
if (error < 0)
kfree_skb(skb);
return error;
} | 83 | True | 1 |
|
CVE-2015-8966 | 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 | nan | [{'url': 'http://source.android.com/security/bulletin/2016-12-01.html', 'name': 'http://source.android.com/security/bulletin/2016-12-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=76cc404bfdc0d419c720de4daaf2584542734f42', 'name': 'https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=76cc404bfdc0d419c720de4daaf2584542734f42', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/76cc404bfdc0d419c720de4daaf2584542734f42', 'name': 'https://github.com/torvalds/linux/commit/76cc404bfdc0d419c720de4daaf2584542734f42', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94673', 'name': '94673', 'refsource': 'BID', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-264'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.3.6', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'arch/arm/kernel/sys_oabi-compat.c in the Linux kernel before 4.4 allows local users to gain privileges via a crafted (1) F_OFD_GETLK, (2) F_OFD_SETLK, or (3) F_OFD_SETLKW command in an fcntl64 system call.'}] | 2016-12-10T02:59Z | 2016-12-08T21:59Z | Permissions, Privileges, and Access Controls | Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control. | https://cwe.mitre.org/data/definitions/264.html | 1 | Al Viro | 2015-12-28 20:47:08-05:00 | [PATCH] arm: fix handling of F_OFD_... in oabi_fcntl64()
Cc: stable@vger.kernel.org # 3.15+
Reviewed-by: Jeff Layton <jeff.layton@primarydata.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | 76cc404bfdc0d419c720de4daaf2584542734f42 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | sys_oabi_fcntl64 | sys_oabi_fcntl64( unsigned int fd , unsigned int cmd , unsigned long arg) | ['fd', 'cmd', 'arg'] | asmlinkage long sys_oabi_fcntl64(unsigned int fd, unsigned int cmd,
unsigned long arg)
{
struct oabi_flock64 user;
struct flock64 kernel;
mm_segment_t fs = USER_DS; /* initialized to kill a warning */
unsigned long local_arg = arg;
int ret;
switch (cmd) {
case F_OFD_GETLK:
case F_OFD_SETLK:
case F_OFD_SETLKW:
case F_GETLK64:
case F_SETLK64:
case F_SETLKW64:
if (copy_from_user(&user, (struct oabi_flock64 __user *)arg,
sizeof(user)))
return -EFAULT;
kernel.l_type = user.l_type;
kernel.l_whence = user.l_whence;
kernel.l_start = user.l_start;
kernel.l_len = user.l_len;
kernel.l_pid = user.l_pid;
local_arg = (unsigned long)&kernel;
fs = get_fs();
set_fs(KERNEL_DS);
}
ret = sys_fcntl64(fd, cmd, local_arg);
switch (cmd) {
case F_GETLK64:
if (!ret) {
user.l_type = kernel.l_type;
user.l_whence = kernel.l_whence;
user.l_start = kernel.l_start;
user.l_len = kernel.l_len;
user.l_pid = kernel.l_pid;
if (copy_to_user((struct oabi_flock64 __user *)arg,
&user, sizeof(user)))
ret = -EFAULT;
}
case F_SETLK64:
case F_SETLKW64:
set_fs(fs);
}
return ret;
} | 254 | True | 1 |
||
CVE-2016-10229 | False | False | False | False | AV:N/AC:L/Au:N/C:C/I:C/A:C | NETWORK | LOW | NONE | COMPLETE | COMPLETE | COMPLETE | 10.0 | CVSS:3.0/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 | nan | [{'url': 'https://github.com/torvalds/linux/commit/197c949e7798fbf28cfadc69d9ca0c2abbf93191', 'name': 'https://github.com/torvalds/linux/commit/197c949e7798fbf28cfadc69d9ca0c2abbf93191', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://source.android.com/security/bulletin/2017-04-01.html', 'name': 'http://source.android.com/security/bulletin/2017-04-01.html', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=197c949e7798fbf28cfadc69d9ca0c2abbf93191', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=197c949e7798fbf28cfadc69d9ca0c2abbf93191', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/97397', 'name': '97397', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securitytracker.com/id/1038201', 'name': '1038201', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'https://security.paloaltonetworks.com/CVE-2016-10229', 'name': 'https://security.paloaltonetworks.com/CVE-2016-10229', 'refsource': 'CONFIRM', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-358'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4.60', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:google:android:*:*:*:*:*:*:*:*', 'versionEndIncluding': '7.1.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'udp.c in the Linux kernel before 4.5 allows remote attackers to execute arbitrary code via UDP traffic that triggers an unsafe second checksum calculation during execution of a recv system call with the MSG_PEEK flag.'}] | 2017-09-20T01:29Z | 2017-04-04T05:59Z | Improperly Implemented Security Check for Standard | The software does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique. | https://cwe.mitre.org/data/definitions/358.html | 0 | Eric Dumazet | 2015-12-30 08:51:12-05:00 | udp: properly support MSG_PEEK with truncated buffers
Backport of this upstream commit into stable kernels :
89c22d8c3b27 ("net: Fix skb csum races when peeking")
exposed a bug in udp stack vs MSG_PEEK support, when user provides
a buffer smaller than skb payload.
In this case,
skb_copy_and_csum_datagram_iovec(skb, sizeof(struct udphdr),
msg->msg_iov);
returns -EFAULT.
This bug does not happen in upstream kernels since Al Viro did a great
job to replace this into :
skb_copy_and_csum_datagram_msg(skb, sizeof(struct udphdr), msg);
This variant is safe vs short buffers.
For the time being, instead reverting Herbert Xu patch and add back
skb->ip_summed invalid changes, simply store the result of
udp_lib_checksum_complete() so that we avoid computing the checksum a
second time, and avoid the problematic
skb_copy_and_csum_datagram_iovec() call.
This patch can be applied on recent kernels as it avoids a double
checksumming, then backported to stable kernels as a bug fix.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net> | 197c949e7798fbf28cfadc69d9ca0c2abbf93191 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | udp_recvmsg | udp_recvmsg( struct sock * sk , struct msghdr * msg , size_t len , int noblock , int flags , int * addr_len) | ['sk', 'msg', 'len', 'noblock', 'flags', 'addr_len'] | int udp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int noblock,
int flags, int *addr_len)
{
struct inet_sock *inet = inet_sk(sk);
DECLARE_SOCKADDR(struct sockaddr_in *, sin, msg->msg_name);
struct sk_buff *skb;
unsigned int ulen, copied;
int peeked, off = 0;
int err;
int is_udplite = IS_UDPLITE(sk);
bool slow;
if (flags & MSG_ERRQUEUE)
return ip_recv_error(sk, msg, len, addr_len);
try_again:
skb = __skb_recv_datagram(sk, flags | (noblock ? MSG_DONTWAIT : 0),
&peeked, &off, &err);
if (!skb)
goto out;
ulen = skb->len - sizeof(struct udphdr);
copied = len;
if (copied > ulen)
copied = ulen;
else if (copied < ulen)
msg->msg_flags |= MSG_TRUNC;
/*
* If checksum is needed at all, try to do it while copying the
* data. If the data is truncated, or if we only want a partial
* coverage checksum (UDP-Lite), do it before the copy.
*/
if (copied < ulen || UDP_SKB_CB(skb)->partial_cov) {
if (udp_lib_checksum_complete(skb))
goto csum_copy_err;
}
if (skb_csum_unnecessary(skb))
err = skb_copy_datagram_msg(skb, sizeof(struct udphdr),
msg, copied);
else {
err = skb_copy_and_csum_datagram_msg(skb, sizeof(struct udphdr),
msg);
if (err == -EINVAL)
goto csum_copy_err;
}
if (unlikely(err)) {
trace_kfree_skb(skb, udp_recvmsg);
if (!peeked) {
atomic_inc(&sk->sk_drops);
UDP_INC_STATS_USER(sock_net(sk),
UDP_MIB_INERRORS, is_udplite);
}
goto out_free;
}
if (!peeked)
UDP_INC_STATS_USER(sock_net(sk),
UDP_MIB_INDATAGRAMS, is_udplite);
sock_recv_ts_and_drops(msg, sk, skb);
/* Copy the address. */
if (sin) {
sin->sin_family = AF_INET;
sin->sin_port = udp_hdr(skb)->source;
sin->sin_addr.s_addr = ip_hdr(skb)->saddr;
memset(sin->sin_zero, 0, sizeof(sin->sin_zero));
*addr_len = sizeof(*sin);
}
if (inet->cmsg_flags)
ip_cmsg_recv_offset(msg, skb, sizeof(struct udphdr));
err = copied;
if (flags & MSG_TRUNC)
err = ulen;
out_free:
skb_free_datagram_locked(sk, skb);
out:
return err;
csum_copy_err:
slow = lock_sock_fast(sk);
if (!skb_kill_datagram(sk, skb, flags)) {
UDP_INC_STATS_USER(sock_net(sk), UDP_MIB_CSUMERRORS, is_udplite);
UDP_INC_STATS_USER(sock_net(sk), UDP_MIB_INERRORS, is_udplite);
}
unlock_sock_fast(sk, slow);
/* starting over for a new packet, but check if we need to yield */
cond_resched();
msg->msg_flags &= ~MSG_TRUNC;
goto try_again;
} | 499 | True | 1 |
||
CVE-2016-10229 | False | False | False | False | AV:N/AC:L/Au:N/C:C/I:C/A:C | NETWORK | LOW | NONE | COMPLETE | COMPLETE | COMPLETE | 10.0 | CVSS:3.0/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 | nan | [{'url': 'https://github.com/torvalds/linux/commit/197c949e7798fbf28cfadc69d9ca0c2abbf93191', 'name': 'https://github.com/torvalds/linux/commit/197c949e7798fbf28cfadc69d9ca0c2abbf93191', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://source.android.com/security/bulletin/2017-04-01.html', 'name': 'http://source.android.com/security/bulletin/2017-04-01.html', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=197c949e7798fbf28cfadc69d9ca0c2abbf93191', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=197c949e7798fbf28cfadc69d9ca0c2abbf93191', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/97397', 'name': '97397', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securitytracker.com/id/1038201', 'name': '1038201', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'https://security.paloaltonetworks.com/CVE-2016-10229', 'name': 'https://security.paloaltonetworks.com/CVE-2016-10229', 'refsource': 'CONFIRM', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-358'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4.60', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:google:android:*:*:*:*:*:*:*:*', 'versionEndIncluding': '7.1.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'udp.c in the Linux kernel before 4.5 allows remote attackers to execute arbitrary code via UDP traffic that triggers an unsafe second checksum calculation during execution of a recv system call with the MSG_PEEK flag.'}] | 2017-09-20T01:29Z | 2017-04-04T05:59Z | Improperly Implemented Security Check for Standard | The software does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique. | https://cwe.mitre.org/data/definitions/358.html | 0 | Eric Dumazet | 2015-12-30 08:51:12-05:00 | udp: properly support MSG_PEEK with truncated buffers
Backport of this upstream commit into stable kernels :
89c22d8c3b27 ("net: Fix skb csum races when peeking")
exposed a bug in udp stack vs MSG_PEEK support, when user provides
a buffer smaller than skb payload.
In this case,
skb_copy_and_csum_datagram_iovec(skb, sizeof(struct udphdr),
msg->msg_iov);
returns -EFAULT.
This bug does not happen in upstream kernels since Al Viro did a great
job to replace this into :
skb_copy_and_csum_datagram_msg(skb, sizeof(struct udphdr), msg);
This variant is safe vs short buffers.
For the time being, instead reverting Herbert Xu patch and add back
skb->ip_summed invalid changes, simply store the result of
udp_lib_checksum_complete() so that we avoid computing the checksum a
second time, and avoid the problematic
skb_copy_and_csum_datagram_iovec() call.
This patch can be applied on recent kernels as it avoids a double
checksumming, then backported to stable kernels as a bug fix.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net> | 197c949e7798fbf28cfadc69d9ca0c2abbf93191 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | udpv6_recvmsg | udpv6_recvmsg( struct sock * sk , struct msghdr * msg , size_t len , int noblock , int flags , int * addr_len) | ['sk', 'msg', 'len', 'noblock', 'flags', 'addr_len'] | int udpv6_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
int noblock, int flags, int *addr_len)
{
struct ipv6_pinfo *np = inet6_sk(sk);
struct inet_sock *inet = inet_sk(sk);
struct sk_buff *skb;
unsigned int ulen, copied;
int peeked, off = 0;
int err;
int is_udplite = IS_UDPLITE(sk);
int is_udp4;
bool slow;
if (flags & MSG_ERRQUEUE)
return ipv6_recv_error(sk, msg, len, addr_len);
if (np->rxpmtu && np->rxopt.bits.rxpmtu)
return ipv6_recv_rxpmtu(sk, msg, len, addr_len);
try_again:
skb = __skb_recv_datagram(sk, flags | (noblock ? MSG_DONTWAIT : 0),
&peeked, &off, &err);
if (!skb)
goto out;
ulen = skb->len - sizeof(struct udphdr);
copied = len;
if (copied > ulen)
copied = ulen;
else if (copied < ulen)
msg->msg_flags |= MSG_TRUNC;
is_udp4 = (skb->protocol == htons(ETH_P_IP));
/*
* If checksum is needed at all, try to do it while copying the
* data. If the data is truncated, or if we only want a partial
* coverage checksum (UDP-Lite), do it before the copy.
*/
if (copied < ulen || UDP_SKB_CB(skb)->partial_cov) {
if (udp_lib_checksum_complete(skb))
goto csum_copy_err;
}
if (skb_csum_unnecessary(skb))
err = skb_copy_datagram_msg(skb, sizeof(struct udphdr),
msg, copied);
else {
err = skb_copy_and_csum_datagram_msg(skb, sizeof(struct udphdr), msg);
if (err == -EINVAL)
goto csum_copy_err;
}
if (unlikely(err)) {
trace_kfree_skb(skb, udpv6_recvmsg);
if (!peeked) {
atomic_inc(&sk->sk_drops);
if (is_udp4)
UDP_INC_STATS_USER(sock_net(sk),
UDP_MIB_INERRORS,
is_udplite);
else
UDP6_INC_STATS_USER(sock_net(sk),
UDP_MIB_INERRORS,
is_udplite);
}
goto out_free;
}
if (!peeked) {
if (is_udp4)
UDP_INC_STATS_USER(sock_net(sk),
UDP_MIB_INDATAGRAMS, is_udplite);
else
UDP6_INC_STATS_USER(sock_net(sk),
UDP_MIB_INDATAGRAMS, is_udplite);
}
sock_recv_ts_and_drops(msg, sk, skb);
/* Copy the address. */
if (msg->msg_name) {
DECLARE_SOCKADDR(struct sockaddr_in6 *, sin6, msg->msg_name);
sin6->sin6_family = AF_INET6;
sin6->sin6_port = udp_hdr(skb)->source;
sin6->sin6_flowinfo = 0;
if (is_udp4) {
ipv6_addr_set_v4mapped(ip_hdr(skb)->saddr,
&sin6->sin6_addr);
sin6->sin6_scope_id = 0;
} else {
sin6->sin6_addr = ipv6_hdr(skb)->saddr;
sin6->sin6_scope_id =
ipv6_iface_scope_id(&sin6->sin6_addr,
inet6_iif(skb));
}
*addr_len = sizeof(*sin6);
}
if (np->rxopt.all)
ip6_datagram_recv_common_ctl(sk, msg, skb);
if (is_udp4) {
if (inet->cmsg_flags)
ip_cmsg_recv(msg, skb);
} else {
if (np->rxopt.all)
ip6_datagram_recv_specific_ctl(sk, msg, skb);
}
err = copied;
if (flags & MSG_TRUNC)
err = ulen;
out_free:
skb_free_datagram_locked(sk, skb);
out:
return err;
csum_copy_err:
slow = lock_sock_fast(sk);
if (!skb_kill_datagram(sk, skb, flags)) {
if (is_udp4) {
UDP_INC_STATS_USER(sock_net(sk),
UDP_MIB_CSUMERRORS, is_udplite);
UDP_INC_STATS_USER(sock_net(sk),
UDP_MIB_INERRORS, is_udplite);
} else {
UDP6_INC_STATS_USER(sock_net(sk),
UDP_MIB_CSUMERRORS, is_udplite);
UDP6_INC_STATS_USER(sock_net(sk),
UDP_MIB_INERRORS, is_udplite);
}
}
unlock_sock_fast(sk, slow);
/* starting over for a new packet, but check if we need to yield */
cond_resched();
msg->msg_flags &= ~MSG_TRUNC;
goto try_again;
} | 694 | True | 1 |
||
CVE-2015-8963 | False | False | False | True | AV:N/AC:H/Au:N/C:C/I:C/A:C | NETWORK | HIGH | NONE | COMPLETE | COMPLETE | COMPLETE | 7.6 | CVSS:3.0/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | HIGH | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.0 | HIGH | 1.0 | 5.9 | nan | [{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=12ca6ad2e3a896256f086497a7c7406a547ee373', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=12ca6ad2e3a896256f086497a7c7406a547ee373', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/12ca6ad2e3a896256f086497a7c7406a547ee373', 'name': 'https://github.com/torvalds/linux/commit/12ca6ad2e3a896256f086497a7c7406a547ee373', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://source.android.com/security/bulletin/2016-11-01.html', 'name': 'http://source.android.com/security/bulletin/2016-11-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94207', 'name': '94207', 'refsource': 'BID', '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:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.3.6', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Race condition in kernel/events/core.c in the Linux kernel before 4.4 allows local users to gain privileges or cause a denial of service (use-after-free) by leveraging incorrect handling of an swevent data structure during a CPU unplug operation.'}] | 2016-11-28T19:50Z | 2016-11-16T05:59Z | 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 | Peter Zijlstra | 2015-12-15 13:49:05+01:00 | perf: Fix race in swevent hash
There's a race on CPU unplug where we free the swevent hash array
while it can still have events on. This will result in a
use-after-free which is BAD.
Simply do not free the hash array on unplug. This leaves the thing
around and no use-after-free takes place.
When the last swevent dies, we do a for_each_possible_cpu() iteration
anyway to clean these up, at which time we'll free it, so no leakage
will occur.
Reported-by: Sasha Levin <sasha.levin@oracle.com>
Tested-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org> | 12ca6ad2e3a896256f086497a7c7406a547ee373 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | perf_event_exit_cpu | perf_event_exit_cpu( int cpu) | ['cpu'] | static void perf_event_exit_cpu(int cpu)
{
struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu);
perf_event_exit_cpu_context(cpu);
mutex_lock(&swhash->hlist_mutex);
swhash->online = false;
swevent_hlist_release(swhash);
mutex_unlock(&swhash->hlist_mutex);
} | 52 | True | 1 |
|
CVE-2015-8963 | False | False | False | True | AV:N/AC:H/Au:N/C:C/I:C/A:C | NETWORK | HIGH | NONE | COMPLETE | COMPLETE | COMPLETE | 7.6 | CVSS:3.0/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | HIGH | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.0 | HIGH | 1.0 | 5.9 | nan | [{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=12ca6ad2e3a896256f086497a7c7406a547ee373', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=12ca6ad2e3a896256f086497a7c7406a547ee373', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/12ca6ad2e3a896256f086497a7c7406a547ee373', 'name': 'https://github.com/torvalds/linux/commit/12ca6ad2e3a896256f086497a7c7406a547ee373', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://source.android.com/security/bulletin/2016-11-01.html', 'name': 'http://source.android.com/security/bulletin/2016-11-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94207', 'name': '94207', 'refsource': 'BID', '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:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.3.6', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Race condition in kernel/events/core.c in the Linux kernel before 4.4 allows local users to gain privileges or cause a denial of service (use-after-free) by leveraging incorrect handling of an swevent data structure during a CPU unplug operation.'}] | 2016-11-28T19:50Z | 2016-11-16T05:59Z | 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 | Peter Zijlstra | 2015-12-15 13:49:05+01:00 | perf: Fix race in swevent hash
There's a race on CPU unplug where we free the swevent hash array
while it can still have events on. This will result in a
use-after-free which is BAD.
Simply do not free the hash array on unplug. This leaves the thing
around and no use-after-free takes place.
When the last swevent dies, we do a for_each_possible_cpu() iteration
anyway to clean these up, at which time we'll free it, so no leakage
will occur.
Reported-by: Sasha Levin <sasha.levin@oracle.com>
Tested-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org> | 12ca6ad2e3a896256f086497a7c7406a547ee373 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | perf_event_exit_cpu | perf_event_exit_cpu( int cpu) | ['cpu'] | static void perf_event_exit_cpu(int cpu)
{
struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu);
perf_event_exit_cpu_context(cpu);
mutex_lock(&swhash->hlist_mutex);
swhash->online = false;
swevent_hlist_release(swhash);
mutex_unlock(&swhash->hlist_mutex);
} | 52 | True | 1 |
|
CVE-2015-8963 | False | False | False | True | AV:N/AC:H/Au:N/C:C/I:C/A:C | NETWORK | HIGH | NONE | COMPLETE | COMPLETE | COMPLETE | 7.6 | CVSS:3.0/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | HIGH | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.0 | HIGH | 1.0 | 5.9 | nan | [{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=12ca6ad2e3a896256f086497a7c7406a547ee373', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=12ca6ad2e3a896256f086497a7c7406a547ee373', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/12ca6ad2e3a896256f086497a7c7406a547ee373', 'name': 'https://github.com/torvalds/linux/commit/12ca6ad2e3a896256f086497a7c7406a547ee373', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://source.android.com/security/bulletin/2016-11-01.html', 'name': 'http://source.android.com/security/bulletin/2016-11-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94207', 'name': '94207', 'refsource': 'BID', '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:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.3.6', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Race condition in kernel/events/core.c in the Linux kernel before 4.4 allows local users to gain privileges or cause a denial of service (use-after-free) by leveraging incorrect handling of an swevent data structure during a CPU unplug operation.'}] | 2016-11-28T19:50Z | 2016-11-16T05:59Z | 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 | Peter Zijlstra | 2015-12-15 13:49:05+01:00 | perf: Fix race in swevent hash
There's a race on CPU unplug where we free the swevent hash array
while it can still have events on. This will result in a
use-after-free which is BAD.
Simply do not free the hash array on unplug. This leaves the thing
around and no use-after-free takes place.
When the last swevent dies, we do a for_each_possible_cpu() iteration
anyway to clean these up, at which time we'll free it, so no leakage
will occur.
Reported-by: Sasha Levin <sasha.levin@oracle.com>
Tested-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org> | 12ca6ad2e3a896256f086497a7c7406a547ee373 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | perf_event_init_cpu | perf_event_init_cpu( int cpu) | ['cpu'] | static void perf_event_init_cpu(int cpu)
{
struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu);
mutex_lock(&swhash->hlist_mutex);
swhash->online = true;
if (swhash->hlist_refcount > 0) {
struct swevent_hlist *hlist;
hlist = kzalloc_node(sizeof(*hlist), GFP_KERNEL, cpu_to_node(cpu));
WARN_ON(!hlist);
rcu_assign_pointer(swhash->swevent_hlist, hlist);
}
mutex_unlock(&swhash->hlist_mutex);
} | 90 | True | 1 |
|
CVE-2015-8963 | False | False | False | True | AV:N/AC:H/Au:N/C:C/I:C/A:C | NETWORK | HIGH | NONE | COMPLETE | COMPLETE | COMPLETE | 7.6 | CVSS:3.0/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | HIGH | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.0 | HIGH | 1.0 | 5.9 | nan | [{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=12ca6ad2e3a896256f086497a7c7406a547ee373', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=12ca6ad2e3a896256f086497a7c7406a547ee373', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/12ca6ad2e3a896256f086497a7c7406a547ee373', 'name': 'https://github.com/torvalds/linux/commit/12ca6ad2e3a896256f086497a7c7406a547ee373', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://source.android.com/security/bulletin/2016-11-01.html', 'name': 'http://source.android.com/security/bulletin/2016-11-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94207', 'name': '94207', 'refsource': 'BID', '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:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.3.6', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Race condition in kernel/events/core.c in the Linux kernel before 4.4 allows local users to gain privileges or cause a denial of service (use-after-free) by leveraging incorrect handling of an swevent data structure during a CPU unplug operation.'}] | 2016-11-28T19:50Z | 2016-11-16T05:59Z | 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 | Peter Zijlstra | 2015-12-15 13:49:05+01:00 | perf: Fix race in swevent hash
There's a race on CPU unplug where we free the swevent hash array
while it can still have events on. This will result in a
use-after-free which is BAD.
Simply do not free the hash array on unplug. This leaves the thing
around and no use-after-free takes place.
When the last swevent dies, we do a for_each_possible_cpu() iteration
anyway to clean these up, at which time we'll free it, so no leakage
will occur.
Reported-by: Sasha Levin <sasha.levin@oracle.com>
Tested-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org> | 12ca6ad2e3a896256f086497a7c7406a547ee373 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | perf_event_init_cpu | perf_event_init_cpu( int cpu) | ['cpu'] | static void perf_event_init_cpu(int cpu)
{
struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu);
mutex_lock(&swhash->hlist_mutex);
swhash->online = true;
if (swhash->hlist_refcount > 0) {
struct swevent_hlist *hlist;
hlist = kzalloc_node(sizeof(*hlist), GFP_KERNEL, cpu_to_node(cpu));
WARN_ON(!hlist);
rcu_assign_pointer(swhash->swevent_hlist, hlist);
}
mutex_unlock(&swhash->hlist_mutex);
} | 90 | True | 1 |
|
CVE-2015-8963 | False | False | False | True | AV:N/AC:H/Au:N/C:C/I:C/A:C | NETWORK | HIGH | NONE | COMPLETE | COMPLETE | COMPLETE | 7.6 | CVSS:3.0/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | HIGH | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.0 | HIGH | 1.0 | 5.9 | nan | [{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=12ca6ad2e3a896256f086497a7c7406a547ee373', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=12ca6ad2e3a896256f086497a7c7406a547ee373', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/12ca6ad2e3a896256f086497a7c7406a547ee373', 'name': 'https://github.com/torvalds/linux/commit/12ca6ad2e3a896256f086497a7c7406a547ee373', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://source.android.com/security/bulletin/2016-11-01.html', 'name': 'http://source.android.com/security/bulletin/2016-11-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94207', 'name': '94207', 'refsource': 'BID', '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:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.3.6', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Race condition in kernel/events/core.c in the Linux kernel before 4.4 allows local users to gain privileges or cause a denial of service (use-after-free) by leveraging incorrect handling of an swevent data structure during a CPU unplug operation.'}] | 2016-11-28T19:50Z | 2016-11-16T05:59Z | 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 | Peter Zijlstra | 2015-12-15 13:49:05+01:00 | perf: Fix race in swevent hash
There's a race on CPU unplug where we free the swevent hash array
while it can still have events on. This will result in a
use-after-free which is BAD.
Simply do not free the hash array on unplug. This leaves the thing
around and no use-after-free takes place.
When the last swevent dies, we do a for_each_possible_cpu() iteration
anyway to clean these up, at which time we'll free it, so no leakage
will occur.
Reported-by: Sasha Levin <sasha.levin@oracle.com>
Tested-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org> | 12ca6ad2e3a896256f086497a7c7406a547ee373 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | perf_swevent_add | perf_swevent_add( struct perf_event * event , int flags) | ['event', 'flags'] | static int perf_swevent_add(struct perf_event *event, int flags)
{
struct swevent_htable *swhash = this_cpu_ptr(&swevent_htable);
struct hw_perf_event *hwc = &event->hw;
struct hlist_head *head;
if (is_sampling_event(event)) {
hwc->last_period = hwc->sample_period;
perf_swevent_set_period(event);
}
hwc->state = !(flags & PERF_EF_START);
head = find_swevent_head(swhash, event);
if (!head) {
/*
* We can race with cpu hotplug code. Do not
* WARN if the cpu just got unplugged.
*/
WARN_ON_ONCE(swhash->online);
return -EINVAL;
}
hlist_add_head_rcu(&event->hlist_entry, head);
perf_event_update_userpage(event);
return 0;
} | 116 | True | 1 |
|
CVE-2015-8963 | False | False | False | True | AV:N/AC:H/Au:N/C:C/I:C/A:C | NETWORK | HIGH | NONE | COMPLETE | COMPLETE | COMPLETE | 7.6 | CVSS:3.0/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | HIGH | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.0 | HIGH | 1.0 | 5.9 | nan | [{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=12ca6ad2e3a896256f086497a7c7406a547ee373', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=12ca6ad2e3a896256f086497a7c7406a547ee373', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/12ca6ad2e3a896256f086497a7c7406a547ee373', 'name': 'https://github.com/torvalds/linux/commit/12ca6ad2e3a896256f086497a7c7406a547ee373', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://source.android.com/security/bulletin/2016-11-01.html', 'name': 'http://source.android.com/security/bulletin/2016-11-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94207', 'name': '94207', 'refsource': 'BID', '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:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.3.6', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Race condition in kernel/events/core.c in the Linux kernel before 4.4 allows local users to gain privileges or cause a denial of service (use-after-free) by leveraging incorrect handling of an swevent data structure during a CPU unplug operation.'}] | 2016-11-28T19:50Z | 2016-11-16T05:59Z | 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 | Peter Zijlstra | 2015-12-15 13:49:05+01:00 | perf: Fix race in swevent hash
There's a race on CPU unplug where we free the swevent hash array
while it can still have events on. This will result in a
use-after-free which is BAD.
Simply do not free the hash array on unplug. This leaves the thing
around and no use-after-free takes place.
When the last swevent dies, we do a for_each_possible_cpu() iteration
anyway to clean these up, at which time we'll free it, so no leakage
will occur.
Reported-by: Sasha Levin <sasha.levin@oracle.com>
Tested-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org> | 12ca6ad2e3a896256f086497a7c7406a547ee373 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | perf_swevent_add | perf_swevent_add( struct perf_event * event , int flags) | ['event', 'flags'] | static int perf_swevent_add(struct perf_event *event, int flags)
{
struct swevent_htable *swhash = this_cpu_ptr(&swevent_htable);
struct hw_perf_event *hwc = &event->hw;
struct hlist_head *head;
if (is_sampling_event(event)) {
hwc->last_period = hwc->sample_period;
perf_swevent_set_period(event);
}
hwc->state = !(flags & PERF_EF_START);
head = find_swevent_head(swhash, event);
if (!head) {
/*
* We can race with cpu hotplug code. Do not
* WARN if the cpu just got unplugged.
*/
WARN_ON_ONCE(swhash->online);
return -EINVAL;
}
hlist_add_head_rcu(&event->hlist_entry, head);
perf_event_update_userpage(event);
return 0;
} | 116 | True | 1 |
|
CVE-2015-8963 | False | False | False | True | AV:N/AC:H/Au:N/C:C/I:C/A:C | NETWORK | HIGH | NONE | COMPLETE | COMPLETE | COMPLETE | 7.6 | CVSS:3.0/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | HIGH | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.0 | HIGH | 1.0 | 5.9 | nan | [{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=12ca6ad2e3a896256f086497a7c7406a547ee373', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=12ca6ad2e3a896256f086497a7c7406a547ee373', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/12ca6ad2e3a896256f086497a7c7406a547ee373', 'name': 'https://github.com/torvalds/linux/commit/12ca6ad2e3a896256f086497a7c7406a547ee373', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://source.android.com/security/bulletin/2016-11-01.html', 'name': 'http://source.android.com/security/bulletin/2016-11-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94207', 'name': '94207', 'refsource': 'BID', '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:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.3.6', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Race condition in kernel/events/core.c in the Linux kernel before 4.4 allows local users to gain privileges or cause a denial of service (use-after-free) by leveraging incorrect handling of an swevent data structure during a CPU unplug operation.'}] | 2016-11-28T19:50Z | 2016-11-16T05:59Z | 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 | Peter Zijlstra | 2015-12-15 13:49:05+01:00 | perf: Fix race in swevent hash
There's a race on CPU unplug where we free the swevent hash array
while it can still have events on. This will result in a
use-after-free which is BAD.
Simply do not free the hash array on unplug. This leaves the thing
around and no use-after-free takes place.
When the last swevent dies, we do a for_each_possible_cpu() iteration
anyway to clean these up, at which time we'll free it, so no leakage
will occur.
Reported-by: Sasha Levin <sasha.levin@oracle.com>
Tested-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org> | 12ca6ad2e3a896256f086497a7c7406a547ee373 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | swevent_hlist_get_cpu | swevent_hlist_get_cpu( struct perf_event * event , int cpu) | ['event', 'cpu'] | static int swevent_hlist_get_cpu(struct perf_event *event, int cpu)
{
struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu);
int err = 0;
mutex_lock(&swhash->hlist_mutex);
if (!swevent_hlist_deref(swhash) && cpu_online(cpu)) {
struct swevent_hlist *hlist;
hlist = kzalloc(sizeof(*hlist), GFP_KERNEL);
if (!hlist) {
err = -ENOMEM;
goto exit;
}
rcu_assign_pointer(swhash->swevent_hlist, hlist);
}
swhash->hlist_refcount++;
exit:
mutex_unlock(&swhash->hlist_mutex);
return err;
} | 113 | True | 1 |
|
CVE-2015-8963 | False | False | False | True | AV:N/AC:H/Au:N/C:C/I:C/A:C | NETWORK | HIGH | NONE | COMPLETE | COMPLETE | COMPLETE | 7.6 | CVSS:3.0/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | HIGH | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.0 | HIGH | 1.0 | 5.9 | nan | [{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=12ca6ad2e3a896256f086497a7c7406a547ee373', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=12ca6ad2e3a896256f086497a7c7406a547ee373', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/12ca6ad2e3a896256f086497a7c7406a547ee373', 'name': 'https://github.com/torvalds/linux/commit/12ca6ad2e3a896256f086497a7c7406a547ee373', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://source.android.com/security/bulletin/2016-11-01.html', 'name': 'http://source.android.com/security/bulletin/2016-11-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94207', 'name': '94207', 'refsource': 'BID', '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:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.3.6', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Race condition in kernel/events/core.c in the Linux kernel before 4.4 allows local users to gain privileges or cause a denial of service (use-after-free) by leveraging incorrect handling of an swevent data structure during a CPU unplug operation.'}] | 2016-11-28T19:50Z | 2016-11-16T05:59Z | 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 | Peter Zijlstra | 2015-12-15 13:49:05+01:00 | perf: Fix race in swevent hash
There's a race on CPU unplug where we free the swevent hash array
while it can still have events on. This will result in a
use-after-free which is BAD.
Simply do not free the hash array on unplug. This leaves the thing
around and no use-after-free takes place.
When the last swevent dies, we do a for_each_possible_cpu() iteration
anyway to clean these up, at which time we'll free it, so no leakage
will occur.
Reported-by: Sasha Levin <sasha.levin@oracle.com>
Tested-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org> | 12ca6ad2e3a896256f086497a7c7406a547ee373 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | swevent_hlist_get_cpu | swevent_hlist_get_cpu( struct perf_event * event , int cpu) | ['event', 'cpu'] | static int swevent_hlist_get_cpu(struct perf_event *event, int cpu)
{
struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu);
int err = 0;
mutex_lock(&swhash->hlist_mutex);
if (!swevent_hlist_deref(swhash) && cpu_online(cpu)) {
struct swevent_hlist *hlist;
hlist = kzalloc(sizeof(*hlist), GFP_KERNEL);
if (!hlist) {
err = -ENOMEM;
goto exit;
}
rcu_assign_pointer(swhash->swevent_hlist, hlist);
}
swhash->hlist_refcount++;
exit:
mutex_unlock(&swhash->hlist_mutex);
return err;
} | 113 | True | 1 |
|
CVE-2013-4312 | 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:N/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 6.2 | MEDIUM | 2.5 | 3.6 | nan | [{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1297813', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1297813', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/712f4aad406bb1ed67f3f98d04c044191f0ff593', 'name': 'https://github.com/torvalds/linux/commit/712f4aad406bb1ed67f3f98d04c044191f0ff593', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=712f4aad406bb1ed67f3f98d04c044191f0ff593', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=712f4aad406bb1ed67f3f98d04c044191f0ff593', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://security-tracker.debian.org/tracker/CVE-2013-4312', 'name': 'https://security-tracker.debian.org/tracker/CVE-2013-4312', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-0855.html', 'name': 'RHSA-2016:0855', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/82986', 'name': '82986', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2931-1', 'name': 'USN-2931-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-1', 'name': 'USN-2929-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-2', 'name': 'USN-2929-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2016-February/176484.html', 'name': 'FEDORA-2016-5d43766e33', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2016-February/176464.html', 'name': 'FEDORA-2016-2f25d12c51', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3448', 'name': 'DSA-3448', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2584.html', 'name': 'RHSA-2016:2584', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2574.html', 'name': 'RHSA-2016:2574', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:oracle:linux:5.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:oracle:linux:6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:oracle:linux:7:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The Linux kernel before 4.4.1 allows local users to bypass file-descriptor limits and cause a denial of service (memory consumption) by sending each descriptor over a UNIX socket before closing it, related to net/unix/af_unix.c and net/unix/garbage.c.'}] | 2019-12-27T16:08Z | 2016-02-08T03:59Z | 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 | willy tarreau | 2016-01-10 07:54:56+01:00 | unix: properly account for FDs passed over unix sockets
It is possible for a process to allocate and accumulate far more FDs than
the process' limit by sending them over a unix socket then closing them
to keep the process' fd count low.
This change addresses this problem by keeping track of the number of FDs
in flight per user and preventing non-privileged processes from having
more FDs in flight than their configured FD limit.
Reported-by: socketpair@gmail.com
Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Mitigates: CVE-2013-4312 (Linux 2.0+)
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: David S. Miller <davem@davemloft.net> | 712f4aad406bb1ed67f3f98d04c044191f0ff593 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | unix_attach_fds | unix_attach_fds( struct scm_cookie * scm , struct sk_buff * skb) | ['scm', 'skb'] | static int unix_attach_fds(struct scm_cookie *scm, struct sk_buff *skb)
{
int i;
unsigned char max_level = 0;
int unix_sock_count = 0;
for (i = scm->fp->count - 1; i >= 0; i--) {
struct sock *sk = unix_get_socket(scm->fp->fp[i]);
if (sk) {
unix_sock_count++;
max_level = max(max_level,
unix_sk(sk)->recursion_level);
}
}
if (unlikely(max_level > MAX_RECURSION_LEVEL))
return -ETOOMANYREFS;
/*
* Need to duplicate file references for the sake of garbage
* collection. Otherwise a socket in the fps might become a
* candidate for GC while the skb is not yet queued.
*/
UNIXCB(skb).fp = scm_fp_dup(scm->fp);
if (!UNIXCB(skb).fp)
return -ENOMEM;
if (unix_sock_count) {
for (i = scm->fp->count - 1; i >= 0; i--)
unix_inflight(scm->fp->fp[i]);
}
return max_level;
} | 170 | True | 1 |
|
CVE-2013-4312 | 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:N/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 6.2 | MEDIUM | 2.5 | 3.6 | nan | [{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1297813', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1297813', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/712f4aad406bb1ed67f3f98d04c044191f0ff593', 'name': 'https://github.com/torvalds/linux/commit/712f4aad406bb1ed67f3f98d04c044191f0ff593', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=712f4aad406bb1ed67f3f98d04c044191f0ff593', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=712f4aad406bb1ed67f3f98d04c044191f0ff593', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://security-tracker.debian.org/tracker/CVE-2013-4312', 'name': 'https://security-tracker.debian.org/tracker/CVE-2013-4312', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-0855.html', 'name': 'RHSA-2016:0855', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/82986', 'name': '82986', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2931-1', 'name': 'USN-2931-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-1', 'name': 'USN-2929-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-2', 'name': 'USN-2929-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2016-February/176484.html', 'name': 'FEDORA-2016-5d43766e33', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2016-February/176464.html', 'name': 'FEDORA-2016-2f25d12c51', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3448', 'name': 'DSA-3448', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2584.html', 'name': 'RHSA-2016:2584', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2574.html', 'name': 'RHSA-2016:2574', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:oracle:linux:5.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:oracle:linux:6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:oracle:linux:7:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The Linux kernel before 4.4.1 allows local users to bypass file-descriptor limits and cause a denial of service (memory consumption) by sending each descriptor over a UNIX socket before closing it, related to net/unix/af_unix.c and net/unix/garbage.c.'}] | 2019-12-27T16:08Z | 2016-02-08T03:59Z | 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 | willy tarreau | 2016-01-10 07:54:56+01:00 | unix: properly account for FDs passed over unix sockets
It is possible for a process to allocate and accumulate far more FDs than
the process' limit by sending them over a unix socket then closing them
to keep the process' fd count low.
This change addresses this problem by keeping track of the number of FDs
in flight per user and preventing non-privileged processes from having
more FDs in flight than their configured FD limit.
Reported-by: socketpair@gmail.com
Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Mitigates: CVE-2013-4312 (Linux 2.0+)
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: David S. Miller <davem@davemloft.net> | 712f4aad406bb1ed67f3f98d04c044191f0ff593 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | unix_inflight | unix_inflight( struct file * fp) | ['fp'] | void unix_inflight(struct file *fp)
{
struct sock *s = unix_get_socket(fp);
if (s) {
struct unix_sock *u = unix_sk(s);
spin_lock(&unix_gc_lock);
if (atomic_long_inc_return(&u->inflight) == 1) {
BUG_ON(!list_empty(&u->link));
list_add_tail(&u->link, &gc_inflight_list);
} else {
BUG_ON(list_empty(&u->link));
}
unix_tot_inflight++;
spin_unlock(&unix_gc_lock);
}
} | 101 | True | 1 |
|
CVE-2013-4312 | 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:N/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 6.2 | MEDIUM | 2.5 | 3.6 | nan | [{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1297813', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1297813', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/712f4aad406bb1ed67f3f98d04c044191f0ff593', 'name': 'https://github.com/torvalds/linux/commit/712f4aad406bb1ed67f3f98d04c044191f0ff593', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=712f4aad406bb1ed67f3f98d04c044191f0ff593', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=712f4aad406bb1ed67f3f98d04c044191f0ff593', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://security-tracker.debian.org/tracker/CVE-2013-4312', 'name': 'https://security-tracker.debian.org/tracker/CVE-2013-4312', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-0855.html', 'name': 'RHSA-2016:0855', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/82986', 'name': '82986', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2931-1', 'name': 'USN-2931-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-1', 'name': 'USN-2929-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-2', 'name': 'USN-2929-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2016-February/176484.html', 'name': 'FEDORA-2016-5d43766e33', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2016-February/176464.html', 'name': 'FEDORA-2016-2f25d12c51', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3448', 'name': 'DSA-3448', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2584.html', 'name': 'RHSA-2016:2584', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2574.html', 'name': 'RHSA-2016:2574', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-119'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:oracle:linux:5.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:oracle:linux:6:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:oracle:linux:7:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The Linux kernel before 4.4.1 allows local users to bypass file-descriptor limits and cause a denial of service (memory consumption) by sending each descriptor over a UNIX socket before closing it, related to net/unix/af_unix.c and net/unix/garbage.c.'}] | 2019-12-27T16:08Z | 2016-02-08T03:59Z | 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 | willy tarreau | 2016-01-10 07:54:56+01:00 | unix: properly account for FDs passed over unix sockets
It is possible for a process to allocate and accumulate far more FDs than
the process' limit by sending them over a unix socket then closing them
to keep the process' fd count low.
This change addresses this problem by keeping track of the number of FDs
in flight per user and preventing non-privileged processes from having
more FDs in flight than their configured FD limit.
Reported-by: socketpair@gmail.com
Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Mitigates: CVE-2013-4312 (Linux 2.0+)
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: David S. Miller <davem@davemloft.net> | 712f4aad406bb1ed67f3f98d04c044191f0ff593 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | unix_notinflight | unix_notinflight( struct file * fp) | ['fp'] | void unix_notinflight(struct file *fp)
{
struct sock *s = unix_get_socket(fp);
if (s) {
struct unix_sock *u = unix_sk(s);
spin_lock(&unix_gc_lock);
BUG_ON(list_empty(&u->link));
if (atomic_long_dec_and_test(&u->inflight))
list_del_init(&u->link);
unix_tot_inflight--;
spin_unlock(&unix_gc_lock);
}
} | 79 | True | 1 |
|
CVE-2016-2069 | 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:H/I:H/A:H | LOCAL | HIGH | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 7.4 | HIGH | 1.4 | 5.9 | nan | [{'url': 'http://www.openwall.com/lists/oss-security/2016/01/25/1', 'name': '[oss-security] 20160124 CVE Request: x86 Linux TLB flush bug', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1301893', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1301893', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=71b3c126e61177eb693423f2e18a1914205b165e', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=71b3c126e61177eb693423f2e18a1914205b165e', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/71b3c126e61177eb693423f2e18a1914205b165e', 'name': 'https://github.com/torvalds/linux/commit/71b3c126e61177eb693423f2e18a1914205b165e', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2998-1', 'name': 'USN-2998-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2989-1', 'name': 'USN-2989-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinoct2016-3090547.html', 'name': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinoct2016-3090547.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/81809', 'name': '81809', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00015.html', 'name': 'openSUSE-SU-2016:1008', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2931-1', 'name': 'USN-2931-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00094.html', 'name': 'SUSE-SU-2016:0911', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00045.html', 'name': 'SUSE-SU-2016:1102', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2017-0817.html', 'name': 'RHSA-2017:0817', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2584.html', 'name': 'RHSA-2016:2584', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2574.html', 'name': 'RHSA-2016:2574', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}]}] | MEDIUM | [{'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:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Race condition in arch/x86/mm/tlb.c in the Linux kernel before 4.4.1 allows local users to gain privileges by triggering access to a paging structure by a different CPU.'}] | 2018-01-05T02:30Z | 2016-04-27T17:59Z | 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 | Andy Lutomirski | 2016-01-06 12:21:01-08:00 | x86/mm: Add barriers and document switch_mm()-vs-flush synchronization
When switch_mm() activates a new PGD, it also sets a bit that
tells other CPUs that the PGD is in use so that TLB flush IPIs
will be sent. In order for that to work correctly, the bit
needs to be visible prior to loading the PGD and therefore
starting to fill the local TLB.
Document all the barriers that make this work correctly and add
a couple that were missing.
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mm@kvack.org
Cc: stable@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org> | 71b3c126e61177eb693423f2e18a1914205b165e | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | switch_mm | switch_mm( struct mm_struct * prev , struct mm_struct * next , struct task_struct * tsk) | ['prev', 'next', 'tsk'] | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
struct task_struct *tsk)
{
unsigned cpu = smp_processor_id();
if (likely(prev != next)) {
#ifdef CONFIG_SMP
this_cpu_write(cpu_tlbstate.state, TLBSTATE_OK);
this_cpu_write(cpu_tlbstate.active_mm, next);
#endif
cpumask_set_cpu(cpu, mm_cpumask(next));
/* Re-load page tables */
load_cr3(next->pgd);
trace_tlb_flush(TLB_FLUSH_ON_TASK_SWITCH, TLB_FLUSH_ALL);
/* Stop flush ipis for the previous mm */
cpumask_clear_cpu(cpu, mm_cpumask(prev));
/* Load per-mm CR4 state */
load_mm_cr4(next);
#ifdef CONFIG_MODIFY_LDT_SYSCALL
/*
* Load the LDT, if the LDT is different.
*
* It's possible that prev->context.ldt doesn't match
* the LDT register. This can happen if leave_mm(prev)
* was called and then modify_ldt changed
* prev->context.ldt but suppressed an IPI to this CPU.
* In this case, prev->context.ldt != NULL, because we
* never set context.ldt to NULL while the mm still
* exists. That means that next->context.ldt !=
* prev->context.ldt, because mms never share an LDT.
*/
if (unlikely(prev->context.ldt != next->context.ldt))
load_mm_ldt(next);
#endif
}
#ifdef CONFIG_SMP
else {
this_cpu_write(cpu_tlbstate.state, TLBSTATE_OK);
BUG_ON(this_cpu_read(cpu_tlbstate.active_mm) != next);
if (!cpumask_test_cpu(cpu, mm_cpumask(next))) {
/*
* On established mms, the mm_cpumask is only changed
* from irq context, from ptep_clear_flush() while in
* lazy tlb mode, and here. Irqs are blocked during
* schedule, protecting us from simultaneous changes.
*/
cpumask_set_cpu(cpu, mm_cpumask(next));
/*
* We were in lazy tlb mode and leave_mm disabled
* tlb flush IPI delivery. We must reload CR3
* to make sure to use no freed page tables.
*/
load_cr3(next->pgd);
trace_tlb_flush(TLB_FLUSH_ON_TASK_SWITCH, TLB_FLUSH_ALL);
load_mm_cr4(next);
load_mm_ldt(next);
}
}
#endif
} | 189 | True | 1 |
|
CVE-2016-2069 | 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:H/I:H/A:H | LOCAL | HIGH | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 7.4 | HIGH | 1.4 | 5.9 | nan | [{'url': 'http://www.openwall.com/lists/oss-security/2016/01/25/1', 'name': '[oss-security] 20160124 CVE Request: x86 Linux TLB flush bug', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1301893', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1301893', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=71b3c126e61177eb693423f2e18a1914205b165e', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=71b3c126e61177eb693423f2e18a1914205b165e', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/71b3c126e61177eb693423f2e18a1914205b165e', 'name': 'https://github.com/torvalds/linux/commit/71b3c126e61177eb693423f2e18a1914205b165e', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2998-1', 'name': 'USN-2998-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2989-1', 'name': 'USN-2989-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinoct2016-3090547.html', 'name': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinoct2016-3090547.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/81809', 'name': '81809', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00015.html', 'name': 'openSUSE-SU-2016:1008', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2931-1', 'name': 'USN-2931-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00094.html', 'name': 'SUSE-SU-2016:0911', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00045.html', 'name': 'SUSE-SU-2016:1102', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2017-0817.html', 'name': 'RHSA-2017:0817', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2584.html', 'name': 'RHSA-2016:2584', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2574.html', 'name': 'RHSA-2016:2574', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}]}] | MEDIUM | [{'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:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Race condition in arch/x86/mm/tlb.c in the Linux kernel before 4.4.1 allows local users to gain privileges by triggering access to a paging structure by a different CPU.'}] | 2018-01-05T02:30Z | 2016-04-27T17:59Z | 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 | Andy Lutomirski | 2016-01-06 12:21:01-08:00 | x86/mm: Add barriers and document switch_mm()-vs-flush synchronization
When switch_mm() activates a new PGD, it also sets a bit that
tells other CPUs that the PGD is in use so that TLB flush IPIs
will be sent. In order for that to work correctly, the bit
needs to be visible prior to loading the PGD and therefore
starting to fill the local TLB.
Document all the barriers that make this work correctly and add
a couple that were missing.
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mm@kvack.org
Cc: stable@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org> | 71b3c126e61177eb693423f2e18a1914205b165e | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | flush_tlb_mm_range | flush_tlb_mm_range( struct mm_struct * mm , unsigned long start , unsigned long end , unsigned long vmflag) | ['mm', 'start', 'end', 'vmflag'] | void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,
unsigned long end, unsigned long vmflag)
{
unsigned long addr;
/* do a global flush by default */
unsigned long base_pages_to_flush = TLB_FLUSH_ALL;
preempt_disable();
if (current->active_mm != mm)
goto out;
if (!current->mm) {
leave_mm(smp_processor_id());
goto out;
}
if ((end != TLB_FLUSH_ALL) && !(vmflag & VM_HUGETLB))
base_pages_to_flush = (end - start) >> PAGE_SHIFT;
if (base_pages_to_flush > tlb_single_page_flush_ceiling) {
base_pages_to_flush = TLB_FLUSH_ALL;
count_vm_tlb_event(NR_TLB_LOCAL_FLUSH_ALL);
local_flush_tlb();
} else {
/* flush range by one by one 'invlpg' */
for (addr = start; addr < end; addr += PAGE_SIZE) {
count_vm_tlb_event(NR_TLB_LOCAL_FLUSH_ONE);
__flush_tlb_single(addr);
}
}
trace_tlb_flush(TLB_LOCAL_MM_SHOOTDOWN, base_pages_to_flush);
out:
if (base_pages_to_flush == TLB_FLUSH_ALL) {
start = 0UL;
end = TLB_FLUSH_ALL;
}
if (cpumask_any_but(mm_cpumask(mm), smp_processor_id()) < nr_cpu_ids)
flush_tlb_others(mm_cpumask(mm), mm, start, end);
preempt_enable();
} | 200 | True | 1 |
|
CVE-2016-2069 | 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:H/I:H/A:H | LOCAL | HIGH | NONE | NONE | UNCHANGED | HIGH | HIGH | HIGH | 7.4 | HIGH | 1.4 | 5.9 | nan | [{'url': 'http://www.openwall.com/lists/oss-security/2016/01/25/1', 'name': '[oss-security] 20160124 CVE Request: x86 Linux TLB flush bug', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1301893', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1301893', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=71b3c126e61177eb693423f2e18a1914205b165e', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=71b3c126e61177eb693423f2e18a1914205b165e', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/71b3c126e61177eb693423f2e18a1914205b165e', 'name': 'https://github.com/torvalds/linux/commit/71b3c126e61177eb693423f2e18a1914205b165e', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2998-1', 'name': 'USN-2998-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2989-1', 'name': 'USN-2989-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinoct2016-3090547.html', 'name': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinoct2016-3090547.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/81809', 'name': '81809', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00015.html', 'name': 'openSUSE-SU-2016:1008', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2931-1', 'name': 'USN-2931-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00094.html', 'name': 'SUSE-SU-2016:0911', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00045.html', 'name': 'SUSE-SU-2016:1102', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2017-0817.html', 'name': 'RHSA-2017:0817', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2584.html', 'name': 'RHSA-2016:2584', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2574.html', 'name': 'RHSA-2016:2574', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}]}] | MEDIUM | [{'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:14.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Race condition in arch/x86/mm/tlb.c in the Linux kernel before 4.4.1 allows local users to gain privileges by triggering access to a paging structure by a different CPU.'}] | 2018-01-05T02:30Z | 2016-04-27T17:59Z | 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 | Andy Lutomirski | 2016-01-06 12:21:01-08:00 | x86/mm: Add barriers and document switch_mm()-vs-flush synchronization
When switch_mm() activates a new PGD, it also sets a bit that
tells other CPUs that the PGD is in use so that TLB flush IPIs
will be sent. In order for that to work correctly, the bit
needs to be visible prior to loading the PGD and therefore
starting to fill the local TLB.
Document all the barriers that make this work correctly and add
a couple that were missing.
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mm@kvack.org
Cc: stable@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org> | 71b3c126e61177eb693423f2e18a1914205b165e | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | flush_tlb_page | flush_tlb_page( struct vm_area_struct * vma , unsigned long start) | ['vma', 'start'] | void flush_tlb_page(struct vm_area_struct *vma, unsigned long start)
{
struct mm_struct *mm = vma->vm_mm;
preempt_disable();
if (current->active_mm == mm) {
if (current->mm)
__flush_tlb_one(start);
else
leave_mm(smp_processor_id());
}
if (cpumask_any_but(mm_cpumask(mm), smp_processor_id()) < nr_cpu_ids)
flush_tlb_others(mm_cpumask(mm), mm, start, 0UL);
preempt_enable();
} | 89 | True | 1 |
|
CVE-2016-2543 | 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:N/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 6.2 | MEDIUM | 2.5 | 3.6 | nan | [{'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/01/19/1', 'name': '[oss-security] 20160119 Security bugs in Linux kernel sound subsystem', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311554', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311554', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=030e2c78d3a91dd0d27fef37e91950dde333eba1', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=030e2c78d3a91dd0d27fef37e91950dde333eba1', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/030e2c78d3a91dd0d27fef37e91950dde333eba1', 'name': 'https://github.com/torvalds/linux/commit/030e2c78d3a91dd0d27fef37e91950dde333eba1', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/83377', 'name': '83377', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-1', 'name': 'USN-2930-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2931-1', 'name': 'USN-2931-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-1', 'name': 'USN-2929-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-3', 'name': 'USN-2930-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-2', 'name': 'USN-2930-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-2', 'name': 'USN-2929-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00094.html', 'name': 'SUSE-SU-2016:0911', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00045.html', 'name': 'SUSE-SU-2016:1102', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1035304', 'name': '1035304', 'refsource': 'SECTRACK', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The snd_seq_ioctl_remove_events function in sound/core/seq/seq_clientmgr.c in the Linux kernel before 4.4.1 does not verify FIFO assignment before proceeding with FIFO clearing, which allows local users to cause a denial of service (NULL pointer dereference and OOPS) via a crafted ioctl call.'}] | 2017-09-07T01:29Z | 2016-04-27T17:59Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Takashi Iwai | 2016-01-12 12:38:02+01:00 | ALSA: seq: Fix missing NULL check at remove_events ioctl
snd_seq_ioctl_remove_events() calls snd_seq_fifo_clear()
unconditionally even if there is no FIFO assigned, and this leads to
an Oops due to NULL dereference. The fix is just to add a proper NULL
check.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Tested-by: Dmitry Vyukov <dvyukov@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | 030e2c78d3a91dd0d27fef37e91950dde333eba1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | snd_seq_ioctl_remove_events | snd_seq_ioctl_remove_events( struct snd_seq_client * client , void __user * arg) | ['client', 'arg'] | static int snd_seq_ioctl_remove_events(struct snd_seq_client *client,
void __user *arg)
{
struct snd_seq_remove_events info;
if (copy_from_user(&info, arg, sizeof(info)))
return -EFAULT;
/*
* Input mostly not implemented XXX.
*/
if (info.remove_mode & SNDRV_SEQ_REMOVE_INPUT) {
/*
* No restrictions so for a user client we can clear
* the whole fifo
*/
if (client->type == USER_CLIENT)
snd_seq_fifo_clear(client->data.user.fifo);
}
if (info.remove_mode & SNDRV_SEQ_REMOVE_OUTPUT)
snd_seq_queue_remove_cells(client->number, &info);
return 0;
} | 87 | True | 1 |
|
CVE-2016-2545 | 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.0/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H | LOCAL | HIGH | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 5.1 | MEDIUM | 1.4 | 3.6 | nan | [{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311560', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311560', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2016/01/19/1', 'name': '[oss-security] 20160119 Security bugs in Linux kernel sound subsystem', 'refsource': 'MLIST', 'tags': ['Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ee8413b01045c74340aa13ad5bdf905de32be736', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ee8413b01045c74340aa13ad5bdf905de32be736', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/ee8413b01045c74340aa13ad5bdf905de32be736', 'name': 'https://github.com/torvalds/linux/commit/ee8413b01045c74340aa13ad5bdf905de32be736', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/83381', 'name': '83381', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-1', 'name': 'USN-2930-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2931-1', 'name': 'USN-2931-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-1', 'name': 'USN-2929-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-3', 'name': 'USN-2930-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-2', 'name': 'USN-2930-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-2', 'name': 'USN-2929-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00094.html', 'name': 'SUSE-SU-2016:0911', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00045.html', 'name': 'SUSE-SU-2016:1102', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1035296', 'name': '1035296', 'refsource': 'SECTRACK', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The snd_timer_interrupt function in sound/core/timer.c in the Linux kernel before 4.4.1 does not properly maintain a certain linked list, which allows local users to cause a denial of service (race condition and system crash) via a crafted ioctl call.'}] | 2017-09-07T01:29Z | 2016-04-27T17:59Z | 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 | Takashi Iwai | 2016-01-13 21:35:06+01:00 | ALSA: timer: Fix double unlink of active_list
ALSA timer instance object has a couple of linked lists and they are
unlinked unconditionally at snd_timer_stop(). Meanwhile
snd_timer_interrupt() unlinks it, but it calls list_del() which leaves
the element list itself unchanged. This ends up with unlinking twice,
and it was caught by syzkaller fuzzer.
The fix is to use list_del_init() variant properly there, too.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Tested-by: Dmitry Vyukov <dvyukov@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ee8413b01045c74340aa13ad5bdf905de32be736 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | snd_timer_interrupt | snd_timer_interrupt( struct snd_timer * timer , unsigned long ticks_left) | ['timer', 'ticks_left'] | void snd_timer_interrupt(struct snd_timer * timer, unsigned long ticks_left)
{
struct snd_timer_instance *ti, *ts, *tmp;
unsigned long resolution, ticks;
struct list_head *p, *ack_list_head;
unsigned long flags;
int use_tasklet = 0;
if (timer == NULL)
return;
spin_lock_irqsave(&timer->lock, flags);
/* remember the current resolution */
if (timer->hw.c_resolution)
resolution = timer->hw.c_resolution(timer);
else
resolution = timer->hw.resolution;
/* loop for all active instances
* Here we cannot use list_for_each_entry because the active_list of a
* processed instance is relinked to done_list_head before the callback
* is called.
*/
list_for_each_entry_safe(ti, tmp, &timer->active_list_head,
active_list) {
if (!(ti->flags & SNDRV_TIMER_IFLG_RUNNING))
continue;
ti->pticks += ticks_left;
ti->resolution = resolution;
if (ti->cticks < ticks_left)
ti->cticks = 0;
else
ti->cticks -= ticks_left;
if (ti->cticks) /* not expired */
continue;
if (ti->flags & SNDRV_TIMER_IFLG_AUTO) {
ti->cticks = ti->ticks;
} else {
ti->flags &= ~SNDRV_TIMER_IFLG_RUNNING;
if (--timer->running)
list_del(&ti->active_list);
}
if ((timer->hw.flags & SNDRV_TIMER_HW_TASKLET) ||
(ti->flags & SNDRV_TIMER_IFLG_FAST))
ack_list_head = &timer->ack_list_head;
else
ack_list_head = &timer->sack_list_head;
if (list_empty(&ti->ack_list))
list_add_tail(&ti->ack_list, ack_list_head);
list_for_each_entry(ts, &ti->slave_active_head, active_list) {
ts->pticks = ti->pticks;
ts->resolution = resolution;
if (list_empty(&ts->ack_list))
list_add_tail(&ts->ack_list, ack_list_head);
}
}
if (timer->flags & SNDRV_TIMER_FLG_RESCHED)
snd_timer_reschedule(timer, timer->sticks);
if (timer->running) {
if (timer->hw.flags & SNDRV_TIMER_HW_STOP) {
timer->hw.stop(timer);
timer->flags |= SNDRV_TIMER_FLG_CHANGE;
}
if (!(timer->hw.flags & SNDRV_TIMER_HW_AUTO) ||
(timer->flags & SNDRV_TIMER_FLG_CHANGE)) {
/* restart timer */
timer->flags &= ~SNDRV_TIMER_FLG_CHANGE;
timer->hw.start(timer);
}
} else {
timer->hw.stop(timer);
}
/* now process all fast callbacks */
while (!list_empty(&timer->ack_list_head)) {
p = timer->ack_list_head.next; /* get first item */
ti = list_entry(p, struct snd_timer_instance, ack_list);
/* remove from ack_list and make empty */
list_del_init(p);
ticks = ti->pticks;
ti->pticks = 0;
ti->flags |= SNDRV_TIMER_IFLG_CALLBACK;
spin_unlock(&timer->lock);
if (ti->callback)
ti->callback(ti, resolution, ticks);
spin_lock(&timer->lock);
ti->flags &= ~SNDRV_TIMER_IFLG_CALLBACK;
}
/* do we have any slow callbacks? */
use_tasklet = !list_empty(&timer->sack_list_head);
spin_unlock_irqrestore(&timer->lock, flags);
if (use_tasklet)
tasklet_schedule(&timer->task_queue);
} | 536 | True | 1 |
|
CVE-2016-2546 | 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.0/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H | LOCAL | HIGH | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 5.1 | MEDIUM | 1.4 | 3.6 | nan | [{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311564', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311564', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=af368027a49a751d6ff4ee9e3f9961f35bb4fede', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=af368027a49a751d6ff4ee9e3f9961f35bb4fede', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/01/19/1', 'name': '[oss-security] 20160119 Security bugs in Linux kernel sound subsystem', 'refsource': 'MLIST', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/af368027a49a751d6ff4ee9e3f9961f35bb4fede', 'name': 'https://github.com/torvalds/linux/commit/af368027a49a751d6ff4ee9e3f9961f35bb4fede', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'http://www.securityfocus.com/bid/83384', 'name': '83384', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-1', 'name': 'USN-2930-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2931-1', 'name': 'USN-2931-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-1', 'name': 'USN-2929-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-3', 'name': 'USN-2930-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-2', 'name': 'USN-2930-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-2', 'name': 'USN-2929-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00094.html', 'name': 'SUSE-SU-2016:0911', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00045.html', 'name': 'SUSE-SU-2016:1102', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1035301', 'name': '1035301', 'refsource': 'SECTRACK', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'sound/core/timer.c in the Linux kernel before 4.4.1 uses an incorrect type of mutex, which allows local users to cause a denial of service (race condition, use-after-free, and system crash) via a crafted ioctl call.'}] | 2017-09-07T01:29Z | 2016-04-27T17:59Z | 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 | Takashi Iwai | 2016-01-13 17:48:01+01:00 | ALSA: timer: Fix race among timer ioctls
ALSA timer ioctls have an open race and this may lead to a
use-after-free of timer instance object. A simplistic fix is to make
each ioctl exclusive. We have already tread_sem for controlling the
tread, and extend this as a global mutex to be applied to each ioctl.
The downside is, of course, the worse concurrency. But these ioctls
aren't to be parallel accessible, in anyway, so it should be fine to
serialize there.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Tested-by: Dmitry Vyukov <dvyukov@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | af368027a49a751d6ff4ee9e3f9961f35bb4fede | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | snd_timer_user_ioctl | snd_timer_user_ioctl( struct file * file , unsigned int cmd , unsigned long arg) | ['file', 'cmd', 'arg'] | static long snd_timer_user_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
struct snd_timer_user *tu;
void __user *argp = (void __user *)arg;
int __user *p = argp;
tu = file->private_data;
switch (cmd) {
case SNDRV_TIMER_IOCTL_PVERSION:
return put_user(SNDRV_TIMER_VERSION, p) ? -EFAULT : 0;
case SNDRV_TIMER_IOCTL_NEXT_DEVICE:
return snd_timer_user_next_device(argp);
case SNDRV_TIMER_IOCTL_TREAD:
{
int xarg;
mutex_lock(&tu->tread_sem);
if (tu->timeri) { /* too late */
mutex_unlock(&tu->tread_sem);
return -EBUSY;
}
if (get_user(xarg, p)) {
mutex_unlock(&tu->tread_sem);
return -EFAULT;
}
tu->tread = xarg ? 1 : 0;
mutex_unlock(&tu->tread_sem);
return 0;
}
case SNDRV_TIMER_IOCTL_GINFO:
return snd_timer_user_ginfo(file, argp);
case SNDRV_TIMER_IOCTL_GPARAMS:
return snd_timer_user_gparams(file, argp);
case SNDRV_TIMER_IOCTL_GSTATUS:
return snd_timer_user_gstatus(file, argp);
case SNDRV_TIMER_IOCTL_SELECT:
return snd_timer_user_tselect(file, argp);
case SNDRV_TIMER_IOCTL_INFO:
return snd_timer_user_info(file, argp);
case SNDRV_TIMER_IOCTL_PARAMS:
return snd_timer_user_params(file, argp);
case SNDRV_TIMER_IOCTL_STATUS:
return snd_timer_user_status(file, argp);
case SNDRV_TIMER_IOCTL_START:
case SNDRV_TIMER_IOCTL_START_OLD:
return snd_timer_user_start(file);
case SNDRV_TIMER_IOCTL_STOP:
case SNDRV_TIMER_IOCTL_STOP_OLD:
return snd_timer_user_stop(file);
case SNDRV_TIMER_IOCTL_CONTINUE:
case SNDRV_TIMER_IOCTL_CONTINUE_OLD:
return snd_timer_user_continue(file);
case SNDRV_TIMER_IOCTL_PAUSE:
case SNDRV_TIMER_IOCTL_PAUSE_OLD:
return snd_timer_user_pause(file);
}
return -ENOTTY;
} | 287 | True | 1 |
|
CVE-2016-2546 | 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.0/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H | LOCAL | HIGH | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 5.1 | MEDIUM | 1.4 | 3.6 | nan | [{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311564', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311564', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=af368027a49a751d6ff4ee9e3f9961f35bb4fede', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=af368027a49a751d6ff4ee9e3f9961f35bb4fede', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/01/19/1', 'name': '[oss-security] 20160119 Security bugs in Linux kernel sound subsystem', 'refsource': 'MLIST', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/af368027a49a751d6ff4ee9e3f9961f35bb4fede', 'name': 'https://github.com/torvalds/linux/commit/af368027a49a751d6ff4ee9e3f9961f35bb4fede', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'http://www.securityfocus.com/bid/83384', 'name': '83384', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-1', 'name': 'USN-2930-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2931-1', 'name': 'USN-2931-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-1', 'name': 'USN-2929-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-3', 'name': 'USN-2930-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-2', 'name': 'USN-2930-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-2', 'name': 'USN-2929-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00094.html', 'name': 'SUSE-SU-2016:0911', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00045.html', 'name': 'SUSE-SU-2016:1102', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1035301', 'name': '1035301', 'refsource': 'SECTRACK', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'sound/core/timer.c in the Linux kernel before 4.4.1 uses an incorrect type of mutex, which allows local users to cause a denial of service (race condition, use-after-free, and system crash) via a crafted ioctl call.'}] | 2017-09-07T01:29Z | 2016-04-27T17:59Z | 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 | Takashi Iwai | 2016-01-13 17:48:01+01:00 | ALSA: timer: Fix race among timer ioctls
ALSA timer ioctls have an open race and this may lead to a
use-after-free of timer instance object. A simplistic fix is to make
each ioctl exclusive. We have already tread_sem for controlling the
tread, and extend this as a global mutex to be applied to each ioctl.
The downside is, of course, the worse concurrency. But these ioctls
aren't to be parallel accessible, in anyway, so it should be fine to
serialize there.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Tested-by: Dmitry Vyukov <dvyukov@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | af368027a49a751d6ff4ee9e3f9961f35bb4fede | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | snd_timer_user_open | snd_timer_user_open( struct inode * inode , struct file * file) | ['inode', 'file'] | static int snd_timer_user_open(struct inode *inode, struct file *file)
{
struct snd_timer_user *tu;
int err;
err = nonseekable_open(inode, file);
if (err < 0)
return err;
tu = kzalloc(sizeof(*tu), GFP_KERNEL);
if (tu == NULL)
return -ENOMEM;
spin_lock_init(&tu->qlock);
init_waitqueue_head(&tu->qchange_sleep);
mutex_init(&tu->tread_sem);
tu->ticks = 1;
tu->queue_size = 128;
tu->queue = kmalloc(tu->queue_size * sizeof(struct snd_timer_read),
GFP_KERNEL);
if (tu->queue == NULL) {
kfree(tu);
return -ENOMEM;
}
file->private_data = tu;
return 0;
} | 146 | True | 1 |
|
CVE-2016-2546 | 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.0/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H | LOCAL | HIGH | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 5.1 | MEDIUM | 1.4 | 3.6 | nan | [{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311564', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311564', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=af368027a49a751d6ff4ee9e3f9961f35bb4fede', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=af368027a49a751d6ff4ee9e3f9961f35bb4fede', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/01/19/1', 'name': '[oss-security] 20160119 Security bugs in Linux kernel sound subsystem', 'refsource': 'MLIST', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/af368027a49a751d6ff4ee9e3f9961f35bb4fede', 'name': 'https://github.com/torvalds/linux/commit/af368027a49a751d6ff4ee9e3f9961f35bb4fede', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'http://www.securityfocus.com/bid/83384', 'name': '83384', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-1', 'name': 'USN-2930-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2931-1', 'name': 'USN-2931-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-1', 'name': 'USN-2929-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-3', 'name': 'USN-2930-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-2', 'name': 'USN-2930-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-2', 'name': 'USN-2929-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00094.html', 'name': 'SUSE-SU-2016:0911', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00045.html', 'name': 'SUSE-SU-2016:1102', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1035301', 'name': '1035301', 'refsource': 'SECTRACK', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'sound/core/timer.c in the Linux kernel before 4.4.1 uses an incorrect type of mutex, which allows local users to cause a denial of service (race condition, use-after-free, and system crash) via a crafted ioctl call.'}] | 2017-09-07T01:29Z | 2016-04-27T17:59Z | 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 | Takashi Iwai | 2016-01-13 17:48:01+01:00 | ALSA: timer: Fix race among timer ioctls
ALSA timer ioctls have an open race and this may lead to a
use-after-free of timer instance object. A simplistic fix is to make
each ioctl exclusive. We have already tread_sem for controlling the
tread, and extend this as a global mutex to be applied to each ioctl.
The downside is, of course, the worse concurrency. But these ioctls
aren't to be parallel accessible, in anyway, so it should be fine to
serialize there.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Tested-by: Dmitry Vyukov <dvyukov@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | af368027a49a751d6ff4ee9e3f9961f35bb4fede | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | snd_timer_user_tselect | snd_timer_user_tselect( struct file * file , struct snd_timer_select __user * _tselect) | ['file', '_tselect'] | static int snd_timer_user_tselect(struct file *file,
struct snd_timer_select __user *_tselect)
{
struct snd_timer_user *tu;
struct snd_timer_select tselect;
char str[32];
int err = 0;
tu = file->private_data;
mutex_lock(&tu->tread_sem);
if (tu->timeri) {
snd_timer_close(tu->timeri);
tu->timeri = NULL;
}
if (copy_from_user(&tselect, _tselect, sizeof(tselect))) {
err = -EFAULT;
goto __err;
}
sprintf(str, "application %i", current->pid);
if (tselect.id.dev_class != SNDRV_TIMER_CLASS_SLAVE)
tselect.id.dev_sclass = SNDRV_TIMER_SCLASS_APPLICATION;
err = snd_timer_open(&tu->timeri, str, &tselect.id, current->pid);
if (err < 0)
goto __err;
kfree(tu->queue);
tu->queue = NULL;
kfree(tu->tqueue);
tu->tqueue = NULL;
if (tu->tread) {
tu->tqueue = kmalloc(tu->queue_size * sizeof(struct snd_timer_tread),
GFP_KERNEL);
if (tu->tqueue == NULL)
err = -ENOMEM;
} else {
tu->queue = kmalloc(tu->queue_size * sizeof(struct snd_timer_read),
GFP_KERNEL);
if (tu->queue == NULL)
err = -ENOMEM;
}
if (err < 0) {
snd_timer_close(tu->timeri);
tu->timeri = NULL;
} else {
tu->timeri->flags |= SNDRV_TIMER_IFLG_FAST;
tu->timeri->callback = tu->tread
? snd_timer_user_tinterrupt : snd_timer_user_interrupt;
tu->timeri->ccallback = snd_timer_user_ccallback;
tu->timeri->callback_data = (void *)tu;
}
__err:
mutex_unlock(&tu->tread_sem);
return err;
} | 334 | True | 1 |
|
CVE-2016-2547 | 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.0/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H | LOCAL | HIGH | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 5.1 | MEDIUM | 1.4 | 3.6 | nan | [{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b5a663aa426f4884c71cd8580adae73f33570f0d', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b5a663aa426f4884c71cd8580adae73f33570f0d', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/b5a663aa426f4884c71cd8580adae73f33570f0d', 'name': 'https://github.com/torvalds/linux/commit/b5a663aa426f4884c71cd8580adae73f33570f0d', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2016/01/19/1', 'name': '[oss-security] 20160119 Security bugs in Linux kernel sound subsystem', 'refsource': 'MLIST', 'tags': ['Patch']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311566', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311566', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/83378', 'name': '83378', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-1', 'name': 'USN-2930-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2931-1', 'name': 'USN-2931-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-1', 'name': 'USN-2929-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-3', 'name': 'USN-2930-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-2', 'name': 'USN-2930-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-2', 'name': 'USN-2929-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00094.html', 'name': 'SUSE-SU-2016:0911', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00045.html', 'name': 'SUSE-SU-2016:1102', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1035298', 'name': '1035298', 'refsource': 'SECTRACK', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'sound/core/timer.c in the Linux kernel before 4.4.1 employs a locking approach that does not consider slave timer instances, which allows local users to cause a denial of service (race condition, use-after-free, and system crash) via a crafted ioctl call.'}] | 2017-09-07T01:29Z | 2016-04-27T17:59Z | 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 | Takashi Iwai | 2016-01-14 16:30:58+01:00 | ALSA: timer: Harden slave timer list handling
A slave timer instance might be still accessible in a racy way while
operating the master instance as it lacks of locking. Since the
master operation is mostly protected with timer->lock, we should cope
with it while changing the slave instance, too. Also, some linked
lists (active_list and ack_list) of slave instances aren't unlinked
immediately at stopping or closing, and this may lead to unexpected
accesses.
This patch tries to address these issues. It adds spin lock of
timer->lock (either from master or slave, which is equivalent) in a
few places. For avoiding a deadlock, we ensure that the global
slave_active_lock is always locked at first before each timer lock.
Also, ack and active_list of slave instances are properly unlinked at
snd_timer_stop() and snd_timer_close().
Last but not least, remove the superfluous call of _snd_timer_stop()
at removing slave links. This is a noop, and calling it may confuse
readers wrt locking. Further cleanup will follow in a later patch.
Actually we've got reports of use-after-free by syzkaller fuzzer, and
this hopefully fixes these issues.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | b5a663aa426f4884c71cd8580adae73f33570f0d | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | snd_timer_close | snd_timer_close( struct snd_timer_instance * timeri) | ['timeri'] | int snd_timer_close(struct snd_timer_instance *timeri)
{
struct snd_timer *timer = NULL;
struct snd_timer_instance *slave, *tmp;
if (snd_BUG_ON(!timeri))
return -ENXIO;
/* force to stop the timer */
snd_timer_stop(timeri);
if (timeri->flags & SNDRV_TIMER_IFLG_SLAVE) {
/* wait, until the active callback is finished */
spin_lock_irq(&slave_active_lock);
while (timeri->flags & SNDRV_TIMER_IFLG_CALLBACK) {
spin_unlock_irq(&slave_active_lock);
udelay(10);
spin_lock_irq(&slave_active_lock);
}
spin_unlock_irq(&slave_active_lock);
mutex_lock(®ister_mutex);
list_del(&timeri->open_list);
mutex_unlock(®ister_mutex);
} else {
timer = timeri->timer;
if (snd_BUG_ON(!timer))
goto out;
/* wait, until the active callback is finished */
spin_lock_irq(&timer->lock);
while (timeri->flags & SNDRV_TIMER_IFLG_CALLBACK) {
spin_unlock_irq(&timer->lock);
udelay(10);
spin_lock_irq(&timer->lock);
}
spin_unlock_irq(&timer->lock);
mutex_lock(®ister_mutex);
list_del(&timeri->open_list);
if (timer && list_empty(&timer->open_list_head) &&
timer->hw.close)
timer->hw.close(timer);
/* remove slave links */
list_for_each_entry_safe(slave, tmp, &timeri->slave_list_head,
open_list) {
spin_lock_irq(&slave_active_lock);
_snd_timer_stop(slave, 1, SNDRV_TIMER_EVENT_RESOLUTION);
list_move_tail(&slave->open_list, &snd_timer_slave_list);
slave->master = NULL;
slave->timer = NULL;
spin_unlock_irq(&slave_active_lock);
}
mutex_unlock(®ister_mutex);
}
out:
if (timeri->private_free)
timeri->private_free(timeri);
kfree(timeri->owner);
kfree(timeri);
if (timer)
module_put(timer->module);
return 0;
} | 324 | True | 1 |
|
CVE-2016-2548 | 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:N/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 6.2 | MEDIUM | 2.5 | 3.6 | nan | [{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b5a663aa426f4884c71cd8580adae73f33570f0d', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b5a663aa426f4884c71cd8580adae73f33570f0d', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/b5a663aa426f4884c71cd8580adae73f33570f0d', 'name': 'https://github.com/torvalds/linux/commit/b5a663aa426f4884c71cd8580adae73f33570f0d', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2016/01/19/1', 'name': '[oss-security] 20160119 Security bugs in Linux kernel sound subsystem', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311568', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311568', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/83383', 'name': '83383', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-1', 'name': 'USN-2930-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2931-1', 'name': 'USN-2931-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-1', 'name': 'USN-2929-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-3', 'name': 'USN-2930-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-2', 'name': 'USN-2930-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-2', 'name': 'USN-2929-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00094.html', 'name': 'SUSE-SU-2016:0911', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00045.html', 'name': 'SUSE-SU-2016:1102', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1035306', 'name': '1035306', 'refsource': 'SECTRACK', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'sound/core/timer.c in the Linux kernel before 4.4.1 retains certain linked lists after a close or stop action, which allows local users to cause a denial of service (system crash) via a crafted ioctl call, related to the (1) snd_timer_close and (2) _snd_timer_stop functions.'}] | 2017-09-07T01:29Z | 2016-04-27T17:59Z | 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 | Takashi Iwai | 2016-01-14 16:30:58+01:00 | ALSA: timer: Harden slave timer list handling
A slave timer instance might be still accessible in a racy way while
operating the master instance as it lacks of locking. Since the
master operation is mostly protected with timer->lock, we should cope
with it while changing the slave instance, too. Also, some linked
lists (active_list and ack_list) of slave instances aren't unlinked
immediately at stopping or closing, and this may lead to unexpected
accesses.
This patch tries to address these issues. It adds spin lock of
timer->lock (either from master or slave, which is equivalent) in a
few places. For avoiding a deadlock, we ensure that the global
slave_active_lock is always locked at first before each timer lock.
Also, ack and active_list of slave instances are properly unlinked at
snd_timer_stop() and snd_timer_close().
Last but not least, remove the superfluous call of _snd_timer_stop()
at removing slave links. This is a noop, and calling it may confuse
readers wrt locking. Further cleanup will follow in a later patch.
Actually we've got reports of use-after-free by syzkaller fuzzer, and
this hopefully fixes these issues.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | b5a663aa426f4884c71cd8580adae73f33570f0d | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | snd_timer_close | snd_timer_close( struct snd_timer_instance * timeri) | ['timeri'] | int snd_timer_close(struct snd_timer_instance *timeri)
{
struct snd_timer *timer = NULL;
struct snd_timer_instance *slave, *tmp;
if (snd_BUG_ON(!timeri))
return -ENXIO;
/* force to stop the timer */
snd_timer_stop(timeri);
if (timeri->flags & SNDRV_TIMER_IFLG_SLAVE) {
/* wait, until the active callback is finished */
spin_lock_irq(&slave_active_lock);
while (timeri->flags & SNDRV_TIMER_IFLG_CALLBACK) {
spin_unlock_irq(&slave_active_lock);
udelay(10);
spin_lock_irq(&slave_active_lock);
}
spin_unlock_irq(&slave_active_lock);
mutex_lock(®ister_mutex);
list_del(&timeri->open_list);
mutex_unlock(®ister_mutex);
} else {
timer = timeri->timer;
if (snd_BUG_ON(!timer))
goto out;
/* wait, until the active callback is finished */
spin_lock_irq(&timer->lock);
while (timeri->flags & SNDRV_TIMER_IFLG_CALLBACK) {
spin_unlock_irq(&timer->lock);
udelay(10);
spin_lock_irq(&timer->lock);
}
spin_unlock_irq(&timer->lock);
mutex_lock(®ister_mutex);
list_del(&timeri->open_list);
if (timer && list_empty(&timer->open_list_head) &&
timer->hw.close)
timer->hw.close(timer);
/* remove slave links */
list_for_each_entry_safe(slave, tmp, &timeri->slave_list_head,
open_list) {
spin_lock_irq(&slave_active_lock);
_snd_timer_stop(slave, 1, SNDRV_TIMER_EVENT_RESOLUTION);
list_move_tail(&slave->open_list, &snd_timer_slave_list);
slave->master = NULL;
slave->timer = NULL;
spin_unlock_irq(&slave_active_lock);
}
mutex_unlock(®ister_mutex);
}
out:
if (timeri->private_free)
timeri->private_free(timeri);
kfree(timeri->owner);
kfree(timeri);
if (timer)
module_put(timer->module);
return 0;
} | 324 | True | 1 |
|
CVE-2016-2547 | 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.0/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H | LOCAL | HIGH | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 5.1 | MEDIUM | 1.4 | 3.6 | nan | [{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b5a663aa426f4884c71cd8580adae73f33570f0d', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b5a663aa426f4884c71cd8580adae73f33570f0d', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/b5a663aa426f4884c71cd8580adae73f33570f0d', 'name': 'https://github.com/torvalds/linux/commit/b5a663aa426f4884c71cd8580adae73f33570f0d', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2016/01/19/1', 'name': '[oss-security] 20160119 Security bugs in Linux kernel sound subsystem', 'refsource': 'MLIST', 'tags': ['Patch']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311566', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311566', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/83378', 'name': '83378', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-1', 'name': 'USN-2930-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2931-1', 'name': 'USN-2931-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-1', 'name': 'USN-2929-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-3', 'name': 'USN-2930-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-2', 'name': 'USN-2930-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-2', 'name': 'USN-2929-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00094.html', 'name': 'SUSE-SU-2016:0911', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00045.html', 'name': 'SUSE-SU-2016:1102', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1035298', 'name': '1035298', 'refsource': 'SECTRACK', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-362'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'sound/core/timer.c in the Linux kernel before 4.4.1 employs a locking approach that does not consider slave timer instances, which allows local users to cause a denial of service (race condition, use-after-free, and system crash) via a crafted ioctl call.'}] | 2017-09-07T01:29Z | 2016-04-27T17:59Z | 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 | Takashi Iwai | 2016-01-14 16:30:58+01:00 | ALSA: timer: Harden slave timer list handling
A slave timer instance might be still accessible in a racy way while
operating the master instance as it lacks of locking. Since the
master operation is mostly protected with timer->lock, we should cope
with it while changing the slave instance, too. Also, some linked
lists (active_list and ack_list) of slave instances aren't unlinked
immediately at stopping or closing, and this may lead to unexpected
accesses.
This patch tries to address these issues. It adds spin lock of
timer->lock (either from master or slave, which is equivalent) in a
few places. For avoiding a deadlock, we ensure that the global
slave_active_lock is always locked at first before each timer lock.
Also, ack and active_list of slave instances are properly unlinked at
snd_timer_stop() and snd_timer_close().
Last but not least, remove the superfluous call of _snd_timer_stop()
at removing slave links. This is a noop, and calling it may confuse
readers wrt locking. Further cleanup will follow in a later patch.
Actually we've got reports of use-after-free by syzkaller fuzzer, and
this hopefully fixes these issues.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | b5a663aa426f4884c71cd8580adae73f33570f0d | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | snd_timer_start_slave | snd_timer_start_slave( struct snd_timer_instance * timeri) | ['timeri'] | static int snd_timer_start_slave(struct snd_timer_instance *timeri)
{
unsigned long flags;
spin_lock_irqsave(&slave_active_lock, flags);
timeri->flags |= SNDRV_TIMER_IFLG_RUNNING;
if (timeri->master)
list_add_tail(&timeri->active_list,
&timeri->master->slave_active_head);
spin_unlock_irqrestore(&slave_active_lock, flags);
return 1; /* delayed start */
} | 59 | True | 1 |
|
CVE-2016-2548 | 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:N/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 6.2 | MEDIUM | 2.5 | 3.6 | nan | [{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b5a663aa426f4884c71cd8580adae73f33570f0d', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b5a663aa426f4884c71cd8580adae73f33570f0d', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/b5a663aa426f4884c71cd8580adae73f33570f0d', 'name': 'https://github.com/torvalds/linux/commit/b5a663aa426f4884c71cd8580adae73f33570f0d', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2016/01/19/1', 'name': '[oss-security] 20160119 Security bugs in Linux kernel sound subsystem', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311568', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311568', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/83383', 'name': '83383', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-1', 'name': 'USN-2930-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2931-1', 'name': 'USN-2931-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-1', 'name': 'USN-2929-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-3', 'name': 'USN-2930-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-2', 'name': 'USN-2930-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-2', 'name': 'USN-2929-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00094.html', 'name': 'SUSE-SU-2016:0911', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00045.html', 'name': 'SUSE-SU-2016:1102', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1035306', 'name': '1035306', 'refsource': 'SECTRACK', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'sound/core/timer.c in the Linux kernel before 4.4.1 retains certain linked lists after a close or stop action, which allows local users to cause a denial of service (system crash) via a crafted ioctl call, related to the (1) snd_timer_close and (2) _snd_timer_stop functions.'}] | 2017-09-07T01:29Z | 2016-04-27T17:59Z | 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 | Takashi Iwai | 2016-01-14 16:30:58+01:00 | ALSA: timer: Harden slave timer list handling
A slave timer instance might be still accessible in a racy way while
operating the master instance as it lacks of locking. Since the
master operation is mostly protected with timer->lock, we should cope
with it while changing the slave instance, too. Also, some linked
lists (active_list and ack_list) of slave instances aren't unlinked
immediately at stopping or closing, and this may lead to unexpected
accesses.
This patch tries to address these issues. It adds spin lock of
timer->lock (either from master or slave, which is equivalent) in a
few places. For avoiding a deadlock, we ensure that the global
slave_active_lock is always locked at first before each timer lock.
Also, ack and active_list of slave instances are properly unlinked at
snd_timer_stop() and snd_timer_close().
Last but not least, remove the superfluous call of _snd_timer_stop()
at removing slave links. This is a noop, and calling it may confuse
readers wrt locking. Further cleanup will follow in a later patch.
Actually we've got reports of use-after-free by syzkaller fuzzer, and
this hopefully fixes these issues.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | b5a663aa426f4884c71cd8580adae73f33570f0d | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | snd_timer_start_slave | snd_timer_start_slave( struct snd_timer_instance * timeri) | ['timeri'] | static int snd_timer_start_slave(struct snd_timer_instance *timeri)
{
unsigned long flags;
spin_lock_irqsave(&slave_active_lock, flags);
timeri->flags |= SNDRV_TIMER_IFLG_RUNNING;
if (timeri->master)
list_add_tail(&timeri->active_list,
&timeri->master->slave_active_head);
spin_unlock_irqrestore(&slave_active_lock, flags);
return 1; /* delayed start */
} | 59 | True | 1 |
|
CVE-2015-8970 | 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 | nan | [{'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.2', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.2', 'refsource': 'CONFIRM', 'tags': ['Release Notes']}, {'url': 'https://github.com/torvalds/linux/commit/dd504589577d8e8e70f51f997ad487a4cb6c026f', 'name': 'https://github.com/torvalds/linux/commit/dd504589577d8e8e70f51f997ad487a4cb6c026f', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1386286', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1386286', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=dd504589577d8e8e70f51f997ad487a4cb6c026f', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=dd504589577d8e8e70f51f997ad487a4cb6c026f', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/04/3', 'name': '[oss-security] 20161104 Re: CVE request -- linux kernel: crypto: GPF in lrw_crypt caused by null-deref', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94217', 'name': '94217', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://access.redhat.com/errata/RHSA-2017:2444', 'name': 'RHSA-2017:2444', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:2437', 'name': 'RHSA-2017:2437', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:2077', 'name': 'RHSA-2017:2077', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1842', 'name': 'RHSA-2017:1842', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://groups.google.com/forum/#!msg/syzkaller/frb2XrB5aWk/xCXzkIBcDAAJ', 'name': 'https://groups.google.com/forum/#!msg/syzkaller/frb2XrB5aWk/xCXzkIBcDAAJ', 'refsource': 'CONFIRM', '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.4.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'crypto/algif_skcipher.c in the Linux kernel before 4.4.2 does not verify that a setkey operation has been performed on an AF_ALG socket before an accept system call is processed, which allows local users to cause a denial of service (NULL pointer dereference and system crash) via a crafted application that does not supply a key, related to the lrw_crypt function in crypto/lrw.c.'}] | 2018-08-13T21:47Z | 2016-11-28T03:59Z | 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 | Herbert Xu | 2015-12-25 15:40:05+08:00 | crypto: algif_skcipher - Require setkey before accept(2)
Some cipher implementations will crash if you try to use them
without calling setkey first. This patch adds a check so that
the accept(2) call will fail with -ENOKEY if setkey hasn't been
done on the socket yet.
Cc: stable@vger.kernel.org
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Dmitry Vyukov <dvyukov@google.com> | dd504589577d8e8e70f51f997ad487a4cb6c026f | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | skcipher_accept_parent | skcipher_accept_parent( void * private , struct sock * sk) | ['private', 'sk'] | static int skcipher_accept_parent(void *private, struct sock *sk)
{
struct skcipher_ctx *ctx;
struct alg_sock *ask = alg_sk(sk);
unsigned int len = sizeof(*ctx) + crypto_skcipher_reqsize(private);
ctx = sock_kmalloc(sk, len, GFP_KERNEL);
if (!ctx)
return -ENOMEM;
ctx->iv = sock_kmalloc(sk, crypto_skcipher_ivsize(private),
GFP_KERNEL);
if (!ctx->iv) {
sock_kfree_s(sk, ctx, len);
return -ENOMEM;
}
memset(ctx->iv, 0, crypto_skcipher_ivsize(private));
INIT_LIST_HEAD(&ctx->tsgl);
ctx->len = len;
ctx->used = 0;
ctx->more = 0;
ctx->merge = 0;
ctx->enc = 0;
atomic_set(&ctx->inflight, 0);
af_alg_init_completion(&ctx->completion);
ask->private = ctx;
skcipher_request_set_tfm(&ctx->req, private);
skcipher_request_set_callback(&ctx->req, CRYPTO_TFM_REQ_MAY_BACKLOG,
af_alg_complete, &ctx->completion);
sk->sk_destruct = skcipher_sock_destruct;
return 0;
} | 213 | True | 1 |
|
CVE-2015-8970 | 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 | nan | [{'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.2', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.2', 'refsource': 'CONFIRM', 'tags': ['Release Notes']}, {'url': 'https://github.com/torvalds/linux/commit/dd504589577d8e8e70f51f997ad487a4cb6c026f', 'name': 'https://github.com/torvalds/linux/commit/dd504589577d8e8e70f51f997ad487a4cb6c026f', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1386286', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1386286', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=dd504589577d8e8e70f51f997ad487a4cb6c026f', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=dd504589577d8e8e70f51f997ad487a4cb6c026f', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/04/3', 'name': '[oss-security] 20161104 Re: CVE request -- linux kernel: crypto: GPF in lrw_crypt caused by null-deref', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94217', 'name': '94217', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://access.redhat.com/errata/RHSA-2017:2444', 'name': 'RHSA-2017:2444', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:2437', 'name': 'RHSA-2017:2437', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:2077', 'name': 'RHSA-2017:2077', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1842', 'name': 'RHSA-2017:1842', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://groups.google.com/forum/#!msg/syzkaller/frb2XrB5aWk/xCXzkIBcDAAJ', 'name': 'https://groups.google.com/forum/#!msg/syzkaller/frb2XrB5aWk/xCXzkIBcDAAJ', 'refsource': 'CONFIRM', '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.4.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'crypto/algif_skcipher.c in the Linux kernel before 4.4.2 does not verify that a setkey operation has been performed on an AF_ALG socket before an accept system call is processed, which allows local users to cause a denial of service (NULL pointer dereference and system crash) via a crafted application that does not supply a key, related to the lrw_crypt function in crypto/lrw.c.'}] | 2018-08-13T21:47Z | 2016-11-28T03:59Z | 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 | Herbert Xu | 2015-12-25 15:40:05+08:00 | crypto: algif_skcipher - Require setkey before accept(2)
Some cipher implementations will crash if you try to use them
without calling setkey first. This patch adds a check so that
the accept(2) call will fail with -ENOKEY if setkey hasn't been
done on the socket yet.
Cc: stable@vger.kernel.org
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Dmitry Vyukov <dvyukov@google.com> | dd504589577d8e8e70f51f997ad487a4cb6c026f | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | skcipher_bind | skcipher_bind( const char * name , u32 type , u32 mask) | ['name', 'type', 'mask'] | static void *skcipher_bind(const char *name, u32 type, u32 mask)
{
return crypto_alloc_skcipher(name, type, mask);
} | 25 | True | 1 |
|
CVE-2015-8970 | 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 | nan | [{'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.2', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.2', 'refsource': 'CONFIRM', 'tags': ['Release Notes']}, {'url': 'https://github.com/torvalds/linux/commit/dd504589577d8e8e70f51f997ad487a4cb6c026f', 'name': 'https://github.com/torvalds/linux/commit/dd504589577d8e8e70f51f997ad487a4cb6c026f', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1386286', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1386286', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=dd504589577d8e8e70f51f997ad487a4cb6c026f', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=dd504589577d8e8e70f51f997ad487a4cb6c026f', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/04/3', 'name': '[oss-security] 20161104 Re: CVE request -- linux kernel: crypto: GPF in lrw_crypt caused by null-deref', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94217', 'name': '94217', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://access.redhat.com/errata/RHSA-2017:2444', 'name': 'RHSA-2017:2444', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:2437', 'name': 'RHSA-2017:2437', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:2077', 'name': 'RHSA-2017:2077', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1842', 'name': 'RHSA-2017:1842', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://groups.google.com/forum/#!msg/syzkaller/frb2XrB5aWk/xCXzkIBcDAAJ', 'name': 'https://groups.google.com/forum/#!msg/syzkaller/frb2XrB5aWk/xCXzkIBcDAAJ', 'refsource': 'CONFIRM', '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.4.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'crypto/algif_skcipher.c in the Linux kernel before 4.4.2 does not verify that a setkey operation has been performed on an AF_ALG socket before an accept system call is processed, which allows local users to cause a denial of service (NULL pointer dereference and system crash) via a crafted application that does not supply a key, related to the lrw_crypt function in crypto/lrw.c.'}] | 2018-08-13T21:47Z | 2016-11-28T03:59Z | 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 | Herbert Xu | 2015-12-25 15:40:05+08:00 | crypto: algif_skcipher - Require setkey before accept(2)
Some cipher implementations will crash if you try to use them
without calling setkey first. This patch adds a check so that
the accept(2) call will fail with -ENOKEY if setkey hasn't been
done on the socket yet.
Cc: stable@vger.kernel.org
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Dmitry Vyukov <dvyukov@google.com> | dd504589577d8e8e70f51f997ad487a4cb6c026f | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | skcipher_release | skcipher_release( void * private) | ['private'] | static void skcipher_release(void *private)
{
crypto_free_skcipher(private);
} | 13 | True | 1 |
|
CVE-2015-8970 | 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 | nan | [{'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.2', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.2', 'refsource': 'CONFIRM', 'tags': ['Release Notes']}, {'url': 'https://github.com/torvalds/linux/commit/dd504589577d8e8e70f51f997ad487a4cb6c026f', 'name': 'https://github.com/torvalds/linux/commit/dd504589577d8e8e70f51f997ad487a4cb6c026f', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1386286', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1386286', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=dd504589577d8e8e70f51f997ad487a4cb6c026f', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=dd504589577d8e8e70f51f997ad487a4cb6c026f', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/04/3', 'name': '[oss-security] 20161104 Re: CVE request -- linux kernel: crypto: GPF in lrw_crypt caused by null-deref', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94217', 'name': '94217', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://access.redhat.com/errata/RHSA-2017:2444', 'name': 'RHSA-2017:2444', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:2437', 'name': 'RHSA-2017:2437', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:2077', 'name': 'RHSA-2017:2077', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1842', 'name': 'RHSA-2017:1842', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://groups.google.com/forum/#!msg/syzkaller/frb2XrB5aWk/xCXzkIBcDAAJ', 'name': 'https://groups.google.com/forum/#!msg/syzkaller/frb2XrB5aWk/xCXzkIBcDAAJ', 'refsource': 'CONFIRM', '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.4.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'crypto/algif_skcipher.c in the Linux kernel before 4.4.2 does not verify that a setkey operation has been performed on an AF_ALG socket before an accept system call is processed, which allows local users to cause a denial of service (NULL pointer dereference and system crash) via a crafted application that does not supply a key, related to the lrw_crypt function in crypto/lrw.c.'}] | 2018-08-13T21:47Z | 2016-11-28T03:59Z | 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 | Herbert Xu | 2015-12-25 15:40:05+08:00 | crypto: algif_skcipher - Require setkey before accept(2)
Some cipher implementations will crash if you try to use them
without calling setkey first. This patch adds a check so that
the accept(2) call will fail with -ENOKEY if setkey hasn't been
done on the socket yet.
Cc: stable@vger.kernel.org
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Dmitry Vyukov <dvyukov@google.com> | dd504589577d8e8e70f51f997ad487a4cb6c026f | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | skcipher_setkey | skcipher_setkey( void * private , const u8 * key , unsigned int keylen) | ['private', 'key', 'keylen'] | static int skcipher_setkey(void *private, const u8 *key, unsigned int keylen)
{
return crypto_skcipher_setkey(private, key, keylen);
} | 27 | True | 1 |
|
CVE-2016-2549 | 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:N/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 6.2 | MEDIUM | 2.5 | 3.6 | nan | [{'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.1', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.openwall.com/lists/oss-security/2016/01/19/1', 'name': '[oss-security] 20160119 Security bugs in Linux kernel sound subsystem', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/2ba1fe7a06d3624f9a7586d672b55f08f7c670f3', 'name': 'https://github.com/torvalds/linux/commit/2ba1fe7a06d3624f9a7586d672b55f08f7c670f3', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311570', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311570', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2ba1fe7a06d3624f9a7586d672b55f08f7c670f3', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2ba1fe7a06d3624f9a7586d672b55f08f7c670f3', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/83382', 'name': '83382', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-1', 'name': 'USN-2930-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2931-1', 'name': 'USN-2931-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-1', 'name': 'USN-2929-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-3', 'name': 'USN-2930-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-2', 'name': 'USN-2930-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-2', 'name': 'USN-2929-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00094.html', 'name': 'SUSE-SU-2016:0911', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00045.html', 'name': 'SUSE-SU-2016:1102', 'refsource': 'SUSE', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'sound/core/hrtimer.c in the Linux kernel before 4.4.1 does not prevent recursive callback access, which allows local users to cause a denial of service (deadlock) via a crafted ioctl call.'}] | 2016-12-03T03:25Z | 2016-04-27T17:59Z | 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 | Takashi Iwai | 2016-01-18 13:52:47+01:00 | ALSA: hrtimer: Fix stall by hrtimer_cancel()
hrtimer_cancel() waits for the completion from the callback, thus it
must not be called inside the callback itself. This was already a
problem in the past with ALSA hrtimer driver, and the early commit
[fcfdebe70759: ALSA: hrtimer - Fix lock-up] tried to address it.
However, the previous fix is still insufficient: it may still cause a
lockup when the ALSA timer instance reprograms itself in its callback.
Then it invokes the start function even in snd_timer_interrupt() that
is called in hrtimer callback itself, results in a CPU stall. This is
no hypothetical problem but actually triggered by syzkaller fuzzer.
This patch tries to fix the issue again. Now we call
hrtimer_try_to_cancel() at both start and stop functions so that it
won't fall into a deadlock, yet giving some chance to cancel the queue
if the functions have been called outside the callback. The proper
hrtimer_cancel() is called in anyway at closing, so this should be
enough.
Reported-and-tested-by: Dmitry Vyukov <dvyukov@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | 2ba1fe7a06d3624f9a7586d672b55f08f7c670f3 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | snd_hrtimer_start | snd_hrtimer_start( struct snd_timer * t) | ['t'] | static int snd_hrtimer_start(struct snd_timer *t)
{
struct snd_hrtimer *stime = t->private_data;
atomic_set(&stime->running, 0);
hrtimer_cancel(&stime->hrt);
hrtimer_start(&stime->hrt, ns_to_ktime(t->sticks * resolution),
HRTIMER_MODE_REL);
atomic_set(&stime->running, 1);
return 0;
} | 68 | True | 1 |
|
CVE-2016-2847 | 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:N/UI:N/S:U/C:N/I:N/A:H | LOCAL | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 6.2 | MEDIUM | 2.5 | 3.6 | nan | [{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1313428', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1313428', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/03/01/3', 'name': '[oss-security] 20160301 CVE request -- linux kernel: pipe: limit the per-user amount of pages allocated in pipes', 'refsource': 'MLIST', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/759c01142a5d0f364a462346168a56de28a80f52', 'name': 'https://github.com/torvalds/linux/commit/759c01142a5d0f364a462346168a56de28a80f52', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=759c01142a5d0f364a462346168a56de28a80f52', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=759c01142a5d0f364a462346168a56de28a80f52', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00052.html', 'name': 'SUSE-SU-2016:1672', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00056.html', 'name': 'SUSE-SU-2016:1696', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00054.html', 'name': 'SUSE-SU-2016:1690', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00059.html', 'name': 'SUSE-SU-2016:1707', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00000.html', 'name': 'SUSE-SU-2016:1937', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinoct2016-3090547.html', 'name': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinoct2016-3090547.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/83870', 'name': '83870', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-05/msg00060.html', 'name': 'openSUSE-SU-2016:1382', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2946-2', 'name': 'USN-2946-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2947-3', 'name': 'USN-2947-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2948-2', 'name': 'USN-2948-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2947-1', 'name': 'USN-2947-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2949-1', 'name': 'USN-2949-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2947-2', 'name': 'USN-2947-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2946-1', 'name': 'USN-2946-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2948-1', 'name': 'USN-2948-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2017-0217.html', 'name': 'RHSA-2017:0217', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2584.html', 'name': 'RHSA-2016:2584', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2574.html', 'name': 'RHSA-2016:2574', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-399'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4.8', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_module_for_public_cloud:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_server:11.0:sp4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_server:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_server:11.0:extra:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_live_patching:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_server:12.0:sp1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_real_time_extension:11.0:sp4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_desktop:12.0:sp1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_real_time_extension:12.0:sp1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_workstation_extension:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_software_development_kit:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_software_development_kit:11.0:sp4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_workstation_extension:12.0:sp1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_debuginfo:11.0:sp4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_software_development_kit:12.0:sp1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_desktop:12.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'fs/pipe.c in the Linux kernel before 4.5 does not limit the amount of unread data in pipes, which allows local users to cause a denial of service (memory consumption) by creating many pipes with non-default sizes.'}] | 2018-01-05T02:30Z | 2016-04-27T17:59Z | Resource Management Errors | Weaknesses in this category are related to improper management of system resources. | https://cwe.mitre.org/data/definitions/399.html | 1 | Willy Tarreau | 2016-01-18 16:36:09+01:00 | pipe: limit the per-user amount of pages allocated in pipes
On no-so-small systems, it is possible for a single process to cause an
OOM condition by filling large pipes with data that are never read. A
typical process filling 4000 pipes with 1 MB of data will use 4 GB of
memory. On small systems it may be tricky to set the pipe max size to
prevent this from happening.
This patch makes it possible to enforce a per-user soft limit above
which new pipes will be limited to a single page, effectively limiting
them to 4 kB each, as well as a hard limit above which no new pipes may
be created for this user. This has the effect of protecting the system
against memory abuse without hurting other users, and still allowing
pipes to work correctly though with less data at once.
The limit are controlled by two new sysctls : pipe-user-pages-soft, and
pipe-user-pages-hard. Both may be disabled by setting them to zero. The
default soft limit allows the default number of FDs per process (1024)
to create pipes of the default size (64kB), thus reaching a limit of 64MB
before starting to create only smaller pipes. With 256 processes limited
to 1024 FDs each, this results in 1024*64kB + (256*1024 - 1024) * 4kB =
1084 MB of memory allocated for a user. The hard limit is disabled by
default to avoid breaking existing applications that make intensive use
of pipes (eg: for splicing).
Reported-by: socketpair@gmail.com
Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Mitigates: CVE-2013-4312 (Linux 2.0+)
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | 759c01142a5d0f364a462346168a56de28a80f52 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | alloc_pipe_info | alloc_pipe_info( void) | ['void'] | struct pipe_inode_info *alloc_pipe_info(void)
{
struct pipe_inode_info *pipe;
pipe = kzalloc(sizeof(struct pipe_inode_info), GFP_KERNEL);
if (pipe) {
pipe->bufs = kzalloc(sizeof(struct pipe_buffer) * PIPE_DEF_BUFFERS, GFP_KERNEL);
if (pipe->bufs) {
init_waitqueue_head(&pipe->wait);
pipe->r_counter = pipe->w_counter = 1;
pipe->buffers = PIPE_DEF_BUFFERS;
mutex_init(&pipe->mutex);
return pipe;
}
kfree(pipe);
}
return NULL;
} | 98 | True | 1 |
||
CVE-2015-7566 | 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:P/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | PHYSICAL | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 4.6 | MEDIUM | 0.9 | 3.6 | nan | [{'url': 'https://github.com/torvalds/linux/commit/cb3232138e37129e88240a98a1d2aba2187ff57c', 'name': 'https://github.com/torvalds/linux/commit/cb3232138e37129e88240a98a1d2aba2187ff57c', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://security-tracker.debian.org/tracker/CVE-2015-7566', 'name': 'https://security-tracker.debian.org/tracker/CVE-2015-7566', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1296466', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1296466', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'VDB Entry']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=cb3232138e37129e88240a98a1d2aba2187ff57c', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=cb3232138e37129e88240a98a1d2aba2187ff57c', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1283371', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1283371', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'VDB Entry']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00052.html', 'name': 'SUSE-SU-2016:1672', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00059.html', 'name': 'SUSE-SU-2016:1707', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-07/msg00005.html', 'name': 'SUSE-SU-2016:1764', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/82975', 'name': '82975', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-1', 'name': 'USN-2930-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-1', 'name': 'USN-2929-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2948-2', 'name': 'USN-2948-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-3', 'name': 'USN-2930-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-2', 'name': 'USN-2930-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-2', 'name': 'USN-2929-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2948-1', 'name': 'USN-2948-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2016-February/176484.html', 'name': 'FEDORA-2016-5d43766e33', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2016-January/175792.html', 'name': 'FEDORA-2016-26e19f042a', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3448', 'name': 'DSA-3448', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2016-January/176194.html', 'name': 'FEDORA-2016-b59fd603be', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://www.exploit-db.com/exploits/39540/', 'name': '39540', 'refsource': 'EXPLOIT-DB', 'tags': []}, {'url': 'http://www.securityfocus.com/archive/1/537733/100/0/threaded', 'name': '20160309 OS-S 2016-09 Linux visor clie_5_attach Nullpointer Dereference CVE-2015-7566', 'refsource': 'BUGTRAQ', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_server:11:sp4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_debuginfo:11:sp4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:novell:suse_linux_enterprise_software_development_kit:11:sp4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_real_time_extension:11:sp4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_real_time_extension:12:sp1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_server:11:extra:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The clie_5_attach function in drivers/usb/serial/visor.c in the Linux kernel through 4.4.1 allows physically proximate attackers to cause a denial of service (NULL pointer dereference and system crash) or possibly have unspecified other impact by inserting a USB device that lacks a bulk-out endpoint.'}] | 2018-10-09T19:58Z | 2016-02-08T03:59Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Vladis Dronov | 2016-01-12 15:10:50+01:00 | USB: serial: visor: fix crash on detecting device without write_urbs
The visor driver crashes in clie_5_attach() when a specially crafted USB
device without bulk-out endpoint is detected. This fix adds a check that
the device has proper configuration expected by the driver.
Reported-by: Ralf Spenneberg <ralf@spenneberg.net>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
Fixes: cfb8da8f69b8 ("USB: visor: fix initialisation of UX50/TH55 devices")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org> | cb3232138e37129e88240a98a1d2aba2187ff57c | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | clie_5_attach | clie_5_attach( struct usb_serial * serial) | ['serial'] | static int clie_5_attach(struct usb_serial *serial)
{
struct usb_serial_port *port;
unsigned int pipe;
int j;
/* TH55 registers 2 ports.
Communication in from the UX50/TH55 uses bulk_in_endpointAddress
from port 0. Communication out to the UX50/TH55 uses
bulk_out_endpointAddress from port 1
Lets do a quick and dirty mapping
*/
/* some sanity check */
if (serial->num_ports < 2)
return -1;
/* port 0 now uses the modified endpoint Address */
port = serial->port[0];
port->bulk_out_endpointAddress =
serial->port[1]->bulk_out_endpointAddress;
pipe = usb_sndbulkpipe(serial->dev, port->bulk_out_endpointAddress);
for (j = 0; j < ARRAY_SIZE(port->write_urbs); ++j)
port->write_urbs[j]->pipe = pipe;
return 0;
} | 100 | True | 1 |
|
CVE-2016-0723 | False | False | False | False | AV:L/AC:L/Au:N/C:P/I:N/A:C | LOCAL | LOW | NONE | PARTIAL | NONE | COMPLETE | 5.6 | CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H | LOCAL | LOW | NONE | NONE | UNCHANGED | LOW | NONE | HIGH | 6.8 | MEDIUM | 2.5 | 4.2 | nan | [{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5c17c861a357e9458001f021a7afa7aab9937439', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5c17c861a357e9458001f021a7afa7aab9937439', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/5c17c861a357e9458001f021a7afa7aab9937439', 'name': 'https://github.com/torvalds/linux/commit/5c17c861a357e9458001f021a7afa7aab9937439', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1296253', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1296253', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://security-tracker.debian.org/tracker/CVE-2016-0723', 'name': 'https://security-tracker.debian.org/tracker/CVE-2016-0723', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://source.android.com/security/bulletin/2016-07-01.html', 'name': 'http://source.android.com/security/bulletin/2016-07-01.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-07/msg00005.html', 'name': 'SUSE-SU-2016:1764', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinoct2016-3090547.html', 'name': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinoct2016-3090547.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/82950', 'name': '82950', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00015.html', 'name': 'openSUSE-SU-2016:1008', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-1', 'name': 'USN-2930-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-1', 'name': 'USN-2929-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2948-2', 'name': 'USN-2948-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1035695', 'name': '1035695', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-2', 'name': 'USN-2930-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-2', 'name': 'USN-2929-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-3', 'name': 'USN-2930-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00094.html', 'name': 'SUSE-SU-2016:0911', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00045.html', 'name': 'SUSE-SU-2016:1102', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2948-1', 'name': 'USN-2948-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2016-February/176484.html', 'name': 'FEDORA-2016-5d43766e33', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3448', 'name': 'DSA-3448', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2016-February/176464.html', 'name': 'FEDORA-2016-2f25d12c51', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K43650115', 'name': 'https://support.f5.com/csp/article/K43650115', 'refsource': 'CONFIRM', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-200'}, {'lang': 'en', 'value': 'CWE-362'}, {'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Race condition in the tty_ioctl function in drivers/tty/tty_io.c in the Linux kernel through 4.4.1 allows local users to obtain sensitive information from kernel memory or cause a denial of service (use-after-free and system crash) by making a TIOCGETD ioctl call during processing of a TIOCSETD ioctl call.'}] | 2016-12-06T03:05Z | 2016-02-08T03:59Z | 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 Hurley | 2016-01-10 22:40:55-08:00 | tty: Fix unsafe ldisc reference via ioctl(TIOCGETD)
ioctl(TIOCGETD) retrieves the line discipline id directly from the
ldisc because the line discipline id (c_line) in termios is untrustworthy;
userspace may have set termios via ioctl(TCSETS*) without actually
changing the line discipline via ioctl(TIOCSETD).
However, directly accessing the current ldisc via tty->ldisc is
unsafe; the ldisc ptr dereferenced may be stale if the line discipline
is changing via ioctl(TIOCSETD) or hangup.
Wait for the line discipline reference (just like read() or write())
to retrieve the "current" line discipline id.
Cc: <stable@vger.kernel.org>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 5c17c861a357e9458001f021a7afa7aab9937439 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | tty_ioctl | tty_ioctl( struct file * file , unsigned int cmd , unsigned long arg) | ['file', 'cmd', 'arg'] | long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
struct tty_struct *tty = file_tty(file);
struct tty_struct *real_tty;
void __user *p = (void __user *)arg;
int retval;
struct tty_ldisc *ld;
if (tty_paranoia_check(tty, file_inode(file), "tty_ioctl"))
return -EINVAL;
real_tty = tty_pair_get_tty(tty);
/*
* Factor out some common prep work
*/
switch (cmd) {
case TIOCSETD:
case TIOCSBRK:
case TIOCCBRK:
case TCSBRK:
case TCSBRKP:
retval = tty_check_change(tty);
if (retval)
return retval;
if (cmd != TIOCCBRK) {
tty_wait_until_sent(tty, 0);
if (signal_pending(current))
return -EINTR;
}
break;
}
/*
* Now do the stuff.
*/
switch (cmd) {
case TIOCSTI:
return tiocsti(tty, p);
case TIOCGWINSZ:
return tiocgwinsz(real_tty, p);
case TIOCSWINSZ:
return tiocswinsz(real_tty, p);
case TIOCCONS:
return real_tty != tty ? -EINVAL : tioccons(file);
case FIONBIO:
return fionbio(file, p);
case TIOCEXCL:
set_bit(TTY_EXCLUSIVE, &tty->flags);
return 0;
case TIOCNXCL:
clear_bit(TTY_EXCLUSIVE, &tty->flags);
return 0;
case TIOCGEXCL:
{
int excl = test_bit(TTY_EXCLUSIVE, &tty->flags);
return put_user(excl, (int __user *)p);
}
case TIOCNOTTY:
if (current->signal->tty != tty)
return -ENOTTY;
no_tty();
return 0;
case TIOCSCTTY:
return tiocsctty(real_tty, file, arg);
case TIOCGPGRP:
return tiocgpgrp(tty, real_tty, p);
case TIOCSPGRP:
return tiocspgrp(tty, real_tty, p);
case TIOCGSID:
return tiocgsid(tty, real_tty, p);
case TIOCGETD:
return put_user(tty->ldisc->ops->num, (int __user *)p);
case TIOCSETD:
return tiocsetd(tty, p);
case TIOCVHANGUP:
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
tty_vhangup(tty);
return 0;
case TIOCGDEV:
{
unsigned int ret = new_encode_dev(tty_devnum(real_tty));
return put_user(ret, (unsigned int __user *)p);
}
/*
* Break handling
*/
case TIOCSBRK: /* Turn break on, unconditionally */
if (tty->ops->break_ctl)
return tty->ops->break_ctl(tty, -1);
return 0;
case TIOCCBRK: /* Turn break off, unconditionally */
if (tty->ops->break_ctl)
return tty->ops->break_ctl(tty, 0);
return 0;
case TCSBRK: /* SVID version: non-zero arg --> no break */
/* non-zero arg means wait for all output data
* to be sent (performed above) but don't send break.
* This is used by the tcdrain() termios function.
*/
if (!arg)
return send_break(tty, 250);
return 0;
case TCSBRKP: /* support for POSIX tcsendbreak() */
return send_break(tty, arg ? arg*100 : 250);
case TIOCMGET:
return tty_tiocmget(tty, p);
case TIOCMSET:
case TIOCMBIC:
case TIOCMBIS:
return tty_tiocmset(tty, cmd, p);
case TIOCGICOUNT:
retval = tty_tiocgicount(tty, p);
/* For the moment allow fall through to the old method */
if (retval != -EINVAL)
return retval;
break;
case TCFLSH:
switch (arg) {
case TCIFLUSH:
case TCIOFLUSH:
/* flush tty buffer and allow ldisc to process ioctl */
tty_buffer_flush(tty, NULL);
break;
}
break;
case TIOCSSERIAL:
tty_warn_deprecated_flags(p);
break;
}
if (tty->ops->ioctl) {
retval = tty->ops->ioctl(tty, cmd, arg);
if (retval != -ENOIOCTLCMD)
return retval;
}
ld = tty_ldisc_ref_wait(tty);
retval = -EINVAL;
if (ld->ops->ioctl) {
retval = ld->ops->ioctl(tty, file, cmd, arg);
if (retval == -ENOIOCTLCMD)
retval = -ENOTTY;
}
tty_ldisc_deref(ld);
return retval;
} | 705 | True | 1 |
|
CVE-2016-0723 | False | False | False | False | AV:L/AC:L/Au:N/C:P/I:N/A:C | LOCAL | LOW | NONE | PARTIAL | NONE | COMPLETE | 5.6 | CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H | LOCAL | LOW | NONE | NONE | UNCHANGED | LOW | NONE | HIGH | 6.8 | MEDIUM | 2.5 | 4.2 | nan | [{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5c17c861a357e9458001f021a7afa7aab9937439', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5c17c861a357e9458001f021a7afa7aab9937439', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/5c17c861a357e9458001f021a7afa7aab9937439', 'name': 'https://github.com/torvalds/linux/commit/5c17c861a357e9458001f021a7afa7aab9937439', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1296253', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1296253', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://security-tracker.debian.org/tracker/CVE-2016-0723', 'name': 'https://security-tracker.debian.org/tracker/CVE-2016-0723', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://source.android.com/security/bulletin/2016-07-01.html', 'name': 'http://source.android.com/security/bulletin/2016-07-01.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-07/msg00005.html', 'name': 'SUSE-SU-2016:1764', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinoct2016-3090547.html', 'name': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinoct2016-3090547.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/82950', 'name': '82950', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00015.html', 'name': 'openSUSE-SU-2016:1008', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-1', 'name': 'USN-2930-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-1', 'name': 'USN-2929-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2948-2', 'name': 'USN-2948-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1035695', 'name': '1035695', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-2', 'name': 'USN-2930-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-2', 'name': 'USN-2929-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-3', 'name': 'USN-2930-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00094.html', 'name': 'SUSE-SU-2016:0911', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00045.html', 'name': 'SUSE-SU-2016:1102', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2948-1', 'name': 'USN-2948-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2016-February/176484.html', 'name': 'FEDORA-2016-5d43766e33', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3448', 'name': 'DSA-3448', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2016-February/176464.html', 'name': 'FEDORA-2016-2f25d12c51', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K43650115', 'name': 'https://support.f5.com/csp/article/K43650115', 'refsource': 'CONFIRM', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-200'}, {'lang': 'en', 'value': 'CWE-362'}, {'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Race condition in the tty_ioctl function in drivers/tty/tty_io.c in the Linux kernel through 4.4.1 allows local users to obtain sensitive information from kernel memory or cause a denial of service (use-after-free and system crash) by making a TIOCGETD ioctl call during processing of a TIOCSETD ioctl call.'}] | 2016-12-06T03:05Z | 2016-02-08T03:59Z | 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 | Peter Hurley | 2016-01-10 22:40:55-08:00 | tty: Fix unsafe ldisc reference via ioctl(TIOCGETD)
ioctl(TIOCGETD) retrieves the line discipline id directly from the
ldisc because the line discipline id (c_line) in termios is untrustworthy;
userspace may have set termios via ioctl(TCSETS*) without actually
changing the line discipline via ioctl(TIOCSETD).
However, directly accessing the current ldisc via tty->ldisc is
unsafe; the ldisc ptr dereferenced may be stale if the line discipline
is changing via ioctl(TIOCSETD) or hangup.
Wait for the line discipline reference (just like read() or write())
to retrieve the "current" line discipline id.
Cc: <stable@vger.kernel.org>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 5c17c861a357e9458001f021a7afa7aab9937439 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | tty_ioctl | tty_ioctl( struct file * file , unsigned int cmd , unsigned long arg) | ['file', 'cmd', 'arg'] | long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
struct tty_struct *tty = file_tty(file);
struct tty_struct *real_tty;
void __user *p = (void __user *)arg;
int retval;
struct tty_ldisc *ld;
if (tty_paranoia_check(tty, file_inode(file), "tty_ioctl"))
return -EINVAL;
real_tty = tty_pair_get_tty(tty);
/*
* Factor out some common prep work
*/
switch (cmd) {
case TIOCSETD:
case TIOCSBRK:
case TIOCCBRK:
case TCSBRK:
case TCSBRKP:
retval = tty_check_change(tty);
if (retval)
return retval;
if (cmd != TIOCCBRK) {
tty_wait_until_sent(tty, 0);
if (signal_pending(current))
return -EINTR;
}
break;
}
/*
* Now do the stuff.
*/
switch (cmd) {
case TIOCSTI:
return tiocsti(tty, p);
case TIOCGWINSZ:
return tiocgwinsz(real_tty, p);
case TIOCSWINSZ:
return tiocswinsz(real_tty, p);
case TIOCCONS:
return real_tty != tty ? -EINVAL : tioccons(file);
case FIONBIO:
return fionbio(file, p);
case TIOCEXCL:
set_bit(TTY_EXCLUSIVE, &tty->flags);
return 0;
case TIOCNXCL:
clear_bit(TTY_EXCLUSIVE, &tty->flags);
return 0;
case TIOCGEXCL:
{
int excl = test_bit(TTY_EXCLUSIVE, &tty->flags);
return put_user(excl, (int __user *)p);
}
case TIOCNOTTY:
if (current->signal->tty != tty)
return -ENOTTY;
no_tty();
return 0;
case TIOCSCTTY:
return tiocsctty(real_tty, file, arg);
case TIOCGPGRP:
return tiocgpgrp(tty, real_tty, p);
case TIOCSPGRP:
return tiocspgrp(tty, real_tty, p);
case TIOCGSID:
return tiocgsid(tty, real_tty, p);
case TIOCGETD:
return put_user(tty->ldisc->ops->num, (int __user *)p);
case TIOCSETD:
return tiocsetd(tty, p);
case TIOCVHANGUP:
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
tty_vhangup(tty);
return 0;
case TIOCGDEV:
{
unsigned int ret = new_encode_dev(tty_devnum(real_tty));
return put_user(ret, (unsigned int __user *)p);
}
/*
* Break handling
*/
case TIOCSBRK: /* Turn break on, unconditionally */
if (tty->ops->break_ctl)
return tty->ops->break_ctl(tty, -1);
return 0;
case TIOCCBRK: /* Turn break off, unconditionally */
if (tty->ops->break_ctl)
return tty->ops->break_ctl(tty, 0);
return 0;
case TCSBRK: /* SVID version: non-zero arg --> no break */
/* non-zero arg means wait for all output data
* to be sent (performed above) but don't send break.
* This is used by the tcdrain() termios function.
*/
if (!arg)
return send_break(tty, 250);
return 0;
case TCSBRKP: /* support for POSIX tcsendbreak() */
return send_break(tty, arg ? arg*100 : 250);
case TIOCMGET:
return tty_tiocmget(tty, p);
case TIOCMSET:
case TIOCMBIC:
case TIOCMBIS:
return tty_tiocmset(tty, cmd, p);
case TIOCGICOUNT:
retval = tty_tiocgicount(tty, p);
/* For the moment allow fall through to the old method */
if (retval != -EINVAL)
return retval;
break;
case TCFLSH:
switch (arg) {
case TCIFLUSH:
case TCIOFLUSH:
/* flush tty buffer and allow ldisc to process ioctl */
tty_buffer_flush(tty, NULL);
break;
}
break;
case TIOCSSERIAL:
tty_warn_deprecated_flags(p);
break;
}
if (tty->ops->ioctl) {
retval = tty->ops->ioctl(tty, cmd, arg);
if (retval != -ENOIOCTLCMD)
return retval;
}
ld = tty_ldisc_ref_wait(tty);
retval = -EINVAL;
if (ld->ops->ioctl) {
retval = ld->ops->ioctl(tty, file, cmd, arg);
if (retval == -ENOIOCTLCMD)
retval = -ENOTTY;
}
tty_ldisc_deref(ld);
return retval;
} | 705 | True | 1 |
|
CVE-2016-0723 | False | False | False | False | AV:L/AC:L/Au:N/C:P/I:N/A:C | LOCAL | LOW | NONE | PARTIAL | NONE | COMPLETE | 5.6 | CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H | LOCAL | LOW | NONE | NONE | UNCHANGED | LOW | NONE | HIGH | 6.8 | MEDIUM | 2.5 | 4.2 | nan | [{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5c17c861a357e9458001f021a7afa7aab9937439', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5c17c861a357e9458001f021a7afa7aab9937439', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/5c17c861a357e9458001f021a7afa7aab9937439', 'name': 'https://github.com/torvalds/linux/commit/5c17c861a357e9458001f021a7afa7aab9937439', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1296253', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1296253', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://security-tracker.debian.org/tracker/CVE-2016-0723', 'name': 'https://security-tracker.debian.org/tracker/CVE-2016-0723', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://source.android.com/security/bulletin/2016-07-01.html', 'name': 'http://source.android.com/security/bulletin/2016-07-01.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-07/msg00005.html', 'name': 'SUSE-SU-2016:1764', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinoct2016-3090547.html', 'name': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinoct2016-3090547.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/82950', 'name': '82950', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00015.html', 'name': 'openSUSE-SU-2016:1008', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-1', 'name': 'USN-2967-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2967-2', 'name': 'USN-2967-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-1', 'name': 'USN-2930-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-1', 'name': 'USN-2929-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2948-2', 'name': 'USN-2948-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1035695', 'name': '1035695', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-2', 'name': 'USN-2930-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-2', 'name': 'USN-2929-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-3', 'name': 'USN-2930-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00094.html', 'name': 'SUSE-SU-2016:0911', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00045.html', 'name': 'SUSE-SU-2016:1102', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2948-1', 'name': 'USN-2948-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2016-February/176484.html', 'name': 'FEDORA-2016-5d43766e33', 'refsource': 'FEDORA', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3448', 'name': 'DSA-3448', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2016-February/176464.html', 'name': 'FEDORA-2016-2f25d12c51', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://support.f5.com/csp/article/K43650115', 'name': 'https://support.f5.com/csp/article/K43650115', 'refsource': 'CONFIRM', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-200'}, {'lang': 'en', 'value': 'CWE-362'}, {'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Race condition in the tty_ioctl function in drivers/tty/tty_io.c in the Linux kernel through 4.4.1 allows local users to obtain sensitive information from kernel memory or cause a denial of service (use-after-free and system crash) by making a TIOCGETD ioctl call during processing of a TIOCSETD ioctl call.'}] | 2016-12-06T03:05Z | 2016-02-08T03:59Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Peter Hurley | 2016-01-10 22:40:55-08:00 | tty: Fix unsafe ldisc reference via ioctl(TIOCGETD)
ioctl(TIOCGETD) retrieves the line discipline id directly from the
ldisc because the line discipline id (c_line) in termios is untrustworthy;
userspace may have set termios via ioctl(TCSETS*) without actually
changing the line discipline via ioctl(TIOCSETD).
However, directly accessing the current ldisc via tty->ldisc is
unsafe; the ldisc ptr dereferenced may be stale if the line discipline
is changing via ioctl(TIOCSETD) or hangup.
Wait for the line discipline reference (just like read() or write())
to retrieve the "current" line discipline id.
Cc: <stable@vger.kernel.org>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 5c17c861a357e9458001f021a7afa7aab9937439 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | tty_ioctl | tty_ioctl( struct file * file , unsigned int cmd , unsigned long arg) | ['file', 'cmd', 'arg'] | long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
struct tty_struct *tty = file_tty(file);
struct tty_struct *real_tty;
void __user *p = (void __user *)arg;
int retval;
struct tty_ldisc *ld;
if (tty_paranoia_check(tty, file_inode(file), "tty_ioctl"))
return -EINVAL;
real_tty = tty_pair_get_tty(tty);
/*
* Factor out some common prep work
*/
switch (cmd) {
case TIOCSETD:
case TIOCSBRK:
case TIOCCBRK:
case TCSBRK:
case TCSBRKP:
retval = tty_check_change(tty);
if (retval)
return retval;
if (cmd != TIOCCBRK) {
tty_wait_until_sent(tty, 0);
if (signal_pending(current))
return -EINTR;
}
break;
}
/*
* Now do the stuff.
*/
switch (cmd) {
case TIOCSTI:
return tiocsti(tty, p);
case TIOCGWINSZ:
return tiocgwinsz(real_tty, p);
case TIOCSWINSZ:
return tiocswinsz(real_tty, p);
case TIOCCONS:
return real_tty != tty ? -EINVAL : tioccons(file);
case FIONBIO:
return fionbio(file, p);
case TIOCEXCL:
set_bit(TTY_EXCLUSIVE, &tty->flags);
return 0;
case TIOCNXCL:
clear_bit(TTY_EXCLUSIVE, &tty->flags);
return 0;
case TIOCGEXCL:
{
int excl = test_bit(TTY_EXCLUSIVE, &tty->flags);
return put_user(excl, (int __user *)p);
}
case TIOCNOTTY:
if (current->signal->tty != tty)
return -ENOTTY;
no_tty();
return 0;
case TIOCSCTTY:
return tiocsctty(real_tty, file, arg);
case TIOCGPGRP:
return tiocgpgrp(tty, real_tty, p);
case TIOCSPGRP:
return tiocspgrp(tty, real_tty, p);
case TIOCGSID:
return tiocgsid(tty, real_tty, p);
case TIOCGETD:
return put_user(tty->ldisc->ops->num, (int __user *)p);
case TIOCSETD:
return tiocsetd(tty, p);
case TIOCVHANGUP:
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
tty_vhangup(tty);
return 0;
case TIOCGDEV:
{
unsigned int ret = new_encode_dev(tty_devnum(real_tty));
return put_user(ret, (unsigned int __user *)p);
}
/*
* Break handling
*/
case TIOCSBRK: /* Turn break on, unconditionally */
if (tty->ops->break_ctl)
return tty->ops->break_ctl(tty, -1);
return 0;
case TIOCCBRK: /* Turn break off, unconditionally */
if (tty->ops->break_ctl)
return tty->ops->break_ctl(tty, 0);
return 0;
case TCSBRK: /* SVID version: non-zero arg --> no break */
/* non-zero arg means wait for all output data
* to be sent (performed above) but don't send break.
* This is used by the tcdrain() termios function.
*/
if (!arg)
return send_break(tty, 250);
return 0;
case TCSBRKP: /* support for POSIX tcsendbreak() */
return send_break(tty, arg ? arg*100 : 250);
case TIOCMGET:
return tty_tiocmget(tty, p);
case TIOCMSET:
case TIOCMBIC:
case TIOCMBIS:
return tty_tiocmset(tty, cmd, p);
case TIOCGICOUNT:
retval = tty_tiocgicount(tty, p);
/* For the moment allow fall through to the old method */
if (retval != -EINVAL)
return retval;
break;
case TCFLSH:
switch (arg) {
case TCIFLUSH:
case TCIOFLUSH:
/* flush tty buffer and allow ldisc to process ioctl */
tty_buffer_flush(tty, NULL);
break;
}
break;
case TIOCSSERIAL:
tty_warn_deprecated_flags(p);
break;
}
if (tty->ops->ioctl) {
retval = tty->ops->ioctl(tty, cmd, arg);
if (retval != -ENOIOCTLCMD)
return retval;
}
ld = tty_ldisc_ref_wait(tty);
retval = -EINVAL;
if (ld->ops->ioctl) {
retval = ld->ops->ioctl(tty, file, cmd, arg);
if (retval == -ENOIOCTLCMD)
retval = -ENOTTY;
}
tty_ldisc_deref(ld);
return retval;
} | 705 | True | 1 |
|
CVE-2016-7913 | False | False | False | True | AV:N/AC:M/Au:N/C:C/I:C/A:C | NETWORK | MEDIUM | NONE | COMPLETE | COMPLETE | COMPLETE | 9.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | nan | [{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8dfbcc4351a0b6d2f2d77f367552f48ffefafe18', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8dfbcc4351a0b6d2f2d77f367552f48ffefafe18', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://source.android.com/security/bulletin/2016-11-01.html', 'name': 'http://source.android.com/security/bulletin/2016-11-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/8dfbcc4351a0b6d2f2d77f367552f48ffefafe18', 'name': 'https://github.com/torvalds/linux/commit/8dfbcc4351a0b6d2f2d77f367552f48ffefafe18', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94201', 'name': '94201', 'refsource': 'BID', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1062', 'name': 'RHSA-2018:1062', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:0676', 'name': 'RHSA-2018:0676', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://usn.ubuntu.com/3798-2/', 'name': 'USN-3798-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3798-1/', 'name': 'USN-3798-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:1170', 'name': 'RHSA-2019:1170', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2019:1190', 'name': 'RHSA-2019:1190', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-416'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The xc2028_set_config function in drivers/media/tuners/tuner-xc2028.c in the Linux kernel before 4.6 allows local users to gain privileges or cause a denial of service (use-after-free) via vectors involving omission of the firmware name from a certain data structure.'}] | 2019-05-14T23:29Z | 2016-11-16T05:59Z | 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 | Mauro Carvalho Chehab | 2016-01-28 09:22:44-02:00 | [media] xc2028: avoid use after free
If struct xc2028_config is passed without a firmware name,
the following trouble may happen:
[11009.907205] xc2028 5-0061: type set to XCeive xc2028/xc3028 tuner
[11009.907491] ==================================================================
[11009.907750] BUG: KASAN: use-after-free in strcmp+0x96/0xb0 at addr ffff8803bd78ab40
[11009.907992] Read of size 1 by task modprobe/28992
[11009.907994] =============================================================================
[11009.907997] BUG kmalloc-16 (Tainted: G W ): kasan: bad access detected
[11009.907999] -----------------------------------------------------------------------------
[11009.908008] INFO: Allocated in xhci_urb_enqueue+0x214/0x14c0 [xhci_hcd] age=0 cpu=3 pid=28992
[11009.908012] ___slab_alloc+0x581/0x5b0
[11009.908014] __slab_alloc+0x51/0x90
[11009.908017] __kmalloc+0x27b/0x350
[11009.908022] xhci_urb_enqueue+0x214/0x14c0 [xhci_hcd]
[11009.908026] usb_hcd_submit_urb+0x1e8/0x1c60
[11009.908029] usb_submit_urb+0xb0e/0x1200
[11009.908032] usb_serial_generic_write_start+0xb6/0x4c0
[11009.908035] usb_serial_generic_write+0x92/0xc0
[11009.908039] usb_console_write+0x38a/0x560
[11009.908045] call_console_drivers.constprop.14+0x1ee/0x2c0
[11009.908051] console_unlock+0x40d/0x900
[11009.908056] vprintk_emit+0x4b4/0x830
[11009.908061] vprintk_default+0x1f/0x30
[11009.908064] printk+0x99/0xb5
[11009.908067] kasan_report_error+0x10a/0x550
[11009.908070] __asan_report_load1_noabort+0x43/0x50
[11009.908074] INFO: Freed in xc2028_set_config+0x90/0x630 [tuner_xc2028] age=1 cpu=3 pid=28992
[11009.908077] __slab_free+0x2ec/0x460
[11009.908080] kfree+0x266/0x280
[11009.908083] xc2028_set_config+0x90/0x630 [tuner_xc2028]
[11009.908086] xc2028_attach+0x310/0x8a0 [tuner_xc2028]
[11009.908090] em28xx_attach_xc3028.constprop.7+0x1f9/0x30d [em28xx_dvb]
[11009.908094] em28xx_dvb_init.part.3+0x8e4/0x5cf4 [em28xx_dvb]
[11009.908098] em28xx_dvb_init+0x81/0x8a [em28xx_dvb]
[11009.908101] em28xx_register_extension+0xd9/0x190 [em28xx]
[11009.908105] em28xx_dvb_register+0x10/0x1000 [em28xx_dvb]
[11009.908108] do_one_initcall+0x141/0x300
[11009.908111] do_init_module+0x1d0/0x5ad
[11009.908114] load_module+0x6666/0x9ba0
[11009.908117] SyS_finit_module+0x108/0x130
[11009.908120] entry_SYSCALL_64_fastpath+0x16/0x76
[11009.908123] INFO: Slab 0xffffea000ef5e280 objects=25 used=25 fp=0x (null) flags=0x2ffff8000004080
[11009.908126] INFO: Object 0xffff8803bd78ab40 @offset=2880 fp=0x0000000000000001
[11009.908130] Bytes b4 ffff8803bd78ab30: 01 00 00 00 2a 07 00 00 9d 28 00 00 01 00 00 00 ....*....(......
[11009.908133] Object ffff8803bd78ab40: 01 00 00 00 00 00 00 00 b0 1d c3 6a 00 88 ff ff ...........j....
[11009.908137] CPU: 3 PID: 28992 Comm: modprobe Tainted: G B W 4.5.0-rc1+ #43
[11009.908140] Hardware name: /NUC5i7RYB, BIOS RYBDWi35.86A.0350.2015.0812.1722 08/12/2015
[11009.908142] ffff8803bd78a000 ffff8802c273f1b8 ffffffff81932007 ffff8803c6407a80
[11009.908148] ffff8802c273f1e8 ffffffff81556759 ffff8803c6407a80 ffffea000ef5e280
[11009.908153] ffff8803bd78ab40 dffffc0000000000 ffff8802c273f210 ffffffff8155ccb4
[11009.908158] Call Trace:
[11009.908162] [<ffffffff81932007>] dump_stack+0x4b/0x64
[11009.908165] [<ffffffff81556759>] print_trailer+0xf9/0x150
[11009.908168] [<ffffffff8155ccb4>] object_err+0x34/0x40
[11009.908171] [<ffffffff8155f260>] kasan_report_error+0x230/0x550
[11009.908175] [<ffffffff81237d71>] ? trace_hardirqs_off_caller+0x21/0x290
[11009.908179] [<ffffffff8155e926>] ? kasan_unpoison_shadow+0x36/0x50
[11009.908182] [<ffffffff8155f5c3>] __asan_report_load1_noabort+0x43/0x50
[11009.908185] [<ffffffff8155ea00>] ? __asan_register_globals+0x50/0xa0
[11009.908189] [<ffffffff8194cea6>] ? strcmp+0x96/0xb0
[11009.908192] [<ffffffff8194cea6>] strcmp+0x96/0xb0
[11009.908196] [<ffffffffa13ba4ac>] xc2028_set_config+0x15c/0x630 [tuner_xc2028]
[11009.908200] [<ffffffffa13bac90>] xc2028_attach+0x310/0x8a0 [tuner_xc2028]
[11009.908203] [<ffffffff8155ea78>] ? memset+0x28/0x30
[11009.908206] [<ffffffffa13ba980>] ? xc2028_set_config+0x630/0x630 [tuner_xc2028]
[11009.908211] [<ffffffffa157a59a>] em28xx_attach_xc3028.constprop.7+0x1f9/0x30d [em28xx_dvb]
[11009.908215] [<ffffffffa157aa2a>] ? em28xx_dvb_init.part.3+0x37c/0x5cf4 [em28xx_dvb]
[11009.908219] [<ffffffffa157a3a1>] ? hauppauge_hvr930c_init+0x487/0x487 [em28xx_dvb]
[11009.908222] [<ffffffffa01795ac>] ? lgdt330x_attach+0x1cc/0x370 [lgdt330x]
[11009.908226] [<ffffffffa01793e0>] ? i2c_read_demod_bytes.isra.2+0x210/0x210 [lgdt330x]
[11009.908230] [<ffffffff812e87d0>] ? ref_module.part.15+0x10/0x10
[11009.908233] [<ffffffff812e56e0>] ? module_assert_mutex_or_preempt+0x80/0x80
[11009.908238] [<ffffffffa157af92>] em28xx_dvb_init.part.3+0x8e4/0x5cf4 [em28xx_dvb]
[11009.908242] [<ffffffffa157a6ae>] ? em28xx_attach_xc3028.constprop.7+0x30d/0x30d [em28xx_dvb]
[11009.908245] [<ffffffff8195222d>] ? string+0x14d/0x1f0
[11009.908249] [<ffffffff8195381f>] ? symbol_string+0xff/0x1a0
[11009.908253] [<ffffffff81953720>] ? uuid_string+0x6f0/0x6f0
[11009.908257] [<ffffffff811a775e>] ? __kernel_text_address+0x7e/0xa0
[11009.908260] [<ffffffff8104b02f>] ? print_context_stack+0x7f/0xf0
[11009.908264] [<ffffffff812e9846>] ? __module_address+0xb6/0x360
[11009.908268] [<ffffffff8137fdc9>] ? is_ftrace_trampoline+0x99/0xe0
[11009.908271] [<ffffffff811a775e>] ? __kernel_text_address+0x7e/0xa0
[11009.908275] [<ffffffff81240a70>] ? debug_check_no_locks_freed+0x290/0x290
[11009.908278] [<ffffffff8104a24b>] ? dump_trace+0x11b/0x300
[11009.908282] [<ffffffffa13e8143>] ? em28xx_register_extension+0x23/0x190 [em28xx]
[11009.908285] [<ffffffff81237d71>] ? trace_hardirqs_off_caller+0x21/0x290
[11009.908289] [<ffffffff8123ff56>] ? trace_hardirqs_on_caller+0x16/0x590
[11009.908292] [<ffffffff812404dd>] ? trace_hardirqs_on+0xd/0x10
[11009.908296] [<ffffffffa13e8143>] ? em28xx_register_extension+0x23/0x190 [em28xx]
[11009.908299] [<ffffffff822dcbb0>] ? mutex_trylock+0x400/0x400
[11009.908302] [<ffffffff810021a1>] ? do_one_initcall+0x131/0x300
[11009.908306] [<ffffffff81296dc7>] ? call_rcu_sched+0x17/0x20
[11009.908309] [<ffffffff8159e708>] ? put_object+0x48/0x70
[11009.908314] [<ffffffffa1579f11>] em28xx_dvb_init+0x81/0x8a [em28xx_dvb]
[11009.908317] [<ffffffffa13e81f9>] em28xx_register_extension+0xd9/0x190 [em28xx]
[11009.908320] [<ffffffffa0150000>] ? 0xffffffffa0150000
[11009.908324] [<ffffffffa0150010>] em28xx_dvb_register+0x10/0x1000 [em28xx_dvb]
[11009.908327] [<ffffffff810021b1>] do_one_initcall+0x141/0x300
[11009.908330] [<ffffffff81002070>] ? try_to_run_init_process+0x40/0x40
[11009.908333] [<ffffffff8123ff56>] ? trace_hardirqs_on_caller+0x16/0x590
[11009.908337] [<ffffffff8155e926>] ? kasan_unpoison_shadow+0x36/0x50
[11009.908340] [<ffffffff8155e926>] ? kasan_unpoison_shadow+0x36/0x50
[11009.908343] [<ffffffff8155e926>] ? kasan_unpoison_shadow+0x36/0x50
[11009.908346] [<ffffffff8155ea37>] ? __asan_register_globals+0x87/0xa0
[11009.908350] [<ffffffff8144da7b>] do_init_module+0x1d0/0x5ad
[11009.908353] [<ffffffff812f2626>] load_module+0x6666/0x9ba0
[11009.908356] [<ffffffff812e9c90>] ? symbol_put_addr+0x50/0x50
[11009.908361] [<ffffffffa1580037>] ? em28xx_dvb_init.part.3+0x5989/0x5cf4 [em28xx_dvb]
[11009.908366] [<ffffffff812ebfc0>] ? module_frob_arch_sections+0x20/0x20
[11009.908369] [<ffffffff815bc940>] ? open_exec+0x50/0x50
[11009.908374] [<ffffffff811671bb>] ? ns_capable+0x5b/0xd0
[11009.908377] [<ffffffff812f5e58>] SyS_finit_module+0x108/0x130
[11009.908379] [<ffffffff812f5d50>] ? SyS_init_module+0x1f0/0x1f0
[11009.908383] [<ffffffff81004044>] ? lockdep_sys_exit_thunk+0x12/0x14
[11009.908394] [<ffffffff822e6936>] entry_SYSCALL_64_fastpath+0x16/0x76
[11009.908396] Memory state around the buggy address:
[11009.908398] ffff8803bd78aa00: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[11009.908401] ffff8803bd78aa80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[11009.908403] >ffff8803bd78ab00: fc fc fc fc fc fc fc fc 00 00 fc fc fc fc fc fc
[11009.908405] ^
[11009.908407] ffff8803bd78ab80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[11009.908409] ffff8803bd78ac00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[11009.908411] ==================================================================
In order to avoid it, let's set the cached value of the firmware
name to NULL after freeing it. While here, return an error if
the memory allocation fails.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 8dfbcc4351a0b6d2f2d77f367552f48ffefafe18 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | xc2028_set_config | xc2028_set_config( struct dvb_frontend * fe , void * priv_cfg) | ['fe', 'priv_cfg'] | static int xc2028_set_config(struct dvb_frontend *fe, void *priv_cfg)
{
struct xc2028_data *priv = fe->tuner_priv;
struct xc2028_ctrl *p = priv_cfg;
int rc = 0;
tuner_dbg("%s called\n", __func__);
mutex_lock(&priv->lock);
/*
* Copy the config data.
* For the firmware name, keep a local copy of the string,
* in order to avoid troubles during device release.
*/
kfree(priv->ctrl.fname);
memcpy(&priv->ctrl, p, sizeof(priv->ctrl));
if (p->fname) {
priv->ctrl.fname = kstrdup(p->fname, GFP_KERNEL);
if (priv->ctrl.fname == NULL)
rc = -ENOMEM;
}
/*
* If firmware name changed, frees firmware. As free_firmware will
* reset the status to NO_FIRMWARE, this forces a new request_firmware
*/
if (!firmware_name[0] && p->fname &&
priv->fname && strcmp(p->fname, priv->fname))
free_firmware(priv);
if (priv->ctrl.max_len < 9)
priv->ctrl.max_len = 13;
if (priv->state == XC2028_NO_FIRMWARE) {
if (!firmware_name[0])
priv->fname = priv->ctrl.fname;
else
priv->fname = firmware_name;
rc = request_firmware_nowait(THIS_MODULE, 1,
priv->fname,
priv->i2c_props.adap->dev.parent,
GFP_KERNEL,
fe, load_firmware_cb);
if (rc < 0) {
tuner_err("Failed to request firmware %s\n",
priv->fname);
priv->state = XC2028_NODEV;
} else
priv->state = XC2028_WAITING_FIRMWARE;
}
mutex_unlock(&priv->lock);
return rc;
} | 268 | True | 1 |
|
CVE-2016-7917 | 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:L/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N | LOCAL | LOW | LOW | REQUIRED | UNCHANGED | HIGH | NONE | NONE | 5.0 | MEDIUM | 1.3 | 3.6 | nan | [{'url': 'https://github.com/torvalds/linux/commit/c58d6c93680f28ac58984af61d0a7ebf4319c241', 'name': 'https://github.com/torvalds/linux/commit/c58d6c93680f28ac58984af61d0a7ebf4319c241', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c58d6c93680f28ac58984af61d0a7ebf4319c241', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c58d6c93680f28ac58984af61d0a7ebf4319c241', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://source.android.com/security/bulletin/2016-11-01.html', 'name': 'http://source.android.com/security/bulletin/2016-11-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94147', 'name': '94147', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}] | [{'description': [{'lang': 'en', 'value': 'CWE-200'}, {'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4.32', 'cpe_name': []}]}] | [{'lang': 'en', 'value': "The nfnetlink_rcv_batch function in net/netfilter/nfnetlink.c in the Linux kernel before 4.5 does not check whether a batch message's length field is large enough, which allows local users to obtain sensitive information from kernel memory or cause a denial of service (infinite loop or out-of-bounds read) by leveraging the CAP_NET_ADMIN capability."}] | 2016-12-02T23:13Z | 2016-11-16T05:59Z | 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 | Phil Turnbull | 2016-02-02 13:36:45-05:00 | netfilter: nfnetlink: correctly validate length of batch messages
If nlh->nlmsg_len is zero then an infinite loop is triggered because
'skb_pull(skb, msglen);' pulls zero bytes.
The calculation in nlmsg_len() underflows if 'nlh->nlmsg_len <
NLMSG_HDRLEN' which bypasses the length validation and will later
trigger an out-of-bound read.
If the length validation does fail then the malformed batch message is
copied back to userspace. However, we cannot do this because the
nlh->nlmsg_len can be invalid. This leads to an out-of-bounds read in
netlink_ack:
[ 41.455421] ==================================================================
[ 41.456431] BUG: KASAN: slab-out-of-bounds in memcpy+0x1d/0x40 at addr ffff880119e79340
[ 41.456431] Read of size 4294967280 by task a.out/987
[ 41.456431] =============================================================================
[ 41.456431] BUG kmalloc-512 (Not tainted): kasan: bad access detected
[ 41.456431] -----------------------------------------------------------------------------
...
[ 41.456431] Bytes b4 ffff880119e79310: 00 00 00 00 d5 03 00 00 b0 fb fe ff 00 00 00 00 ................
[ 41.456431] Object ffff880119e79320: 20 00 00 00 10 00 05 00 00 00 00 00 00 00 00 00 ...............
[ 41.456431] Object ffff880119e79330: 14 00 0a 00 01 03 fc 40 45 56 11 22 33 10 00 05 .......@EV."3...
[ 41.456431] Object ffff880119e79340: f0 ff ff ff 88 99 aa bb 00 14 00 0a 00 06 fe fb ................
^^ start of batch nlmsg with
nlmsg_len=4294967280
...
[ 41.456431] Memory state around the buggy address:
[ 41.456431] ffff880119e79400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 41.456431] ffff880119e79480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 41.456431] >ffff880119e79500: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc
[ 41.456431] ^
[ 41.456431] ffff880119e79580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[ 41.456431] ffff880119e79600: fc fc fc fc fc fc fc fc fc fc fb fb fb fb fb fb
[ 41.456431] ==================================================================
Fix this with better validation of nlh->nlmsg_len and by setting
NFNL_BATCH_FAILURE if any batch message fails length validation.
CAP_NET_ADMIN is required to trigger the bugs.
Fixes: 9ea2aa8b7dba ("netfilter: nfnetlink: validate nfnetlink header from batch")
Signed-off-by: Phil Turnbull <phil.turnbull@oracle.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | c58d6c93680f28ac58984af61d0a7ebf4319c241 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | nfnetlink_rcv_batch | nfnetlink_rcv_batch( struct sk_buff * skb , struct nlmsghdr * nlh , u_int16_t subsys_id) | ['skb', 'nlh', 'subsys_id'] | static void nfnetlink_rcv_batch(struct sk_buff *skb, struct nlmsghdr *nlh,
u_int16_t subsys_id)
{
struct sk_buff *oskb = skb;
struct net *net = sock_net(skb->sk);
const struct nfnetlink_subsystem *ss;
const struct nfnl_callback *nc;
static LIST_HEAD(err_list);
u32 status;
int err;
if (subsys_id >= NFNL_SUBSYS_COUNT)
return netlink_ack(skb, nlh, -EINVAL);
replay:
status = 0;
skb = netlink_skb_clone(oskb, GFP_KERNEL);
if (!skb)
return netlink_ack(oskb, nlh, -ENOMEM);
nfnl_lock(subsys_id);
ss = nfnl_dereference_protected(subsys_id);
if (!ss) {
#ifdef CONFIG_MODULES
nfnl_unlock(subsys_id);
request_module("nfnetlink-subsys-%d", subsys_id);
nfnl_lock(subsys_id);
ss = nfnl_dereference_protected(subsys_id);
if (!ss)
#endif
{
nfnl_unlock(subsys_id);
netlink_ack(oskb, nlh, -EOPNOTSUPP);
return kfree_skb(skb);
}
}
if (!ss->commit || !ss->abort) {
nfnl_unlock(subsys_id);
netlink_ack(oskb, nlh, -EOPNOTSUPP);
return kfree_skb(skb);
}
while (skb->len >= nlmsg_total_size(0)) {
int msglen, type;
nlh = nlmsg_hdr(skb);
err = 0;
if (nlmsg_len(nlh) < sizeof(struct nfgenmsg) ||
skb->len < nlh->nlmsg_len) {
err = -EINVAL;
goto ack;
}
/* Only requests are handled by the kernel */
if (!(nlh->nlmsg_flags & NLM_F_REQUEST)) {
err = -EINVAL;
goto ack;
}
type = nlh->nlmsg_type;
if (type == NFNL_MSG_BATCH_BEGIN) {
/* Malformed: Batch begin twice */
nfnl_err_reset(&err_list);
status |= NFNL_BATCH_FAILURE;
goto done;
} else if (type == NFNL_MSG_BATCH_END) {
status |= NFNL_BATCH_DONE;
goto done;
} else if (type < NLMSG_MIN_TYPE) {
err = -EINVAL;
goto ack;
}
/* We only accept a batch with messages for the same
* subsystem.
*/
if (NFNL_SUBSYS_ID(type) != subsys_id) {
err = -EINVAL;
goto ack;
}
nc = nfnetlink_find_client(type, ss);
if (!nc) {
err = -EINVAL;
goto ack;
}
{
int min_len = nlmsg_total_size(sizeof(struct nfgenmsg));
u_int8_t cb_id = NFNL_MSG_TYPE(nlh->nlmsg_type);
struct nlattr *cda[ss->cb[cb_id].attr_count + 1];
struct nlattr *attr = (void *)nlh + min_len;
int attrlen = nlh->nlmsg_len - min_len;
err = nla_parse(cda, ss->cb[cb_id].attr_count,
attr, attrlen, ss->cb[cb_id].policy);
if (err < 0)
goto ack;
if (nc->call_batch) {
err = nc->call_batch(net, net->nfnl, skb, nlh,
(const struct nlattr **)cda);
}
/* The lock was released to autoload some module, we
* have to abort and start from scratch using the
* original skb.
*/
if (err == -EAGAIN) {
status |= NFNL_BATCH_REPLAY;
goto next;
}
}
ack:
if (nlh->nlmsg_flags & NLM_F_ACK || err) {
/* Errors are delivered once the full batch has been
* processed, this avoids that the same error is
* reported several times when replaying the batch.
*/
if (nfnl_err_add(&err_list, nlh, err) < 0) {
/* We failed to enqueue an error, reset the
* list of errors and send OOM to userspace
* pointing to the batch header.
*/
nfnl_err_reset(&err_list);
netlink_ack(oskb, nlmsg_hdr(oskb), -ENOMEM);
status |= NFNL_BATCH_FAILURE;
goto done;
}
/* We don't stop processing the batch on errors, thus,
* userspace gets all the errors that the batch
* triggers.
*/
if (err)
status |= NFNL_BATCH_FAILURE;
}
next:
msglen = NLMSG_ALIGN(nlh->nlmsg_len);
if (msglen > skb->len)
msglen = skb->len;
skb_pull(skb, msglen);
}
done:
if (status & NFNL_BATCH_REPLAY) {
ss->abort(net, oskb);
nfnl_err_reset(&err_list);
nfnl_unlock(subsys_id);
kfree_skb(skb);
goto replay;
} else if (status == NFNL_BATCH_DONE) {
ss->commit(net, oskb);
} else {
ss->abort(net, oskb);
}
nfnl_err_deliver(&err_list, oskb);
nfnl_unlock(subsys_id);
kfree_skb(skb);
} | 730 | True | 1 |
|
CVE-2016-7917 | 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:L/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N | LOCAL | LOW | LOW | REQUIRED | UNCHANGED | HIGH | NONE | NONE | 5.0 | MEDIUM | 1.3 | 3.6 | nan | [{'url': 'https://github.com/torvalds/linux/commit/c58d6c93680f28ac58984af61d0a7ebf4319c241', 'name': 'https://github.com/torvalds/linux/commit/c58d6c93680f28ac58984af61d0a7ebf4319c241', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c58d6c93680f28ac58984af61d0a7ebf4319c241', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c58d6c93680f28ac58984af61d0a7ebf4319c241', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://source.android.com/security/bulletin/2016-11-01.html', 'name': 'http://source.android.com/security/bulletin/2016-11-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/94147', 'name': '94147', 'refsource': 'BID', 'tags': ['Third Party Advisory', 'VDB Entry']}] | [{'description': [{'lang': 'en', 'value': 'CWE-200'}, {'lang': 'en', 'value': 'CWE-125'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4.32', 'cpe_name': []}]}] | [{'lang': 'en', 'value': "The nfnetlink_rcv_batch function in net/netfilter/nfnetlink.c in the Linux kernel before 4.5 does not check whether a batch message's length field is large enough, which allows local users to obtain sensitive information from kernel memory or cause a denial of service (infinite loop or out-of-bounds read) by leveraging the CAP_NET_ADMIN capability."}] | 2016-12-02T23:13Z | 2016-11-16T05:59Z | 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 | Phil Turnbull | 2016-02-02 13:36:45-05:00 | netfilter: nfnetlink: correctly validate length of batch messages
If nlh->nlmsg_len is zero then an infinite loop is triggered because
'skb_pull(skb, msglen);' pulls zero bytes.
The calculation in nlmsg_len() underflows if 'nlh->nlmsg_len <
NLMSG_HDRLEN' which bypasses the length validation and will later
trigger an out-of-bound read.
If the length validation does fail then the malformed batch message is
copied back to userspace. However, we cannot do this because the
nlh->nlmsg_len can be invalid. This leads to an out-of-bounds read in
netlink_ack:
[ 41.455421] ==================================================================
[ 41.456431] BUG: KASAN: slab-out-of-bounds in memcpy+0x1d/0x40 at addr ffff880119e79340
[ 41.456431] Read of size 4294967280 by task a.out/987
[ 41.456431] =============================================================================
[ 41.456431] BUG kmalloc-512 (Not tainted): kasan: bad access detected
[ 41.456431] -----------------------------------------------------------------------------
...
[ 41.456431] Bytes b4 ffff880119e79310: 00 00 00 00 d5 03 00 00 b0 fb fe ff 00 00 00 00 ................
[ 41.456431] Object ffff880119e79320: 20 00 00 00 10 00 05 00 00 00 00 00 00 00 00 00 ...............
[ 41.456431] Object ffff880119e79330: 14 00 0a 00 01 03 fc 40 45 56 11 22 33 10 00 05 .......@EV."3...
[ 41.456431] Object ffff880119e79340: f0 ff ff ff 88 99 aa bb 00 14 00 0a 00 06 fe fb ................
^^ start of batch nlmsg with
nlmsg_len=4294967280
...
[ 41.456431] Memory state around the buggy address:
[ 41.456431] ffff880119e79400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 41.456431] ffff880119e79480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 41.456431] >ffff880119e79500: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc
[ 41.456431] ^
[ 41.456431] ffff880119e79580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[ 41.456431] ffff880119e79600: fc fc fc fc fc fc fc fc fc fc fb fb fb fb fb fb
[ 41.456431] ==================================================================
Fix this with better validation of nlh->nlmsg_len and by setting
NFNL_BATCH_FAILURE if any batch message fails length validation.
CAP_NET_ADMIN is required to trigger the bugs.
Fixes: 9ea2aa8b7dba ("netfilter: nfnetlink: validate nfnetlink header from batch")
Signed-off-by: Phil Turnbull <phil.turnbull@oracle.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | c58d6c93680f28ac58984af61d0a7ebf4319c241 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | nfnetlink_rcv_batch | nfnetlink_rcv_batch( struct sk_buff * skb , struct nlmsghdr * nlh , u_int16_t subsys_id) | ['skb', 'nlh', 'subsys_id'] | static void nfnetlink_rcv_batch(struct sk_buff *skb, struct nlmsghdr *nlh,
u_int16_t subsys_id)
{
struct sk_buff *oskb = skb;
struct net *net = sock_net(skb->sk);
const struct nfnetlink_subsystem *ss;
const struct nfnl_callback *nc;
static LIST_HEAD(err_list);
u32 status;
int err;
if (subsys_id >= NFNL_SUBSYS_COUNT)
return netlink_ack(skb, nlh, -EINVAL);
replay:
status = 0;
skb = netlink_skb_clone(oskb, GFP_KERNEL);
if (!skb)
return netlink_ack(oskb, nlh, -ENOMEM);
nfnl_lock(subsys_id);
ss = nfnl_dereference_protected(subsys_id);
if (!ss) {
#ifdef CONFIG_MODULES
nfnl_unlock(subsys_id);
request_module("nfnetlink-subsys-%d", subsys_id);
nfnl_lock(subsys_id);
ss = nfnl_dereference_protected(subsys_id);
if (!ss)
#endif
{
nfnl_unlock(subsys_id);
netlink_ack(oskb, nlh, -EOPNOTSUPP);
return kfree_skb(skb);
}
}
if (!ss->commit || !ss->abort) {
nfnl_unlock(subsys_id);
netlink_ack(oskb, nlh, -EOPNOTSUPP);
return kfree_skb(skb);
}
while (skb->len >= nlmsg_total_size(0)) {
int msglen, type;
nlh = nlmsg_hdr(skb);
err = 0;
if (nlmsg_len(nlh) < sizeof(struct nfgenmsg) ||
skb->len < nlh->nlmsg_len) {
err = -EINVAL;
goto ack;
}
/* Only requests are handled by the kernel */
if (!(nlh->nlmsg_flags & NLM_F_REQUEST)) {
err = -EINVAL;
goto ack;
}
type = nlh->nlmsg_type;
if (type == NFNL_MSG_BATCH_BEGIN) {
/* Malformed: Batch begin twice */
nfnl_err_reset(&err_list);
status |= NFNL_BATCH_FAILURE;
goto done;
} else if (type == NFNL_MSG_BATCH_END) {
status |= NFNL_BATCH_DONE;
goto done;
} else if (type < NLMSG_MIN_TYPE) {
err = -EINVAL;
goto ack;
}
/* We only accept a batch with messages for the same
* subsystem.
*/
if (NFNL_SUBSYS_ID(type) != subsys_id) {
err = -EINVAL;
goto ack;
}
nc = nfnetlink_find_client(type, ss);
if (!nc) {
err = -EINVAL;
goto ack;
}
{
int min_len = nlmsg_total_size(sizeof(struct nfgenmsg));
u_int8_t cb_id = NFNL_MSG_TYPE(nlh->nlmsg_type);
struct nlattr *cda[ss->cb[cb_id].attr_count + 1];
struct nlattr *attr = (void *)nlh + min_len;
int attrlen = nlh->nlmsg_len - min_len;
err = nla_parse(cda, ss->cb[cb_id].attr_count,
attr, attrlen, ss->cb[cb_id].policy);
if (err < 0)
goto ack;
if (nc->call_batch) {
err = nc->call_batch(net, net->nfnl, skb, nlh,
(const struct nlattr **)cda);
}
/* The lock was released to autoload some module, we
* have to abort and start from scratch using the
* original skb.
*/
if (err == -EAGAIN) {
status |= NFNL_BATCH_REPLAY;
goto next;
}
}
ack:
if (nlh->nlmsg_flags & NLM_F_ACK || err) {
/* Errors are delivered once the full batch has been
* processed, this avoids that the same error is
* reported several times when replaying the batch.
*/
if (nfnl_err_add(&err_list, nlh, err) < 0) {
/* We failed to enqueue an error, reset the
* list of errors and send OOM to userspace
* pointing to the batch header.
*/
nfnl_err_reset(&err_list);
netlink_ack(oskb, nlmsg_hdr(oskb), -ENOMEM);
status |= NFNL_BATCH_FAILURE;
goto done;
}
/* We don't stop processing the batch on errors, thus,
* userspace gets all the errors that the batch
* triggers.
*/
if (err)
status |= NFNL_BATCH_FAILURE;
}
next:
msglen = NLMSG_ALIGN(nlh->nlmsg_len);
if (msglen > skb->len)
msglen = skb->len;
skb_pull(skb, msglen);
}
done:
if (status & NFNL_BATCH_REPLAY) {
ss->abort(net, oskb);
nfnl_err_reset(&err_list);
nfnl_unlock(subsys_id);
kfree_skb(skb);
goto replay;
} else if (status == NFNL_BATCH_DONE) {
ss->commit(net, oskb);
} else {
ss->abort(net, oskb);
}
nfnl_err_deliver(&err_list, oskb);
nfnl_unlock(subsys_id);
kfree_skb(skb);
} | 730 | True | 1 |
|
CVE-2016-2550 | 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 | nan | [{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311517', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311517', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=415e3d3e90ce9e18727e8843ae343eda5a58fad6', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=415e3d3e90ce9e18727e8843ae343eda5a58fad6', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/02/23/2', 'name': '[oss-security] 20160223 CVE Request: Linux: unix: correctly track in-flight fds in sending process user_struct sockets', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/415e3d3e90ce9e18727e8843ae343eda5a58fad6', 'name': 'https://github.com/torvalds/linux/commit/415e3d3e90ce9e18727e8843ae343eda5a58fad6', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2949-1', 'name': 'USN-2949-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2946-2', 'name': 'USN-2946-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2947-2', 'name': 'USN-2947-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2946-1', 'name': 'USN-2946-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2947-3', 'name': 'USN-2947-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2948-2', 'name': 'USN-2948-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2947-1', 'name': 'USN-2947-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2948-1', 'name': 'USN-2948-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/security-advisory/cpujan2018-3236628.html', 'name': 'http://www.oracle.com/technetwork/security-advisory/cpujan2018-3236628.html', 'refsource': 'CONFIRM', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-399'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4.8', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The Linux kernel before 4.5 allows local users to bypass file-descriptor limits and cause a denial of service (memory consumption) by leveraging incorrect tracking of descriptor ownership and sending each descriptor over a UNIX socket before closing it. NOTE: this vulnerability exists because of an incorrect fix for CVE-2013-4312.'}] | 2018-01-18T18:18Z | 2016-04-27T17:59Z | Resource Management Errors | Weaknesses in this category are related to improper management of system resources. | https://cwe.mitre.org/data/definitions/399.html | 1 | Hannes Frederic Sowa | 2016-02-03 02:11:03+01:00 | unix: correctly track in-flight fds in sending process user_struct
The commit referenced in the Fixes tag incorrectly accounted the number
of in-flight fds over a unix domain socket to the original opener
of the file-descriptor. This allows another process to arbitrary
deplete the original file-openers resource limit for the maximum of
open files. Instead the sending processes and its struct cred should
be credited.
To do so, we add a reference counted struct user_struct pointer to the
scm_fp_list and use it to account for the number of inflight unix fds.
Fixes: 712f4aad406bb1 ("unix: properly account for FDs passed over unix sockets")
Reported-by: David Herrmann <dh.herrmann@gmail.com>
Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: Willy Tarreau <w@1wt.eu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | 415e3d3e90ce9e18727e8843ae343eda5a58fad6 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | unix_attach_fds | unix_attach_fds( struct scm_cookie * scm , struct sk_buff * skb) | ['scm', 'skb'] | static int unix_attach_fds(struct scm_cookie *scm, struct sk_buff *skb)
{
int i;
unsigned char max_level = 0;
int unix_sock_count = 0;
if (too_many_unix_fds(current))
return -ETOOMANYREFS;
for (i = scm->fp->count - 1; i >= 0; i--) {
struct sock *sk = unix_get_socket(scm->fp->fp[i]);
if (sk) {
unix_sock_count++;
max_level = max(max_level,
unix_sk(sk)->recursion_level);
}
}
if (unlikely(max_level > MAX_RECURSION_LEVEL))
return -ETOOMANYREFS;
/*
* Need to duplicate file references for the sake of garbage
* collection. Otherwise a socket in the fps might become a
* candidate for GC while the skb is not yet queued.
*/
UNIXCB(skb).fp = scm_fp_dup(scm->fp);
if (!UNIXCB(skb).fp)
return -ENOMEM;
for (i = scm->fp->count - 1; i >= 0; i--)
unix_inflight(scm->fp->fp[i]);
return max_level;
} | 175 | True | 1 |
||
CVE-2016-2550 | 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 | nan | [{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311517', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311517', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=415e3d3e90ce9e18727e8843ae343eda5a58fad6', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=415e3d3e90ce9e18727e8843ae343eda5a58fad6', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/02/23/2', 'name': '[oss-security] 20160223 CVE Request: Linux: unix: correctly track in-flight fds in sending process user_struct sockets', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/415e3d3e90ce9e18727e8843ae343eda5a58fad6', 'name': 'https://github.com/torvalds/linux/commit/415e3d3e90ce9e18727e8843ae343eda5a58fad6', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2949-1', 'name': 'USN-2949-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2946-2', 'name': 'USN-2946-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2947-2', 'name': 'USN-2947-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2946-1', 'name': 'USN-2946-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2947-3', 'name': 'USN-2947-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2948-2', 'name': 'USN-2948-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2947-1', 'name': 'USN-2947-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2948-1', 'name': 'USN-2948-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/security-advisory/cpujan2018-3236628.html', 'name': 'http://www.oracle.com/technetwork/security-advisory/cpujan2018-3236628.html', 'refsource': 'CONFIRM', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-399'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4.8', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The Linux kernel before 4.5 allows local users to bypass file-descriptor limits and cause a denial of service (memory consumption) by leveraging incorrect tracking of descriptor ownership and sending each descriptor over a UNIX socket before closing it. NOTE: this vulnerability exists because of an incorrect fix for CVE-2013-4312.'}] | 2018-01-18T18:18Z | 2016-04-27T17:59Z | Resource Management Errors | Weaknesses in this category are related to improper management of system resources. | https://cwe.mitre.org/data/definitions/399.html | 1 | Hannes Frederic Sowa | 2016-02-03 02:11:03+01:00 | unix: correctly track in-flight fds in sending process user_struct
The commit referenced in the Fixes tag incorrectly accounted the number
of in-flight fds over a unix domain socket to the original opener
of the file-descriptor. This allows another process to arbitrary
deplete the original file-openers resource limit for the maximum of
open files. Instead the sending processes and its struct cred should
be credited.
To do so, we add a reference counted struct user_struct pointer to the
scm_fp_list and use it to account for the number of inflight unix fds.
Fixes: 712f4aad406bb1 ("unix: properly account for FDs passed over unix sockets")
Reported-by: David Herrmann <dh.herrmann@gmail.com>
Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: Willy Tarreau <w@1wt.eu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | 415e3d3e90ce9e18727e8843ae343eda5a58fad6 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | unix_detach_fds | unix_detach_fds( struct scm_cookie * scm , struct sk_buff * skb) | ['scm', 'skb'] | static void unix_detach_fds(struct scm_cookie *scm, struct sk_buff *skb)
{
int i;
scm->fp = UNIXCB(skb).fp;
UNIXCB(skb).fp = NULL;
for (i = scm->fp->count-1; i >= 0; i--)
unix_notinflight(scm->fp->fp[i]);
} | 68 | True | 1 |
||
CVE-2016-2550 | 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 | nan | [{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311517', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311517', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=415e3d3e90ce9e18727e8843ae343eda5a58fad6', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=415e3d3e90ce9e18727e8843ae343eda5a58fad6', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/02/23/2', 'name': '[oss-security] 20160223 CVE Request: Linux: unix: correctly track in-flight fds in sending process user_struct sockets', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/415e3d3e90ce9e18727e8843ae343eda5a58fad6', 'name': 'https://github.com/torvalds/linux/commit/415e3d3e90ce9e18727e8843ae343eda5a58fad6', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2949-1', 'name': 'USN-2949-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2946-2', 'name': 'USN-2946-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2947-2', 'name': 'USN-2947-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2946-1', 'name': 'USN-2946-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2947-3', 'name': 'USN-2947-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2948-2', 'name': 'USN-2948-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2947-1', 'name': 'USN-2947-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2948-1', 'name': 'USN-2948-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/security-advisory/cpujan2018-3236628.html', 'name': 'http://www.oracle.com/technetwork/security-advisory/cpujan2018-3236628.html', 'refsource': 'CONFIRM', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-399'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4.8', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The Linux kernel before 4.5 allows local users to bypass file-descriptor limits and cause a denial of service (memory consumption) by leveraging incorrect tracking of descriptor ownership and sending each descriptor over a UNIX socket before closing it. NOTE: this vulnerability exists because of an incorrect fix for CVE-2013-4312.'}] | 2018-01-18T18:18Z | 2016-04-27T17:59Z | Resource Management Errors | Weaknesses in this category are related to improper management of system resources. | https://cwe.mitre.org/data/definitions/399.html | 1 | Hannes Frederic Sowa | 2016-02-03 02:11:03+01:00 | unix: correctly track in-flight fds in sending process user_struct
The commit referenced in the Fixes tag incorrectly accounted the number
of in-flight fds over a unix domain socket to the original opener
of the file-descriptor. This allows another process to arbitrary
deplete the original file-openers resource limit for the maximum of
open files. Instead the sending processes and its struct cred should
be credited.
To do so, we add a reference counted struct user_struct pointer to the
scm_fp_list and use it to account for the number of inflight unix fds.
Fixes: 712f4aad406bb1 ("unix: properly account for FDs passed over unix sockets")
Reported-by: David Herrmann <dh.herrmann@gmail.com>
Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: Willy Tarreau <w@1wt.eu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | 415e3d3e90ce9e18727e8843ae343eda5a58fad6 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | unix_inflight | unix_inflight( struct file * fp) | ['fp'] | void unix_inflight(struct file *fp)
{
struct sock *s = unix_get_socket(fp);
spin_lock(&unix_gc_lock);
if (s) {
struct unix_sock *u = unix_sk(s);
if (atomic_long_inc_return(&u->inflight) == 1) {
BUG_ON(!list_empty(&u->link));
list_add_tail(&u->link, &gc_inflight_list);
} else {
BUG_ON(list_empty(&u->link));
}
unix_tot_inflight++;
}
fp->f_cred->user->unix_inflight++;
spin_unlock(&unix_gc_lock);
} | 110 | True | 1 |
||
CVE-2016-2550 | 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 | nan | [{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311517', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1311517', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=415e3d3e90ce9e18727e8843ae343eda5a58fad6', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=415e3d3e90ce9e18727e8843ae343eda5a58fad6', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/02/23/2', 'name': '[oss-security] 20160223 CVE Request: Linux: unix: correctly track in-flight fds in sending process user_struct sockets', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/415e3d3e90ce9e18727e8843ae343eda5a58fad6', 'name': 'https://github.com/torvalds/linux/commit/415e3d3e90ce9e18727e8843ae343eda5a58fad6', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2949-1', 'name': 'USN-2949-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2946-2', 'name': 'USN-2946-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2947-2', 'name': 'USN-2947-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2946-1', 'name': 'USN-2946-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2947-3', 'name': 'USN-2947-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2948-2', 'name': 'USN-2948-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2947-1', 'name': 'USN-2947-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2948-1', 'name': 'USN-2948-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/security-advisory/cpujan2018-3236628.html', 'name': 'http://www.oracle.com/technetwork/security-advisory/cpujan2018-3236628.html', 'refsource': 'CONFIRM', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-399'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4.8', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The Linux kernel before 4.5 allows local users to bypass file-descriptor limits and cause a denial of service (memory consumption) by leveraging incorrect tracking of descriptor ownership and sending each descriptor over a UNIX socket before closing it. NOTE: this vulnerability exists because of an incorrect fix for CVE-2013-4312.'}] | 2018-01-18T18:18Z | 2016-04-27T17:59Z | Resource Management Errors | Weaknesses in this category are related to improper management of system resources. | https://cwe.mitre.org/data/definitions/399.html | 1 | Hannes Frederic Sowa | 2016-02-03 02:11:03+01:00 | unix: correctly track in-flight fds in sending process user_struct
The commit referenced in the Fixes tag incorrectly accounted the number
of in-flight fds over a unix domain socket to the original opener
of the file-descriptor. This allows another process to arbitrary
deplete the original file-openers resource limit for the maximum of
open files. Instead the sending processes and its struct cred should
be credited.
To do so, we add a reference counted struct user_struct pointer to the
scm_fp_list and use it to account for the number of inflight unix fds.
Fixes: 712f4aad406bb1 ("unix: properly account for FDs passed over unix sockets")
Reported-by: David Herrmann <dh.herrmann@gmail.com>
Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: Willy Tarreau <w@1wt.eu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | 415e3d3e90ce9e18727e8843ae343eda5a58fad6 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | unix_notinflight | unix_notinflight( struct file * fp) | ['fp'] | void unix_notinflight(struct file *fp)
{
struct sock *s = unix_get_socket(fp);
spin_lock(&unix_gc_lock);
if (s) {
struct unix_sock *u = unix_sk(s);
BUG_ON(list_empty(&u->link));
if (atomic_long_dec_and_test(&u->inflight))
list_del_init(&u->link);
unix_tot_inflight--;
}
fp->f_cred->user->unix_inflight--;
spin_unlock(&unix_gc_lock);
} | 88 | True | 1 |
||
CVE-2016-2383 | 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:H/I:N/A:N | LOCAL | LOW | LOW | NONE | UNCHANGED | HIGH | NONE | NONE | 5.5 | MEDIUM | 1.8 | 3.6 | nan | [{'url': 'http://www.openwall.com/lists/oss-security/2016/02/14/1', 'name': '[oss-security] 20160214 CVE Request: Linux: Incorrect branch fixups for eBPF allow arbitrary read', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=a1b14d27ed0965838350f1377ff97c93ee383492', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=a1b14d27ed0965838350f1377ff97c93ee383492', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1308452', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1308452', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/a1b14d27ed0965838350f1377ff97c93ee383492', 'name': 'https://github.com/torvalds/linux/commit/a1b14d27ed0965838350f1377ff97c93ee383492', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00015.html', 'name': 'openSUSE-SU-2016:1008', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2947-1', 'name': 'USN-2947-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2947-2', 'name': 'USN-2947-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2947-3', 'name': 'USN-2947-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:linux:linux_kernel:4.5.0:rc1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndExcluding': '4.5.0', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:4.5.0:rc2:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:4.5.0:rc3:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:15.10:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:opensuse:leap:42.1:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:esm:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The adjust_branches function in kernel/bpf/verifier.c in the Linux kernel before 4.5 does not consider the delta in the backward-jump case, which allows local users to obtain sensitive information from kernel memory by creating a packet filter and then loading crafted BPF instructions.'}] | 2022-01-31T18:55Z | 2016-04-27T17:59Z | 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 | Daniel Borkmann | 2016-02-10 16:47:11+01:00 | bpf: fix branch offset adjustment on backjumps after patching ctx expansion
When ctx access is used, the kernel often needs to expand/rewrite
instructions, so after that patching, branch offsets have to be
adjusted for both forward and backward jumps in the new eBPF program,
but for backward jumps it fails to account the delta. Meaning, for
example, if the expansion happens exactly on the insn that sits at
the jump target, it doesn't fix up the back jump offset.
Analysis on what the check in adjust_branches() is currently doing:
/* adjust offset of jmps if necessary */
if (i < pos && i + insn->off + 1 > pos)
insn->off += delta;
else if (i > pos && i + insn->off + 1 < pos)
insn->off -= delta;
First condition (forward jumps):
Before: After:
insns[0] insns[0]
insns[1] <--- i/insn insns[1] <--- i/insn
insns[2] <--- pos insns[P] <--- pos
insns[3] insns[P] `------| delta
insns[4] <--- target_X insns[P] `-----|
insns[5] insns[3]
insns[4] <--- target_X
insns[5]
First case is if we cross pos-boundary and the jump instruction was
before pos. This is handeled correctly. I.e. if i == pos, then this
would mean our jump that we currently check was the patchlet itself
that we just injected. Since such patchlets are self-contained and
have no awareness of any insns before or after the patched one, the
delta is correctly not adjusted. Also, for the second condition in
case of i + insn->off + 1 == pos, means we jump to that newly patched
instruction, so no offset adjustment are needed. That part is correct.
Second condition (backward jumps):
Before: After:
insns[0] insns[0]
insns[1] <--- target_X insns[1] <--- target_X
insns[2] <--- pos <-- target_Y insns[P] <--- pos <-- target_Y
insns[3] insns[P] `------| delta
insns[4] <--- i/insn insns[P] `-----|
insns[5] insns[3]
insns[4] <--- i/insn
insns[5]
Second interesting case is where we cross pos-boundary and the jump
instruction was after pos. Backward jump with i == pos would be
impossible and pose a bug somewhere in the patchlet, so the first
condition checking i > pos is okay only by itself. However, i +
insn->off + 1 < pos does not always work as intended to trigger the
adjustment. It works when jump targets would be far off where the
delta wouldn't matter. But, for example, where the fixed insn->off
before pointed to pos (target_Y), it now points to pos + delta, so
that additional room needs to be taken into account for the check.
This means that i) both tests here need to be adjusted into pos + delta,
and ii) for the second condition, the test needs to be <= as pos
itself can be a target in the backjump, too.
Fixes: 9bac3d6d548e ("bpf: allow extended BPF programs access skb fields")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net> | a1b14d27ed0965838350f1377ff97c93ee383492 | 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_branches | adjust_branches( struct bpf_prog * prog , int pos , int delta) | ['prog', 'pos', 'delta'] | static void adjust_branches(struct bpf_prog *prog, int pos, int delta)
{
struct bpf_insn *insn = prog->insnsi;
int insn_cnt = prog->len;
int i;
for (i = 0; i < insn_cnt; i++, insn++) {
if (BPF_CLASS(insn->code) != BPF_JMP ||
BPF_OP(insn->code) == BPF_CALL ||
BPF_OP(insn->code) == BPF_EXIT)
continue;
/* adjust offset of jmps if necessary */
if (i < pos && i + insn->off + 1 > pos)
insn->off += delta;
else if (i > pos && i + insn->off + 1 < pos)
insn->off -= delta;
}
} | 128 | True | 1 |
|
CVE-2016-2085 | 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 | nan | [{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1324867', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1324867', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/613317bd212c585c20796c10afe5daaa95d4b0a1', 'name': 'https://github.com/torvalds/linux/commit/613317bd212c585c20796c10afe5daaa95d4b0a1', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://people.canonical.com/~ubuntu-security/cve/2016/CVE-2016-2085.html', 'name': 'https://people.canonical.com/~ubuntu-security/cve/2016/CVE-2016-2085.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=613317bd212c585c20796c10afe5daaa95d4b0a1', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=613317bd212c585c20796c10afe5daaa95d4b0a1', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://security-tracker.debian.org/tracker/CVE-2016-2085', 'name': 'https://security-tracker.debian.org/tracker/CVE-2016-2085', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2949-1', 'name': 'USN-2949-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2946-2', 'name': 'USN-2946-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2947-2', 'name': 'USN-2947-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2946-1', 'name': 'USN-2946-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2947-3', 'name': 'USN-2947-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2948-2', 'name': 'USN-2948-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2947-1', 'name': 'USN-2947-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2948-1', 'name': 'USN-2948-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4.8', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The evm_verify_hmac function in security/integrity/evm/evm_main.c in the Linux kernel before 4.5 does not properly copy data, which makes it easier for local users to forge MAC values via a timing side-channel attack.'}] | 2016-12-03T03:24Z | 2016-04-27T17:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Ryan Ware | 2016-02-11 15:58:44-08:00 | EVM: Use crypto_memneq() for digest comparisons
This patch fixes vulnerability CVE-2016-2085. The problem exists
because the vm_verify_hmac() function includes a use of memcmp().
Unfortunately, this allows timing side channel attacks; specifically
a MAC forgery complexity drop from 2^128 to 2^12. This patch changes
the memcmp() to the cryptographically safe crypto_memneq().
Reported-by: Xiaofei Rex Guo <xiaofei.rex.guo@intel.com>
Signed-off-by: Ryan Ware <ware@linux.intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: James Morris <james.l.morris@oracle.com> | 613317bd212c585c20796c10afe5daaa95d4b0a1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | evm_verify_hmac | evm_verify_hmac( struct dentry * dentry , const char * xattr_name , char * xattr_value , size_t xattr_value_len , struct integrity_iint_cache * iint) | ['dentry', 'xattr_name', 'xattr_value', 'xattr_value_len', 'iint'] | static enum integrity_status evm_verify_hmac(struct dentry *dentry,
const char *xattr_name,
char *xattr_value,
size_t xattr_value_len,
struct integrity_iint_cache *iint)
{
struct evm_ima_xattr_data *xattr_data = NULL;
struct evm_ima_xattr_data calc;
enum integrity_status evm_status = INTEGRITY_PASS;
int rc, xattr_len;
if (iint && iint->evm_status == INTEGRITY_PASS)
return iint->evm_status;
/* if status is not PASS, try to check again - against -ENOMEM */
/* first need to know the sig type */
rc = vfs_getxattr_alloc(dentry, XATTR_NAME_EVM, (char **)&xattr_data, 0,
GFP_NOFS);
if (rc <= 0) {
evm_status = INTEGRITY_FAIL;
if (rc == -ENODATA) {
rc = evm_find_protected_xattrs(dentry);
if (rc > 0)
evm_status = INTEGRITY_NOLABEL;
else if (rc == 0)
evm_status = INTEGRITY_NOXATTRS; /* new file */
} else if (rc == -EOPNOTSUPP) {
evm_status = INTEGRITY_UNKNOWN;
}
goto out;
}
xattr_len = rc;
/* check value type */
switch (xattr_data->type) {
case EVM_XATTR_HMAC:
rc = evm_calc_hmac(dentry, xattr_name, xattr_value,
xattr_value_len, calc.digest);
if (rc)
break;
rc = memcmp(xattr_data->digest, calc.digest,
sizeof(calc.digest));
if (rc)
rc = -EINVAL;
break;
case EVM_IMA_XATTR_DIGSIG:
rc = evm_calc_hash(dentry, xattr_name, xattr_value,
xattr_value_len, calc.digest);
if (rc)
break;
rc = integrity_digsig_verify(INTEGRITY_KEYRING_EVM,
(const char *)xattr_data, xattr_len,
calc.digest, sizeof(calc.digest));
if (!rc) {
/* Replace RSA with HMAC if not mounted readonly and
* not immutable
*/
if (!IS_RDONLY(d_backing_inode(dentry)) &&
!IS_IMMUTABLE(d_backing_inode(dentry)))
evm_update_evmxattr(dentry, xattr_name,
xattr_value,
xattr_value_len);
}
break;
default:
rc = -EINVAL;
break;
}
if (rc)
evm_status = (rc == -ENODATA) ?
INTEGRITY_NOXATTRS : INTEGRITY_FAIL;
out:
if (iint)
iint->evm_status = evm_status;
kfree(xattr_data);
return evm_status;
} | 357 | True | 1 |
||
CVE-2016-2384 | 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:P/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | PHYSICAL | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 4.6 | MEDIUM | 0.9 | 3.6 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/02/14/2', 'name': '[oss-security] 20160214 CVE Request: Linux: ALSA: usb-audio: double-free triggered by invalid USB descriptor', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1308444', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1308444', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=07d86ca93db7e5cdf4743564d98292042ec21af7', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=07d86ca93db7e5cdf4743564d98292042ec21af7', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/07d86ca93db7e5cdf4743564d98292042ec21af7', 'name': 'https://github.com/torvalds/linux/commit/07d86ca93db7e5cdf4743564d98292042ec21af7', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-07/msg00005.html', 'name': 'SUSE-SU-2016:1764', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/83256', 'name': '83256', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3503', 'name': 'DSA-3503', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00015.html', 'name': 'openSUSE-SU-2016:1008', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00032.html', 'name': 'SUSE-SU-2016:1039', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00029.html', 'name': 'SUSE-SU-2016:1035', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00027.html', 'name': 'SUSE-SU-2016:1033', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-1', 'name': 'USN-2930-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00036.html', 'name': 'SUSE-SU-2016:1045', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-1', 'name': 'USN-2929-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00034.html', 'name': 'SUSE-SU-2016:1041', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00030.html', 'name': 'SUSE-SU-2016:1037', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2932-1', 'name': 'USN-2932-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2928-1', 'name': 'USN-2928-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00037.html', 'name': 'SUSE-SU-2016:1046', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-2', 'name': 'USN-2930-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2929-2', 'name': 'USN-2929-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00025.html', 'name': 'SUSE-SU-2016:1031', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00033.html', 'name': 'SUSE-SU-2016:1040', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00028.html', 'name': 'SUSE-SU-2016:1034', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2931-1', 'name': 'USN-2931-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00031.html', 'name': 'SUSE-SU-2016:1038', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00019.html', 'name': 'SUSE-SU-2016:1019', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2930-3', 'name': 'USN-2930-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00094.html', 'name': 'SUSE-SU-2016:0911', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00026.html', 'name': 'SUSE-SU-2016:1032', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00045.html', 'name': 'SUSE-SU-2016:1102', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2928-2', 'name': 'USN-2928-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1035072', 'name': '1035072', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'https://github.com/xairy/kernel-exploits/tree/master/CVE-2016-2384', 'name': 'https://github.com/xairy/kernel-exploits/tree/master/CVE-2016-2384', 'refsource': 'MISC', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2017-0817.html', 'name': 'RHSA-2017:0817', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2584.html', 'name': 'RHSA-2016:2584', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2574.html', 'name': 'RHSA-2016:2574', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.4.8', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_real_time_extension:12:sp1:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Double free vulnerability in the snd_usbmidi_create function in sound/usb/midi.c in the Linux kernel before 4.5 allows physically proximate attackers to cause a denial of service (panic) or possibly have unspecified other impact via vectors involving an invalid USB descriptor.'}] | 2018-01-05T02:30Z | 2016-04-27T17:59Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Andrey Konovalov | 2016-02-13 11:08:06+03:00 | ALSA: usb-audio: avoid freeing umidi object twice
The 'umidi' object will be free'd on the error path by snd_usbmidi_free()
when tearing down the rawmidi interface. So we shouldn't try to free it
in snd_usbmidi_create() after having registered the rawmidi interface.
Found by KASAN.
Signed-off-by: Andrey Konovalov <andreyknvl@gmail.com>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | 07d86ca93db7e5cdf4743564d98292042ec21af7 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | snd_usbmidi_create | snd_usbmidi_create( struct snd_card * card , struct usb_interface * iface , struct list_head * midi_list , const struct snd_usb_audio_quirk * quirk) | ['card', 'iface', 'midi_list', 'quirk'] | int snd_usbmidi_create(struct snd_card *card,
struct usb_interface *iface,
struct list_head *midi_list,
const struct snd_usb_audio_quirk *quirk)
{
struct snd_usb_midi *umidi;
struct snd_usb_midi_endpoint_info endpoints[MIDI_MAX_ENDPOINTS];
int out_ports, in_ports;
int i, err;
umidi = kzalloc(sizeof(*umidi), GFP_KERNEL);
if (!umidi)
return -ENOMEM;
umidi->dev = interface_to_usbdev(iface);
umidi->card = card;
umidi->iface = iface;
umidi->quirk = quirk;
umidi->usb_protocol_ops = &snd_usbmidi_standard_ops;
spin_lock_init(&umidi->disc_lock);
init_rwsem(&umidi->disc_rwsem);
mutex_init(&umidi->mutex);
umidi->usb_id = USB_ID(le16_to_cpu(umidi->dev->descriptor.idVendor),
le16_to_cpu(umidi->dev->descriptor.idProduct));
setup_timer(&umidi->error_timer, snd_usbmidi_error_timer,
(unsigned long)umidi);
/* detect the endpoint(s) to use */
memset(endpoints, 0, sizeof(endpoints));
switch (quirk ? quirk->type : QUIRK_MIDI_STANDARD_INTERFACE) {
case QUIRK_MIDI_STANDARD_INTERFACE:
err = snd_usbmidi_get_ms_info(umidi, endpoints);
if (umidi->usb_id == USB_ID(0x0763, 0x0150)) /* M-Audio Uno */
umidi->usb_protocol_ops =
&snd_usbmidi_maudio_broken_running_status_ops;
break;
case QUIRK_MIDI_US122L:
umidi->usb_protocol_ops = &snd_usbmidi_122l_ops;
/* fall through */
case QUIRK_MIDI_FIXED_ENDPOINT:
memcpy(&endpoints[0], quirk->data,
sizeof(struct snd_usb_midi_endpoint_info));
err = snd_usbmidi_detect_endpoints(umidi, &endpoints[0], 1);
break;
case QUIRK_MIDI_YAMAHA:
err = snd_usbmidi_detect_yamaha(umidi, &endpoints[0]);
break;
case QUIRK_MIDI_ROLAND:
err = snd_usbmidi_detect_roland(umidi, &endpoints[0]);
break;
case QUIRK_MIDI_MIDIMAN:
umidi->usb_protocol_ops = &snd_usbmidi_midiman_ops;
memcpy(&endpoints[0], quirk->data,
sizeof(struct snd_usb_midi_endpoint_info));
err = 0;
break;
case QUIRK_MIDI_NOVATION:
umidi->usb_protocol_ops = &snd_usbmidi_novation_ops;
err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints);
break;
case QUIRK_MIDI_RAW_BYTES:
umidi->usb_protocol_ops = &snd_usbmidi_raw_ops;
/*
* Interface 1 contains isochronous endpoints, but with the same
* numbers as in interface 0. Since it is interface 1 that the
* USB core has most recently seen, these descriptors are now
* associated with the endpoint numbers. This will foul up our
* attempts to submit bulk/interrupt URBs to the endpoints in
* interface 0, so we have to make sure that the USB core looks
* again at interface 0 by calling usb_set_interface() on it.
*/
if (umidi->usb_id == USB_ID(0x07fd, 0x0001)) /* MOTU Fastlane */
usb_set_interface(umidi->dev, 0, 0);
err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints);
break;
case QUIRK_MIDI_EMAGIC:
umidi->usb_protocol_ops = &snd_usbmidi_emagic_ops;
memcpy(&endpoints[0], quirk->data,
sizeof(struct snd_usb_midi_endpoint_info));
err = snd_usbmidi_detect_endpoints(umidi, &endpoints[0], 1);
break;
case QUIRK_MIDI_CME:
umidi->usb_protocol_ops = &snd_usbmidi_cme_ops;
err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints);
break;
case QUIRK_MIDI_AKAI:
umidi->usb_protocol_ops = &snd_usbmidi_akai_ops;
err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints);
/* endpoint 1 is input-only */
endpoints[1].out_cables = 0;
break;
case QUIRK_MIDI_FTDI:
umidi->usb_protocol_ops = &snd_usbmidi_ftdi_ops;
/* set baud rate to 31250 (48 MHz / 16 / 96) */
err = usb_control_msg(umidi->dev, usb_sndctrlpipe(umidi->dev, 0),
3, 0x40, 0x60, 0, NULL, 0, 1000);
if (err < 0)
break;
err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints);
break;
case QUIRK_MIDI_CH345:
umidi->usb_protocol_ops = &snd_usbmidi_ch345_broken_sysex_ops;
err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints);
break;
default:
dev_err(&umidi->dev->dev, "invalid quirk type %d\n",
quirk->type);
err = -ENXIO;
break;
}
if (err < 0) {
kfree(umidi);
return err;
}
/* create rawmidi device */
out_ports = 0;
in_ports = 0;
for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
out_ports += hweight16(endpoints[i].out_cables);
in_ports += hweight16(endpoints[i].in_cables);
}
err = snd_usbmidi_create_rawmidi(umidi, out_ports, in_ports);
if (err < 0) {
kfree(umidi);
return err;
}
/* create endpoint/port structures */
if (quirk && quirk->type == QUIRK_MIDI_MIDIMAN)
err = snd_usbmidi_create_endpoints_midiman(umidi, &endpoints[0]);
else
err = snd_usbmidi_create_endpoints(umidi, endpoints);
if (err < 0) {
snd_usbmidi_free(umidi);
return err;
}
usb_autopm_get_interface_no_resume(umidi->iface);
list_add_tail(&umidi->list, midi_list);
return 0;
} | 779 | True | 1 |
|
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:50:13-05:00 | ext4: convert to mbcache2
The conversion is generally straightforward. The only tricky part is
that xattr block corresponding to found mbcache entry can get freed
before we get buffer lock for that block. So we have to check whether
the entry is still valid after getting buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | 82939d7999dfc1f1998c4b1c12e2f19edbdff272 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ext4_fill_super | ext4_fill_super( struct super_block * sb , void * data , int silent) | ['sb', 'data', 'silent'] | static int ext4_fill_super(struct super_block *sb, void *data, int silent)
{
char *orig_data = kstrdup(data, GFP_KERNEL);
struct buffer_head *bh;
struct ext4_super_block *es = NULL;
struct ext4_sb_info *sbi;
ext4_fsblk_t block;
ext4_fsblk_t sb_block = get_sb_block(&data);
ext4_fsblk_t logical_sb_block;
unsigned long offset = 0;
unsigned long journal_devnum = 0;
unsigned long def_mount_opts;
struct inode *root;
const char *descr;
int ret = -ENOMEM;
int blocksize, clustersize;
unsigned int db_count;
unsigned int i;
int needs_recovery, has_huge_files, has_bigalloc;
__u64 blocks_count;
int err = 0;
unsigned int journal_ioprio = DEFAULT_JOURNAL_IOPRIO;
ext4_group_t first_not_zeroed;
sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
if (!sbi)
goto out_free_orig;
sbi->s_blockgroup_lock =
kzalloc(sizeof(struct blockgroup_lock), GFP_KERNEL);
if (!sbi->s_blockgroup_lock) {
kfree(sbi);
goto out_free_orig;
}
sb->s_fs_info = sbi;
sbi->s_sb = sb;
sbi->s_inode_readahead_blks = EXT4_DEF_INODE_READAHEAD_BLKS;
sbi->s_sb_block = sb_block;
if (sb->s_bdev->bd_part)
sbi->s_sectors_written_start =
part_stat_read(sb->s_bdev->bd_part, sectors[1]);
/* Cleanup superblock name */
strreplace(sb->s_id, '/', '!');
/* -EINVAL is default */
ret = -EINVAL;
blocksize = sb_min_blocksize(sb, EXT4_MIN_BLOCK_SIZE);
if (!blocksize) {
ext4_msg(sb, KERN_ERR, "unable to set blocksize");
goto out_fail;
}
/*
* The ext4 superblock will not be buffer aligned for other than 1kB
* block sizes. We need to calculate the offset from buffer start.
*/
if (blocksize != EXT4_MIN_BLOCK_SIZE) {
logical_sb_block = sb_block * EXT4_MIN_BLOCK_SIZE;
offset = do_div(logical_sb_block, blocksize);
} else {
logical_sb_block = sb_block;
}
if (!(bh = sb_bread_unmovable(sb, logical_sb_block))) {
ext4_msg(sb, KERN_ERR, "unable to read superblock");
goto out_fail;
}
/*
* Note: s_es must be initialized as soon as possible because
* some ext4 macro-instructions depend on its value
*/
es = (struct ext4_super_block *) (bh->b_data + offset);
sbi->s_es = es;
sb->s_magic = le16_to_cpu(es->s_magic);
if (sb->s_magic != EXT4_SUPER_MAGIC)
goto cantfind_ext4;
sbi->s_kbytes_written = le64_to_cpu(es->s_kbytes_written);
/* Warn if metadata_csum and gdt_csum are both set. */
if (ext4_has_feature_metadata_csum(sb) &&
ext4_has_feature_gdt_csum(sb))
ext4_warning(sb, "metadata_csum and uninit_bg are "
"redundant flags; please run fsck.");
/* Check for a known checksum algorithm */
if (!ext4_verify_csum_type(sb, es)) {
ext4_msg(sb, KERN_ERR, "VFS: Found ext4 filesystem with "
"unknown checksum algorithm.");
silent = 1;
goto cantfind_ext4;
}
/* Load the checksum driver */
if (ext4_has_feature_metadata_csum(sb)) {
sbi->s_chksum_driver = crypto_alloc_shash("crc32c", 0, 0);
if (IS_ERR(sbi->s_chksum_driver)) {
ext4_msg(sb, KERN_ERR, "Cannot load crc32c driver.");
ret = PTR_ERR(sbi->s_chksum_driver);
sbi->s_chksum_driver = NULL;
goto failed_mount;
}
}
/* Check superblock checksum */
if (!ext4_superblock_csum_verify(sb, es)) {
ext4_msg(sb, KERN_ERR, "VFS: Found ext4 filesystem with "
"invalid superblock checksum. Run e2fsck?");
silent = 1;
ret = -EFSBADCRC;
goto cantfind_ext4;
}
/* Precompute checksum seed for all metadata */
if (ext4_has_feature_csum_seed(sb))
sbi->s_csum_seed = le32_to_cpu(es->s_checksum_seed);
else if (ext4_has_metadata_csum(sb))
sbi->s_csum_seed = ext4_chksum(sbi, ~0, es->s_uuid,
sizeof(es->s_uuid));
/* Set defaults before we parse the mount options */
def_mount_opts = le32_to_cpu(es->s_default_mount_opts);
set_opt(sb, INIT_INODE_TABLE);
if (def_mount_opts & EXT4_DEFM_DEBUG)
set_opt(sb, DEBUG);
if (def_mount_opts & EXT4_DEFM_BSDGROUPS)
set_opt(sb, GRPID);
if (def_mount_opts & EXT4_DEFM_UID16)
set_opt(sb, NO_UID32);
/* xattr user namespace & acls are now defaulted on */
set_opt(sb, XATTR_USER);
#ifdef CONFIG_EXT4_FS_POSIX_ACL
set_opt(sb, POSIX_ACL);
#endif
/* don't forget to enable journal_csum when metadata_csum is enabled. */
if (ext4_has_metadata_csum(sb))
set_opt(sb, JOURNAL_CHECKSUM);
if ((def_mount_opts & EXT4_DEFM_JMODE) == EXT4_DEFM_JMODE_DATA)
set_opt(sb, JOURNAL_DATA);
else if ((def_mount_opts & EXT4_DEFM_JMODE) == EXT4_DEFM_JMODE_ORDERED)
set_opt(sb, ORDERED_DATA);
else if ((def_mount_opts & EXT4_DEFM_JMODE) == EXT4_DEFM_JMODE_WBACK)
set_opt(sb, WRITEBACK_DATA);
if (le16_to_cpu(sbi->s_es->s_errors) == EXT4_ERRORS_PANIC)
set_opt(sb, ERRORS_PANIC);
else if (le16_to_cpu(sbi->s_es->s_errors) == EXT4_ERRORS_CONTINUE)
set_opt(sb, ERRORS_CONT);
else
set_opt(sb, ERRORS_RO);
/* block_validity enabled by default; disable with noblock_validity */
set_opt(sb, BLOCK_VALIDITY);
if (def_mount_opts & EXT4_DEFM_DISCARD)
set_opt(sb, DISCARD);
sbi->s_resuid = make_kuid(&init_user_ns, le16_to_cpu(es->s_def_resuid));
sbi->s_resgid = make_kgid(&init_user_ns, le16_to_cpu(es->s_def_resgid));
sbi->s_commit_interval = JBD2_DEFAULT_MAX_COMMIT_AGE * HZ;
sbi->s_min_batch_time = EXT4_DEF_MIN_BATCH_TIME;
sbi->s_max_batch_time = EXT4_DEF_MAX_BATCH_TIME;
if ((def_mount_opts & EXT4_DEFM_NOBARRIER) == 0)
set_opt(sb, BARRIER);
/*
* enable delayed allocation by default
* Use -o nodelalloc to turn it off
*/
if (!IS_EXT3_SB(sb) && !IS_EXT2_SB(sb) &&
((def_mount_opts & EXT4_DEFM_NODELALLOC) == 0))
set_opt(sb, DELALLOC);
/*
* set default s_li_wait_mult for lazyinit, for the case there is
* no mount option specified.
*/
sbi->s_li_wait_mult = EXT4_DEF_LI_WAIT_MULT;
if (!parse_options((char *) sbi->s_es->s_mount_opts, sb,
&journal_devnum, &journal_ioprio, 0)) {
ext4_msg(sb, KERN_WARNING,
"failed to parse options in superblock: %s",
sbi->s_es->s_mount_opts);
}
sbi->s_def_mount_opt = sbi->s_mount_opt;
if (!parse_options((char *) data, sb, &journal_devnum,
&journal_ioprio, 0))
goto failed_mount;
if (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA) {
printk_once(KERN_WARNING "EXT4-fs: Warning: mounting "
"with data=journal disables delayed "
"allocation and O_DIRECT support!\n");
if (test_opt2(sb, EXPLICIT_DELALLOC)) {
ext4_msg(sb, KERN_ERR, "can't mount with "
"both data=journal and delalloc");
goto failed_mount;
}
if (test_opt(sb, DIOREAD_NOLOCK)) {
ext4_msg(sb, KERN_ERR, "can't mount with "
"both data=journal and dioread_nolock");
goto failed_mount;
}
if (test_opt(sb, DAX)) {
ext4_msg(sb, KERN_ERR, "can't mount with "
"both data=journal and dax");
goto failed_mount;
}
if (test_opt(sb, DELALLOC))
clear_opt(sb, DELALLOC);
} else {
sb->s_iflags |= SB_I_CGROUPWB;
}
sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
(test_opt(sb, POSIX_ACL) ? MS_POSIXACL : 0);
if (le32_to_cpu(es->s_rev_level) == EXT4_GOOD_OLD_REV &&
(ext4_has_compat_features(sb) ||
ext4_has_ro_compat_features(sb) ||
ext4_has_incompat_features(sb)))
ext4_msg(sb, KERN_WARNING,
"feature flags set on rev 0 fs, "
"running e2fsck is recommended");
if (es->s_creator_os == cpu_to_le32(EXT4_OS_HURD)) {
set_opt2(sb, HURD_COMPAT);
if (ext4_has_feature_64bit(sb)) {
ext4_msg(sb, KERN_ERR,
"The Hurd can't support 64-bit file systems");
goto failed_mount;
}
}
if (IS_EXT2_SB(sb)) {
if (ext2_feature_set_ok(sb))
ext4_msg(sb, KERN_INFO, "mounting ext2 file system "
"using the ext4 subsystem");
else {
ext4_msg(sb, KERN_ERR, "couldn't mount as ext2 due "
"to feature incompatibilities");
goto failed_mount;
}
}
if (IS_EXT3_SB(sb)) {
if (ext3_feature_set_ok(sb))
ext4_msg(sb, KERN_INFO, "mounting ext3 file system "
"using the ext4 subsystem");
else {
ext4_msg(sb, KERN_ERR, "couldn't mount as ext3 due "
"to feature incompatibilities");
goto failed_mount;
}
}
/*
* Check feature flags regardless of the revision level, since we
* previously didn't change the revision level when setting the flags,
* so there is a chance incompat flags are set on a rev 0 filesystem.
*/
if (!ext4_feature_set_ok(sb, (sb->s_flags & MS_RDONLY)))
goto failed_mount;
blocksize = BLOCK_SIZE << le32_to_cpu(es->s_log_block_size);
if (blocksize < EXT4_MIN_BLOCK_SIZE ||
blocksize > EXT4_MAX_BLOCK_SIZE) {
ext4_msg(sb, KERN_ERR,
"Unsupported filesystem blocksize %d", blocksize);
goto failed_mount;
}
if (sbi->s_mount_opt & EXT4_MOUNT_DAX) {
if (blocksize != PAGE_SIZE) {
ext4_msg(sb, KERN_ERR,
"error: unsupported blocksize for dax");
goto failed_mount;
}
if (!sb->s_bdev->bd_disk->fops->direct_access) {
ext4_msg(sb, KERN_ERR,
"error: device does not support dax");
goto failed_mount;
}
}
if (ext4_has_feature_encrypt(sb) && es->s_encryption_level) {
ext4_msg(sb, KERN_ERR, "Unsupported encryption level %d",
es->s_encryption_level);
goto failed_mount;
}
if (sb->s_blocksize != blocksize) {
/* Validate the filesystem blocksize */
if (!sb_set_blocksize(sb, blocksize)) {
ext4_msg(sb, KERN_ERR, "bad block size %d",
blocksize);
goto failed_mount;
}
brelse(bh);
logical_sb_block = sb_block * EXT4_MIN_BLOCK_SIZE;
offset = do_div(logical_sb_block, blocksize);
bh = sb_bread_unmovable(sb, logical_sb_block);
if (!bh) {
ext4_msg(sb, KERN_ERR,
"Can't read superblock on 2nd try");
goto failed_mount;
}
es = (struct ext4_super_block *)(bh->b_data + offset);
sbi->s_es = es;
if (es->s_magic != cpu_to_le16(EXT4_SUPER_MAGIC)) {
ext4_msg(sb, KERN_ERR,
"Magic mismatch, very weird!");
goto failed_mount;
}
}
has_huge_files = ext4_has_feature_huge_file(sb);
sbi->s_bitmap_maxbytes = ext4_max_bitmap_size(sb->s_blocksize_bits,
has_huge_files);
sb->s_maxbytes = ext4_max_size(sb->s_blocksize_bits, has_huge_files);
if (le32_to_cpu(es->s_rev_level) == EXT4_GOOD_OLD_REV) {
sbi->s_inode_size = EXT4_GOOD_OLD_INODE_SIZE;
sbi->s_first_ino = EXT4_GOOD_OLD_FIRST_INO;
} else {
sbi->s_inode_size = le16_to_cpu(es->s_inode_size);
sbi->s_first_ino = le32_to_cpu(es->s_first_ino);
if ((sbi->s_inode_size < EXT4_GOOD_OLD_INODE_SIZE) ||
(!is_power_of_2(sbi->s_inode_size)) ||
(sbi->s_inode_size > blocksize)) {
ext4_msg(sb, KERN_ERR,
"unsupported inode size: %d",
sbi->s_inode_size);
goto failed_mount;
}
if (sbi->s_inode_size > EXT4_GOOD_OLD_INODE_SIZE)
sb->s_time_gran = 1 << (EXT4_EPOCH_BITS - 2);
}
sbi->s_desc_size = le16_to_cpu(es->s_desc_size);
if (ext4_has_feature_64bit(sb)) {
if (sbi->s_desc_size < EXT4_MIN_DESC_SIZE_64BIT ||
sbi->s_desc_size > EXT4_MAX_DESC_SIZE ||
!is_power_of_2(sbi->s_desc_size)) {
ext4_msg(sb, KERN_ERR,
"unsupported descriptor size %lu",
sbi->s_desc_size);
goto failed_mount;
}
} else
sbi->s_desc_size = EXT4_MIN_DESC_SIZE;
sbi->s_blocks_per_group = le32_to_cpu(es->s_blocks_per_group);
sbi->s_inodes_per_group = le32_to_cpu(es->s_inodes_per_group);
if (EXT4_INODE_SIZE(sb) == 0 || EXT4_INODES_PER_GROUP(sb) == 0)
goto cantfind_ext4;
sbi->s_inodes_per_block = blocksize / EXT4_INODE_SIZE(sb);
if (sbi->s_inodes_per_block == 0)
goto cantfind_ext4;
sbi->s_itb_per_group = sbi->s_inodes_per_group /
sbi->s_inodes_per_block;
sbi->s_desc_per_block = blocksize / EXT4_DESC_SIZE(sb);
sbi->s_sbh = bh;
sbi->s_mount_state = le16_to_cpu(es->s_state);
sbi->s_addr_per_block_bits = ilog2(EXT4_ADDR_PER_BLOCK(sb));
sbi->s_desc_per_block_bits = ilog2(EXT4_DESC_PER_BLOCK(sb));
for (i = 0; i < 4; i++)
sbi->s_hash_seed[i] = le32_to_cpu(es->s_hash_seed[i]);
sbi->s_def_hash_version = es->s_def_hash_version;
if (ext4_has_feature_dir_index(sb)) {
i = le32_to_cpu(es->s_flags);
if (i & EXT2_FLAGS_UNSIGNED_HASH)
sbi->s_hash_unsigned = 3;
else if ((i & EXT2_FLAGS_SIGNED_HASH) == 0) {
#ifdef __CHAR_UNSIGNED__
if (!(sb->s_flags & MS_RDONLY))
es->s_flags |=
cpu_to_le32(EXT2_FLAGS_UNSIGNED_HASH);
sbi->s_hash_unsigned = 3;
#else
if (!(sb->s_flags & MS_RDONLY))
es->s_flags |=
cpu_to_le32(EXT2_FLAGS_SIGNED_HASH);
#endif
}
}
/* Handle clustersize */
clustersize = BLOCK_SIZE << le32_to_cpu(es->s_log_cluster_size);
has_bigalloc = ext4_has_feature_bigalloc(sb);
if (has_bigalloc) {
if (clustersize < blocksize) {
ext4_msg(sb, KERN_ERR,
"cluster size (%d) smaller than "
"block size (%d)", clustersize, blocksize);
goto failed_mount;
}
sbi->s_cluster_bits = le32_to_cpu(es->s_log_cluster_size) -
le32_to_cpu(es->s_log_block_size);
sbi->s_clusters_per_group =
le32_to_cpu(es->s_clusters_per_group);
if (sbi->s_clusters_per_group > blocksize * 8) {
ext4_msg(sb, KERN_ERR,
"#clusters per group too big: %lu",
sbi->s_clusters_per_group);
goto failed_mount;
}
if (sbi->s_blocks_per_group !=
(sbi->s_clusters_per_group * (clustersize / blocksize))) {
ext4_msg(sb, KERN_ERR, "blocks per group (%lu) and "
"clusters per group (%lu) inconsistent",
sbi->s_blocks_per_group,
sbi->s_clusters_per_group);
goto failed_mount;
}
} else {
if (clustersize != blocksize) {
ext4_warning(sb, "fragment/cluster size (%d) != "
"block size (%d)", clustersize,
blocksize);
clustersize = blocksize;
}
if (sbi->s_blocks_per_group > blocksize * 8) {
ext4_msg(sb, KERN_ERR,
"#blocks per group too big: %lu",
sbi->s_blocks_per_group);
goto failed_mount;
}
sbi->s_clusters_per_group = sbi->s_blocks_per_group;
sbi->s_cluster_bits = 0;
}
sbi->s_cluster_ratio = clustersize / blocksize;
if (sbi->s_inodes_per_group > blocksize * 8) {
ext4_msg(sb, KERN_ERR,
"#inodes per group too big: %lu",
sbi->s_inodes_per_group);
goto failed_mount;
}
/* Do we have standard group size of clustersize * 8 blocks ? */
if (sbi->s_blocks_per_group == clustersize << 3)
set_opt2(sb, STD_GROUP_SIZE);
/*
* Test whether we have more sectors than will fit in sector_t,
* and whether the max offset is addressable by the page cache.
*/
err = generic_check_addressable(sb->s_blocksize_bits,
ext4_blocks_count(es));
if (err) {
ext4_msg(sb, KERN_ERR, "filesystem"
" too large to mount safely on this system");
if (sizeof(sector_t) < 8)
ext4_msg(sb, KERN_WARNING, "CONFIG_LBDAF not enabled");
goto failed_mount;
}
if (EXT4_BLOCKS_PER_GROUP(sb) == 0)
goto cantfind_ext4;
/* check blocks count against device size */
blocks_count = sb->s_bdev->bd_inode->i_size >> sb->s_blocksize_bits;
if (blocks_count && ext4_blocks_count(es) > blocks_count) {
ext4_msg(sb, KERN_WARNING, "bad geometry: block count %llu "
"exceeds size of device (%llu blocks)",
ext4_blocks_count(es), blocks_count);
goto failed_mount;
}
/*
* It makes no sense for the first data block to be beyond the end
* of the filesystem.
*/
if (le32_to_cpu(es->s_first_data_block) >= ext4_blocks_count(es)) {
ext4_msg(sb, KERN_WARNING, "bad geometry: first data "
"block %u is beyond end of filesystem (%llu)",
le32_to_cpu(es->s_first_data_block),
ext4_blocks_count(es));
goto failed_mount;
}
blocks_count = (ext4_blocks_count(es) -
le32_to_cpu(es->s_first_data_block) +
EXT4_BLOCKS_PER_GROUP(sb) - 1);
do_div(blocks_count, EXT4_BLOCKS_PER_GROUP(sb));
if (blocks_count > ((uint64_t)1<<32) - EXT4_DESC_PER_BLOCK(sb)) {
ext4_msg(sb, KERN_WARNING, "groups count too large: %u "
"(block count %llu, first data block %u, "
"blocks per group %lu)", sbi->s_groups_count,
ext4_blocks_count(es),
le32_to_cpu(es->s_first_data_block),
EXT4_BLOCKS_PER_GROUP(sb));
goto failed_mount;
}
sbi->s_groups_count = blocks_count;
sbi->s_blockfile_groups = min_t(ext4_group_t, sbi->s_groups_count,
(EXT4_MAX_BLOCK_FILE_PHYS / EXT4_BLOCKS_PER_GROUP(sb)));
db_count = (sbi->s_groups_count + EXT4_DESC_PER_BLOCK(sb) - 1) /
EXT4_DESC_PER_BLOCK(sb);
sbi->s_group_desc = ext4_kvmalloc(db_count *
sizeof(struct buffer_head *),
GFP_KERNEL);
if (sbi->s_group_desc == NULL) {
ext4_msg(sb, KERN_ERR, "not enough memory");
ret = -ENOMEM;
goto failed_mount;
}
bgl_lock_init(sbi->s_blockgroup_lock);
for (i = 0; i < db_count; i++) {
block = descriptor_loc(sb, logical_sb_block, i);
sbi->s_group_desc[i] = sb_bread_unmovable(sb, block);
if (!sbi->s_group_desc[i]) {
ext4_msg(sb, KERN_ERR,
"can't read group descriptor %d", i);
db_count = i;
goto failed_mount2;
}
}
if (!ext4_check_descriptors(sb, &first_not_zeroed)) {
ext4_msg(sb, KERN_ERR, "group descriptors corrupted!");
ret = -EFSCORRUPTED;
goto failed_mount2;
}
sbi->s_gdb_count = db_count;
get_random_bytes(&sbi->s_next_generation, sizeof(u32));
spin_lock_init(&sbi->s_next_gen_lock);
setup_timer(&sbi->s_err_report, print_daily_error_info,
(unsigned long) sb);
/* Register extent status tree shrinker */
if (ext4_es_register_shrinker(sbi))
goto failed_mount3;
sbi->s_stripe = ext4_get_stripe_size(sbi);
sbi->s_extent_max_zeroout_kb = 32;
/*
* set up enough so that it can read an inode
*/
sb->s_op = &ext4_sops;
sb->s_export_op = &ext4_export_ops;
sb->s_xattr = ext4_xattr_handlers;
#ifdef CONFIG_QUOTA
sb->dq_op = &ext4_quota_operations;
if (ext4_has_feature_quota(sb))
sb->s_qcop = &dquot_quotactl_sysfile_ops;
else
sb->s_qcop = &ext4_qctl_operations;
sb->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP | QTYPE_MASK_PRJ;
#endif
memcpy(sb->s_uuid, es->s_uuid, sizeof(es->s_uuid));
INIT_LIST_HEAD(&sbi->s_orphan); /* unlinked but open files */
mutex_init(&sbi->s_orphan_lock);
sb->s_root = NULL;
needs_recovery = (es->s_last_orphan != 0 ||
ext4_has_feature_journal_needs_recovery(sb));
if (ext4_has_feature_mmp(sb) && !(sb->s_flags & MS_RDONLY))
if (ext4_multi_mount_protect(sb, le64_to_cpu(es->s_mmp_block)))
goto failed_mount3a;
/*
* The first inode we look at is the journal inode. Don't try
* root first: it may be modified in the journal!
*/
if (!test_opt(sb, NOLOAD) && ext4_has_feature_journal(sb)) {
if (ext4_load_journal(sb, es, journal_devnum))
goto failed_mount3a;
} else if (test_opt(sb, NOLOAD) && !(sb->s_flags & MS_RDONLY) &&
ext4_has_feature_journal_needs_recovery(sb)) {
ext4_msg(sb, KERN_ERR, "required journal recovery "
"suppressed and not mounted read-only");
goto failed_mount_wq;
} else {
/* Nojournal mode, all journal mount options are illegal */
if (test_opt2(sb, EXPLICIT_JOURNAL_CHECKSUM)) {
ext4_msg(sb, KERN_ERR, "can't mount with "
"journal_checksum, fs mounted w/o journal");
goto failed_mount_wq;
}
if (test_opt(sb, JOURNAL_ASYNC_COMMIT)) {
ext4_msg(sb, KERN_ERR, "can't mount with "
"journal_async_commit, fs mounted w/o journal");
goto failed_mount_wq;
}
if (sbi->s_commit_interval != JBD2_DEFAULT_MAX_COMMIT_AGE*HZ) {
ext4_msg(sb, KERN_ERR, "can't mount with "
"commit=%lu, fs mounted w/o journal",
sbi->s_commit_interval / HZ);
goto failed_mount_wq;
}
if (EXT4_MOUNT_DATA_FLAGS &
(sbi->s_mount_opt ^ sbi->s_def_mount_opt)) {
ext4_msg(sb, KERN_ERR, "can't mount with "
"data=, fs mounted w/o journal");
goto failed_mount_wq;
}
sbi->s_def_mount_opt &= EXT4_MOUNT_JOURNAL_CHECKSUM;
clear_opt(sb, JOURNAL_CHECKSUM);
clear_opt(sb, DATA_FLAGS);
sbi->s_journal = NULL;
needs_recovery = 0;
goto no_journal;
}
if (ext4_has_feature_64bit(sb) &&
!jbd2_journal_set_features(EXT4_SB(sb)->s_journal, 0, 0,
JBD2_FEATURE_INCOMPAT_64BIT)) {
ext4_msg(sb, KERN_ERR, "Failed to set 64-bit journal feature");
goto failed_mount_wq;
}
if (!set_journal_csum_feature_set(sb)) {
ext4_msg(sb, KERN_ERR, "Failed to set journal checksum "
"feature set");
goto failed_mount_wq;
}
/* We have now updated the journal if required, so we can
* validate the data journaling mode. */
switch (test_opt(sb, DATA_FLAGS)) {
case 0:
/* No mode set, assume a default based on the journal
* capabilities: ORDERED_DATA if the journal can
* cope, else JOURNAL_DATA
*/
if (jbd2_journal_check_available_features
(sbi->s_journal, 0, 0, JBD2_FEATURE_INCOMPAT_REVOKE))
set_opt(sb, ORDERED_DATA);
else
set_opt(sb, JOURNAL_DATA);
break;
case EXT4_MOUNT_ORDERED_DATA:
case EXT4_MOUNT_WRITEBACK_DATA:
if (!jbd2_journal_check_available_features
(sbi->s_journal, 0, 0, JBD2_FEATURE_INCOMPAT_REVOKE)) {
ext4_msg(sb, KERN_ERR, "Journal does not support "
"requested data journaling mode");
goto failed_mount_wq;
}
default:
break;
}
set_task_ioprio(sbi->s_journal->j_task, journal_ioprio);
sbi->s_journal->j_commit_callback = ext4_journal_commit_callback;
no_journal:
if (ext4_mballoc_ready) {
sbi->s_mb_cache = ext4_xattr_create_cache(sb->s_id);
if (!sbi->s_mb_cache) {
ext4_msg(sb, KERN_ERR, "Failed to create an mb_cache");
goto failed_mount_wq;
}
}
if ((DUMMY_ENCRYPTION_ENABLED(sbi) || ext4_has_feature_encrypt(sb)) &&
(blocksize != PAGE_CACHE_SIZE)) {
ext4_msg(sb, KERN_ERR,
"Unsupported blocksize for fs encryption");
goto failed_mount_wq;
}
if (DUMMY_ENCRYPTION_ENABLED(sbi) && !(sb->s_flags & MS_RDONLY) &&
!ext4_has_feature_encrypt(sb)) {
ext4_set_feature_encrypt(sb);
ext4_commit_super(sb, 1);
}
/*
* Get the # of file system overhead blocks from the
* superblock if present.
*/
if (es->s_overhead_clusters)
sbi->s_overhead = le32_to_cpu(es->s_overhead_clusters);
else {
err = ext4_calculate_overhead(sb);
if (err)
goto failed_mount_wq;
}
/*
* The maximum number of concurrent works can be high and
* concurrency isn't really necessary. Limit it to 1.
*/
EXT4_SB(sb)->rsv_conversion_wq =
alloc_workqueue("ext4-rsv-conversion", WQ_MEM_RECLAIM | WQ_UNBOUND, 1);
if (!EXT4_SB(sb)->rsv_conversion_wq) {
printk(KERN_ERR "EXT4-fs: failed to create workqueue\n");
ret = -ENOMEM;
goto failed_mount4;
}
/*
* The jbd2_journal_load will have done any necessary log recovery,
* so we can safely mount the rest of the filesystem now.
*/
root = ext4_iget(sb, EXT4_ROOT_INO);
if (IS_ERR(root)) {
ext4_msg(sb, KERN_ERR, "get root inode failed");
ret = PTR_ERR(root);
root = NULL;
goto failed_mount4;
}
if (!S_ISDIR(root->i_mode) || !root->i_blocks || !root->i_size) {
ext4_msg(sb, KERN_ERR, "corrupt root inode, run e2fsck");
iput(root);
goto failed_mount4;
}
sb->s_root = d_make_root(root);
if (!sb->s_root) {
ext4_msg(sb, KERN_ERR, "get root dentry failed");
ret = -ENOMEM;
goto failed_mount4;
}
if (ext4_setup_super(sb, es, sb->s_flags & MS_RDONLY))
sb->s_flags |= MS_RDONLY;
/* determine the minimum size of new large inodes, if present */
if (sbi->s_inode_size > EXT4_GOOD_OLD_INODE_SIZE) {
sbi->s_want_extra_isize = sizeof(struct ext4_inode) -
EXT4_GOOD_OLD_INODE_SIZE;
if (ext4_has_feature_extra_isize(sb)) {
if (sbi->s_want_extra_isize <
le16_to_cpu(es->s_want_extra_isize))
sbi->s_want_extra_isize =
le16_to_cpu(es->s_want_extra_isize);
if (sbi->s_want_extra_isize <
le16_to_cpu(es->s_min_extra_isize))
sbi->s_want_extra_isize =
le16_to_cpu(es->s_min_extra_isize);
}
}
/* Check if enough inode space is available */
if (EXT4_GOOD_OLD_INODE_SIZE + sbi->s_want_extra_isize >
sbi->s_inode_size) {
sbi->s_want_extra_isize = sizeof(struct ext4_inode) -
EXT4_GOOD_OLD_INODE_SIZE;
ext4_msg(sb, KERN_INFO, "required extra inode space not"
"available");
}
ext4_set_resv_clusters(sb);
err = ext4_setup_system_zone(sb);
if (err) {
ext4_msg(sb, KERN_ERR, "failed to initialize system "
"zone (%d)", err);
goto failed_mount4a;
}
ext4_ext_init(sb);
err = ext4_mb_init(sb);
if (err) {
ext4_msg(sb, KERN_ERR, "failed to initialize mballoc (%d)",
err);
goto failed_mount5;
}
block = ext4_count_free_clusters(sb);
ext4_free_blocks_count_set(sbi->s_es,
EXT4_C2B(sbi, block));
err = percpu_counter_init(&sbi->s_freeclusters_counter, block,
GFP_KERNEL);
if (!err) {
unsigned long freei = ext4_count_free_inodes(sb);
sbi->s_es->s_free_inodes_count = cpu_to_le32(freei);
err = percpu_counter_init(&sbi->s_freeinodes_counter, freei,
GFP_KERNEL);
}
if (!err)
err = percpu_counter_init(&sbi->s_dirs_counter,
ext4_count_dirs(sb), GFP_KERNEL);
if (!err)
err = percpu_counter_init(&sbi->s_dirtyclusters_counter, 0,
GFP_KERNEL);
if (err) {
ext4_msg(sb, KERN_ERR, "insufficient memory");
goto failed_mount6;
}
if (ext4_has_feature_flex_bg(sb))
if (!ext4_fill_flex_info(sb)) {
ext4_msg(sb, KERN_ERR,
"unable to initialize "
"flex_bg meta info!");
goto failed_mount6;
}
err = ext4_register_li_request(sb, first_not_zeroed);
if (err)
goto failed_mount6;
err = ext4_register_sysfs(sb);
if (err)
goto failed_mount7;
#ifdef CONFIG_QUOTA
/* Enable quota usage during mount. */
if (ext4_has_feature_quota(sb) && !(sb->s_flags & MS_RDONLY)) {
err = ext4_enable_quotas(sb);
if (err)
goto failed_mount8;
}
#endif /* CONFIG_QUOTA */
EXT4_SB(sb)->s_mount_state |= EXT4_ORPHAN_FS;
ext4_orphan_cleanup(sb, es);
EXT4_SB(sb)->s_mount_state &= ~EXT4_ORPHAN_FS;
if (needs_recovery) {
ext4_msg(sb, KERN_INFO, "recovery complete");
ext4_mark_recovery_complete(sb, es);
}
if (EXT4_SB(sb)->s_journal) {
if (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA)
descr = " journalled data mode";
else if (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_ORDERED_DATA)
descr = " ordered data mode";
else
descr = " writeback data mode";
} else
descr = "out journal";
if (test_opt(sb, DISCARD)) {
struct request_queue *q = bdev_get_queue(sb->s_bdev);
if (!blk_queue_discard(q))
ext4_msg(sb, KERN_WARNING,
"mounting with \"discard\" option, but "
"the device does not support discard");
}
if (___ratelimit(&ext4_mount_msg_ratelimit, "EXT4-fs mount"))
ext4_msg(sb, KERN_INFO, "mounted filesystem with%s. "
"Opts: %s%s%s", descr, sbi->s_es->s_mount_opts,
*sbi->s_es->s_mount_opts ? "; " : "", orig_data);
if (es->s_error_count)
mod_timer(&sbi->s_err_report, jiffies + 300*HZ); /* 5 minutes */
/* Enable message ratelimiting. Default is 10 messages per 5 secs. */
ratelimit_state_init(&sbi->s_err_ratelimit_state, 5 * HZ, 10);
ratelimit_state_init(&sbi->s_warning_ratelimit_state, 5 * HZ, 10);
ratelimit_state_init(&sbi->s_msg_ratelimit_state, 5 * HZ, 10);
kfree(orig_data);
return 0;
cantfind_ext4:
if (!silent)
ext4_msg(sb, KERN_ERR, "VFS: Can't find ext4 filesystem");
goto failed_mount;
#ifdef CONFIG_QUOTA
failed_mount8:
ext4_unregister_sysfs(sb);
#endif
failed_mount7:
ext4_unregister_li_request(sb);
failed_mount6:
ext4_mb_release(sb);
if (sbi->s_flex_groups)
kvfree(sbi->s_flex_groups);
percpu_counter_destroy(&sbi->s_freeclusters_counter);
percpu_counter_destroy(&sbi->s_freeinodes_counter);
percpu_counter_destroy(&sbi->s_dirs_counter);
percpu_counter_destroy(&sbi->s_dirtyclusters_counter);
failed_mount5:
ext4_ext_release(sb);
ext4_release_system_zone(sb);
failed_mount4a:
dput(sb->s_root);
sb->s_root = NULL;
failed_mount4:
ext4_msg(sb, KERN_ERR, "mount failed");
if (EXT4_SB(sb)->rsv_conversion_wq)
destroy_workqueue(EXT4_SB(sb)->rsv_conversion_wq);
failed_mount_wq:
if (sbi->s_journal) {
jbd2_journal_destroy(sbi->s_journal);
sbi->s_journal = NULL;
}
failed_mount3a:
ext4_es_unregister_shrinker(sbi);
failed_mount3:
del_timer_sync(&sbi->s_err_report);
if (sbi->s_mmp_tsk)
kthread_stop(sbi->s_mmp_tsk);
failed_mount2:
for (i = 0; i < db_count; i++)
brelse(sbi->s_group_desc[i]);
kvfree(sbi->s_group_desc);
failed_mount:
if (sbi->s_chksum_driver)
crypto_free_shash(sbi->s_chksum_driver);
#ifdef CONFIG_QUOTA
for (i = 0; i < EXT4_MAXQUOTAS; i++)
kfree(sbi->s_qf_names[i]);
#endif
ext4_blkdev_remove(sbi);
brelse(bh);
out_fail:
sb->s_fs_info = NULL;
kfree(sbi->s_blockgroup_lock);
kfree(sbi);
out_free_orig:
kfree(orig_data);
return err ? err : ret;
} | 4616 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:50:13-05:00 | ext4: convert to mbcache2
The conversion is generally straightforward. The only tricky part is
that xattr block corresponding to found mbcache entry can get freed
before we get buffer lock for that block. So we have to check whether
the entry is still valid after getting buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | 82939d7999dfc1f1998c4b1c12e2f19edbdff272 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ext4_put_super | ext4_put_super( struct super_block * sb) | ['sb'] | static void ext4_put_super(struct super_block *sb)
{
struct ext4_sb_info *sbi = EXT4_SB(sb);
struct ext4_super_block *es = sbi->s_es;
int i, err;
ext4_unregister_li_request(sb);
dquot_disable(sb, -1, DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED);
flush_workqueue(sbi->rsv_conversion_wq);
destroy_workqueue(sbi->rsv_conversion_wq);
if (sbi->s_journal) {
err = jbd2_journal_destroy(sbi->s_journal);
sbi->s_journal = NULL;
if (err < 0)
ext4_abort(sb, "Couldn't clean up the journal");
}
ext4_unregister_sysfs(sb);
ext4_es_unregister_shrinker(sbi);
del_timer_sync(&sbi->s_err_report);
ext4_release_system_zone(sb);
ext4_mb_release(sb);
ext4_ext_release(sb);
ext4_xattr_put_super(sb);
if (!(sb->s_flags & MS_RDONLY)) {
ext4_clear_feature_journal_needs_recovery(sb);
es->s_state = cpu_to_le16(sbi->s_mount_state);
}
if (!(sb->s_flags & MS_RDONLY))
ext4_commit_super(sb, 1);
for (i = 0; i < sbi->s_gdb_count; i++)
brelse(sbi->s_group_desc[i]);
kvfree(sbi->s_group_desc);
kvfree(sbi->s_flex_groups);
percpu_counter_destroy(&sbi->s_freeclusters_counter);
percpu_counter_destroy(&sbi->s_freeinodes_counter);
percpu_counter_destroy(&sbi->s_dirs_counter);
percpu_counter_destroy(&sbi->s_dirtyclusters_counter);
brelse(sbi->s_sbh);
#ifdef CONFIG_QUOTA
for (i = 0; i < EXT4_MAXQUOTAS; i++)
kfree(sbi->s_qf_names[i]);
#endif
/* Debugging code just in case the in-memory inode orphan list
* isn't empty. The on-disk one can be non-empty if we've
* detected an error and taken the fs readonly, but the
* in-memory list had better be clean by this point. */
if (!list_empty(&sbi->s_orphan))
dump_orphan_list(sb, sbi);
J_ASSERT(list_empty(&sbi->s_orphan));
sync_blockdev(sb->s_bdev);
invalidate_bdev(sb->s_bdev);
if (sbi->journal_bdev && sbi->journal_bdev != sb->s_bdev) {
/*
* Invalidate the journal device's buffers. We don't want them
* floating about in memory - the physical journal device may
* hotswapped, and it breaks the `ro-after' testing code.
*/
sync_blockdev(sbi->journal_bdev);
invalidate_bdev(sbi->journal_bdev);
ext4_blkdev_remove(sbi);
}
if (sbi->s_mb_cache) {
ext4_xattr_destroy_cache(sbi->s_mb_cache);
sbi->s_mb_cache = NULL;
}
if (sbi->s_mmp_tsk)
kthread_stop(sbi->s_mmp_tsk);
sb->s_fs_info = NULL;
/*
* Now that we are completely done shutting down the
* superblock, we need to actually destroy the kobject.
*/
kobject_put(&sbi->s_kobj);
wait_for_completion(&sbi->s_kobj_unregister);
if (sbi->s_chksum_driver)
crypto_free_shash(sbi->s_chksum_driver);
kfree(sbi->s_blockgroup_lock);
kfree(sbi);
} | 445 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:50:13-05:00 | ext4: convert to mbcache2
The conversion is generally straightforward. The only tricky part is
that xattr block corresponding to found mbcache entry can get freed
before we get buffer lock for that block. So we have to check whether
the entry is still valid after getting buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | 82939d7999dfc1f1998c4b1c12e2f19edbdff272 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ext4_xattr_block_get | ext4_xattr_block_get( struct inode * inode , int name_index , const char * name , void * buffer , size_t buffer_size) | ['inode', 'name_index', 'name', 'buffer', 'buffer_size'] | ext4_xattr_block_get(struct inode *inode, int name_index, const char *name,
void *buffer, size_t buffer_size)
{
struct buffer_head *bh = NULL;
struct ext4_xattr_entry *entry;
size_t size;
int error;
struct mb_cache *ext4_mb_cache = EXT4_GET_MB_CACHE(inode);
ea_idebug(inode, "name=%d.%s, buffer=%p, buffer_size=%ld",
name_index, name, buffer, (long)buffer_size);
error = -ENODATA;
if (!EXT4_I(inode)->i_file_acl)
goto cleanup;
ea_idebug(inode, "reading block %llu",
(unsigned long long)EXT4_I(inode)->i_file_acl);
bh = sb_bread(inode->i_sb, EXT4_I(inode)->i_file_acl);
if (!bh)
goto cleanup;
ea_bdebug(bh, "b_count=%d, refcount=%d",
atomic_read(&(bh->b_count)), le32_to_cpu(BHDR(bh)->h_refcount));
if (ext4_xattr_check_block(inode, bh)) {
bad_block:
EXT4_ERROR_INODE(inode, "bad block %llu",
EXT4_I(inode)->i_file_acl);
error = -EFSCORRUPTED;
goto cleanup;
}
ext4_xattr_cache_insert(ext4_mb_cache, bh);
entry = BFIRST(bh);
error = ext4_xattr_find_entry(&entry, name_index, name, bh->b_size, 1);
if (error == -EFSCORRUPTED)
goto bad_block;
if (error)
goto cleanup;
size = le32_to_cpu(entry->e_value_size);
if (buffer) {
error = -ERANGE;
if (size > buffer_size)
goto cleanup;
memcpy(buffer, bh->b_data + le16_to_cpu(entry->e_value_offs),
size);
}
error = size;
cleanup:
brelse(bh);
return error;
} | 303 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:50:13-05:00 | ext4: convert to mbcache2
The conversion is generally straightforward. The only tricky part is
that xattr block corresponding to found mbcache entry can get freed
before we get buffer lock for that block. So we have to check whether
the entry is still valid after getting buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | 82939d7999dfc1f1998c4b1c12e2f19edbdff272 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ext4_xattr_block_list | ext4_xattr_block_list( struct dentry * dentry , char * buffer , size_t buffer_size) | ['dentry', 'buffer', 'buffer_size'] | ext4_xattr_block_list(struct dentry *dentry, char *buffer, size_t buffer_size)
{
struct inode *inode = d_inode(dentry);
struct buffer_head *bh = NULL;
int error;
struct mb_cache *ext4_mb_cache = EXT4_GET_MB_CACHE(inode);
ea_idebug(inode, "buffer=%p, buffer_size=%ld",
buffer, (long)buffer_size);
error = 0;
if (!EXT4_I(inode)->i_file_acl)
goto cleanup;
ea_idebug(inode, "reading block %llu",
(unsigned long long)EXT4_I(inode)->i_file_acl);
bh = sb_bread(inode->i_sb, EXT4_I(inode)->i_file_acl);
error = -EIO;
if (!bh)
goto cleanup;
ea_bdebug(bh, "b_count=%d, refcount=%d",
atomic_read(&(bh->b_count)), le32_to_cpu(BHDR(bh)->h_refcount));
if (ext4_xattr_check_block(inode, bh)) {
EXT4_ERROR_INODE(inode, "bad block %llu",
EXT4_I(inode)->i_file_acl);
error = -EFSCORRUPTED;
goto cleanup;
}
ext4_xattr_cache_insert(ext4_mb_cache, bh);
error = ext4_xattr_list_entries(dentry, BFIRST(bh), buffer, buffer_size);
cleanup:
brelse(bh);
return error;
} | 218 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:50:13-05:00 | ext4: convert to mbcache2
The conversion is generally straightforward. The only tricky part is
that xattr block corresponding to found mbcache entry can get freed
before we get buffer lock for that block. So we have to check whether
the entry is still valid after getting buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | 82939d7999dfc1f1998c4b1c12e2f19edbdff272 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ext4_xattr_block_set | ext4_xattr_block_set( handle_t * handle , struct inode * inode , struct ext4_xattr_info * i , struct ext4_xattr_block_find * bs) | ['handle', 'inode', 'i', 'bs'] | ext4_xattr_block_set(handle_t *handle, struct inode *inode,
struct ext4_xattr_info *i,
struct ext4_xattr_block_find *bs)
{
struct super_block *sb = inode->i_sb;
struct buffer_head *new_bh = NULL;
struct ext4_xattr_search *s = &bs->s;
struct mb_cache_entry *ce = NULL;
int error = 0;
struct mb_cache *ext4_mb_cache = EXT4_GET_MB_CACHE(inode);
#define header(x) ((struct ext4_xattr_header *)(x))
if (i->value && i->value_len > sb->s_blocksize)
return -ENOSPC;
if (s->base) {
ce = mb_cache_entry_get(ext4_mb_cache, bs->bh->b_bdev,
bs->bh->b_blocknr);
BUFFER_TRACE(bs->bh, "get_write_access");
error = ext4_journal_get_write_access(handle, bs->bh);
if (error)
goto cleanup;
lock_buffer(bs->bh);
if (header(s->base)->h_refcount == cpu_to_le32(1)) {
if (ce) {
mb_cache_entry_free(ce);
ce = NULL;
}
ea_bdebug(bs->bh, "modifying in-place");
error = ext4_xattr_set_entry(i, s);
if (!error) {
if (!IS_LAST_ENTRY(s->first))
ext4_xattr_rehash(header(s->base),
s->here);
ext4_xattr_cache_insert(ext4_mb_cache,
bs->bh);
}
unlock_buffer(bs->bh);
if (error == -EFSCORRUPTED)
goto bad_block;
if (!error)
error = ext4_handle_dirty_xattr_block(handle,
inode,
bs->bh);
if (error)
goto cleanup;
goto inserted;
} else {
int offset = (char *)s->here - bs->bh->b_data;
unlock_buffer(bs->bh);
if (ce) {
mb_cache_entry_release(ce);
ce = NULL;
}
ea_bdebug(bs->bh, "cloning");
s->base = kmalloc(bs->bh->b_size, GFP_NOFS);
error = -ENOMEM;
if (s->base == NULL)
goto cleanup;
memcpy(s->base, BHDR(bs->bh), bs->bh->b_size);
s->first = ENTRY(header(s->base)+1);
header(s->base)->h_refcount = cpu_to_le32(1);
s->here = ENTRY(s->base + offset);
s->end = s->base + bs->bh->b_size;
}
} else {
/* Allocate a buffer where we construct the new block. */
s->base = kzalloc(sb->s_blocksize, GFP_NOFS);
/* assert(header == s->base) */
error = -ENOMEM;
if (s->base == NULL)
goto cleanup;
header(s->base)->h_magic = cpu_to_le32(EXT4_XATTR_MAGIC);
header(s->base)->h_blocks = cpu_to_le32(1);
header(s->base)->h_refcount = cpu_to_le32(1);
s->first = ENTRY(header(s->base)+1);
s->here = ENTRY(header(s->base)+1);
s->end = s->base + sb->s_blocksize;
}
error = ext4_xattr_set_entry(i, s);
if (error == -EFSCORRUPTED)
goto bad_block;
if (error)
goto cleanup;
if (!IS_LAST_ENTRY(s->first))
ext4_xattr_rehash(header(s->base), s->here);
inserted:
if (!IS_LAST_ENTRY(s->first)) {
new_bh = ext4_xattr_cache_find(inode, header(s->base), &ce);
if (new_bh) {
/* We found an identical block in the cache. */
if (new_bh == bs->bh)
ea_bdebug(new_bh, "keeping");
else {
/* The old block is released after updating
the inode. */
error = dquot_alloc_block(inode,
EXT4_C2B(EXT4_SB(sb), 1));
if (error)
goto cleanup;
BUFFER_TRACE(new_bh, "get_write_access");
error = ext4_journal_get_write_access(handle,
new_bh);
if (error)
goto cleanup_dquot;
lock_buffer(new_bh);
le32_add_cpu(&BHDR(new_bh)->h_refcount, 1);
ea_bdebug(new_bh, "reusing; refcount now=%d",
le32_to_cpu(BHDR(new_bh)->h_refcount));
unlock_buffer(new_bh);
error = ext4_handle_dirty_xattr_block(handle,
inode,
new_bh);
if (error)
goto cleanup_dquot;
}
mb_cache_entry_release(ce);
ce = NULL;
} else if (bs->bh && s->base == bs->bh->b_data) {
/* We were modifying this block in-place. */
ea_bdebug(bs->bh, "keeping this block");
new_bh = bs->bh;
get_bh(new_bh);
} else {
/* We need to allocate a new block */
ext4_fsblk_t goal, block;
goal = ext4_group_first_block_no(sb,
EXT4_I(inode)->i_block_group);
/* non-extent files can't have physical blocks past 2^32 */
if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)))
goal = goal & EXT4_MAX_BLOCK_FILE_PHYS;
block = ext4_new_meta_blocks(handle, inode, goal, 0,
NULL, &error);
if (error)
goto cleanup;
if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)))
BUG_ON(block > EXT4_MAX_BLOCK_FILE_PHYS);
ea_idebug(inode, "creating block %llu",
(unsigned long long)block);
new_bh = sb_getblk(sb, block);
if (unlikely(!new_bh)) {
error = -ENOMEM;
getblk_failed:
ext4_free_blocks(handle, inode, NULL, block, 1,
EXT4_FREE_BLOCKS_METADATA);
goto cleanup;
}
lock_buffer(new_bh);
error = ext4_journal_get_create_access(handle, new_bh);
if (error) {
unlock_buffer(new_bh);
error = -EIO;
goto getblk_failed;
}
memcpy(new_bh->b_data, s->base, new_bh->b_size);
set_buffer_uptodate(new_bh);
unlock_buffer(new_bh);
ext4_xattr_cache_insert(ext4_mb_cache, new_bh);
error = ext4_handle_dirty_xattr_block(handle,
inode, new_bh);
if (error)
goto cleanup;
}
}
/* Update the inode. */
EXT4_I(inode)->i_file_acl = new_bh ? new_bh->b_blocknr : 0;
/* Drop the previous xattr block. */
if (bs->bh && bs->bh != new_bh)
ext4_xattr_release_block(handle, inode, bs->bh);
error = 0;
cleanup:
if (ce)
mb_cache_entry_release(ce);
brelse(new_bh);
if (!(bs->bh && s->base == bs->bh->b_data))
kfree(s->base);
return error;
cleanup_dquot:
dquot_free_block(inode, EXT4_C2B(EXT4_SB(sb), 1));
goto cleanup;
bad_block:
EXT4_ERROR_INODE(inode, "bad block %llu",
EXT4_I(inode)->i_file_acl);
goto cleanup;
#undef header
} | 1172 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:50:13-05:00 | ext4: convert to mbcache2
The conversion is generally straightforward. The only tricky part is
that xattr block corresponding to found mbcache entry can get freed
before we get buffer lock for that block. So we have to check whether
the entry is still valid after getting buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | 82939d7999dfc1f1998c4b1c12e2f19edbdff272 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ext4_xattr_cache_find | ext4_xattr_cache_find( struct inode * inode , struct ext4_xattr_header * header , struct mb_cache_entry ** pce) | ['inode', 'header', 'pce'] | ext4_xattr_cache_find(struct inode *inode, struct ext4_xattr_header *header,
struct mb_cache_entry **pce)
{
__u32 hash = le32_to_cpu(header->h_hash);
struct mb_cache_entry *ce;
struct mb_cache *ext4_mb_cache = EXT4_GET_MB_CACHE(inode);
if (!header->h_hash)
return NULL; /* never share */
ea_idebug(inode, "looking for cached blocks [%x]", (int)hash);
again:
ce = mb_cache_entry_find_first(ext4_mb_cache, inode->i_sb->s_bdev,
hash);
while (ce) {
struct buffer_head *bh;
if (IS_ERR(ce)) {
if (PTR_ERR(ce) == -EAGAIN)
goto again;
break;
}
bh = sb_bread(inode->i_sb, ce->e_block);
if (!bh) {
EXT4_ERROR_INODE(inode, "block %lu read error",
(unsigned long) ce->e_block);
} else if (le32_to_cpu(BHDR(bh)->h_refcount) >=
EXT4_XATTR_REFCOUNT_MAX) {
ea_idebug(inode, "block %lu refcount %d>=%d",
(unsigned long) ce->e_block,
le32_to_cpu(BHDR(bh)->h_refcount),
EXT4_XATTR_REFCOUNT_MAX);
} else if (ext4_xattr_cmp(header, BHDR(bh)) == 0) {
*pce = ce;
return bh;
}
brelse(bh);
ce = mb_cache_entry_find_next(ce, inode->i_sb->s_bdev, hash);
}
return NULL;
} | 245 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:50:13-05:00 | ext4: convert to mbcache2
The conversion is generally straightforward. The only tricky part is
that xattr block corresponding to found mbcache entry can get freed
before we get buffer lock for that block. So we have to check whether
the entry is still valid after getting buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | 82939d7999dfc1f1998c4b1c12e2f19edbdff272 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ext4_xattr_cache_insert | ext4_xattr_cache_insert( struct mb_cache * ext4_mb_cache , struct buffer_head * bh) | ['ext4_mb_cache', 'bh'] | ext4_xattr_cache_insert(struct mb_cache *ext4_mb_cache, struct buffer_head *bh)
{
__u32 hash = le32_to_cpu(BHDR(bh)->h_hash);
struct mb_cache_entry *ce;
int error;
ce = mb_cache_entry_alloc(ext4_mb_cache, GFP_NOFS);
if (!ce) {
ea_bdebug(bh, "out of memory");
return;
}
error = mb_cache_entry_insert(ce, bh->b_bdev, bh->b_blocknr, hash);
if (error) {
mb_cache_entry_free(ce);
if (error == -EBUSY) {
ea_bdebug(bh, "already in cache");
error = 0;
}
} else {
ea_bdebug(bh, "inserting [%x]", (int)hash);
mb_cache_entry_release(ce);
}
} | 128 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:50:13-05:00 | ext4: convert to mbcache2
The conversion is generally straightforward. The only tricky part is
that xattr block corresponding to found mbcache entry can get freed
before we get buffer lock for that block. So we have to check whether
the entry is still valid after getting buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | 82939d7999dfc1f1998c4b1c12e2f19edbdff272 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ext4_xattr_create_cache | ext4_xattr_create_cache( char * name) | ['name'] | ext4_xattr_create_cache(char *name)
{
return mb_cache_create(name, HASH_BUCKET_BITS);
} | 16 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:50:13-05:00 | ext4: convert to mbcache2
The conversion is generally straightforward. The only tricky part is
that xattr block corresponding to found mbcache entry can get freed
before we get buffer lock for that block. So we have to check whether
the entry is still valid after getting buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | 82939d7999dfc1f1998c4b1c12e2f19edbdff272 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ext4_xattr_destroy_cache | ext4_xattr_destroy_cache( struct mb_cache * cache) | ['cache'] | void ext4_xattr_destroy_cache(struct mb_cache *cache)
{
if (cache)
mb_cache_destroy(cache);
} | 18 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:50:13-05:00 | ext4: convert to mbcache2
The conversion is generally straightforward. The only tricky part is
that xattr block corresponding to found mbcache entry can get freed
before we get buffer lock for that block. So we have to check whether
the entry is still valid after getting buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | 82939d7999dfc1f1998c4b1c12e2f19edbdff272 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ext4_xattr_put_super | ext4_xattr_put_super( struct super_block * sb) | ['sb'] | ext4_xattr_put_super(struct super_block *sb)
{
mb_cache_shrink(sb->s_bdev);
} | 16 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:50:13-05:00 | ext4: convert to mbcache2
The conversion is generally straightforward. The only tricky part is
that xattr block corresponding to found mbcache entry can get freed
before we get buffer lock for that block. So we have to check whether
the entry is still valid after getting buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | 82939d7999dfc1f1998c4b1c12e2f19edbdff272 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ext4_xattr_release_block | ext4_xattr_release_block( handle_t * handle , struct inode * inode , struct buffer_head * bh) | ['handle', 'inode', 'bh'] | ext4_xattr_release_block(handle_t *handle, struct inode *inode,
struct buffer_head *bh)
{
struct mb_cache_entry *ce = NULL;
int error = 0;
struct mb_cache *ext4_mb_cache = EXT4_GET_MB_CACHE(inode);
ce = mb_cache_entry_get(ext4_mb_cache, bh->b_bdev, bh->b_blocknr);
BUFFER_TRACE(bh, "get_write_access");
error = ext4_journal_get_write_access(handle, bh);
if (error)
goto out;
lock_buffer(bh);
if (BHDR(bh)->h_refcount == cpu_to_le32(1)) {
ea_bdebug(bh, "refcount now=0; freeing");
if (ce)
mb_cache_entry_free(ce);
get_bh(bh);
unlock_buffer(bh);
ext4_free_blocks(handle, inode, bh, 0, 1,
EXT4_FREE_BLOCKS_METADATA |
EXT4_FREE_BLOCKS_FORGET);
} else {
le32_add_cpu(&BHDR(bh)->h_refcount, -1);
if (ce)
mb_cache_entry_release(ce);
/*
* Beware of this ugliness: Releasing of xattr block references
* from different inodes can race and so we have to protect
* from a race where someone else frees the block (and releases
* its journal_head) before we are done dirtying the buffer. In
* nojournal mode this race is harmless and we actually cannot
* call ext4_handle_dirty_xattr_block() with locked buffer as
* that function can call sync_dirty_buffer() so for that case
* we handle the dirtying after unlocking the buffer.
*/
if (ext4_handle_valid(handle))
error = ext4_handle_dirty_xattr_block(handle, inode,
bh);
unlock_buffer(bh);
if (!ext4_handle_valid(handle))
error = ext4_handle_dirty_xattr_block(handle, inode,
bh);
if (IS_SYNC(inode))
ext4_handle_sync(handle);
dquot_free_block(inode, EXT4_C2B(EXT4_SB(inode->i_sb), 1));
ea_bdebug(bh, "refcount now=%d; releasing",
le32_to_cpu(BHDR(bh)->h_refcount));
}
out:
ext4_std_error(inode->i_sb, error);
return;
} | 269 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:56:38-05:00 | ext2: convert to mbcache2
The conversion is generally straightforward. We convert filesystem from
a global cache to per-fs one. Similarly to ext4 the tricky part is that
xattr block corresponding to found mbcache entry can get freed before we
get buffer lock for that block. So we have to check whether the entry is
still valid after getting the buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | be0726d33cb8f411945884664924bed3cb8c70ee | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | exit_ext2_fs | exit_ext2_fs( void) | ['void'] | static void __exit exit_ext2_fs(void)
{
unregister_filesystem(&ext2_fs_type);
destroy_inodecache();
exit_ext2_xattr();
} | 20 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:56:38-05:00 | ext2: convert to mbcache2
The conversion is generally straightforward. We convert filesystem from
a global cache to per-fs one. Similarly to ext4 the tricky part is that
xattr block corresponding to found mbcache entry can get freed before we
get buffer lock for that block. So we have to check whether the entry is
still valid after getting the buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | be0726d33cb8f411945884664924bed3cb8c70ee | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ext2_put_super | ext2_put_super( struct super_block * sb) | ['sb'] | static void ext2_put_super (struct super_block * sb)
{
int db_count;
int i;
struct ext2_sb_info *sbi = EXT2_SB(sb);
dquot_disable(sb, -1, DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED);
ext2_xattr_put_super(sb);
if (!(sb->s_flags & MS_RDONLY)) {
struct ext2_super_block *es = sbi->s_es;
spin_lock(&sbi->s_lock);
es->s_state = cpu_to_le16(sbi->s_mount_state);
spin_unlock(&sbi->s_lock);
ext2_sync_super(sb, es, 1);
}
db_count = sbi->s_gdb_count;
for (i = 0; i < db_count; i++)
if (sbi->s_group_desc[i])
brelse (sbi->s_group_desc[i]);
kfree(sbi->s_group_desc);
kfree(sbi->s_debts);
percpu_counter_destroy(&sbi->s_freeblocks_counter);
percpu_counter_destroy(&sbi->s_freeinodes_counter);
percpu_counter_destroy(&sbi->s_dirs_counter);
brelse (sbi->s_sbh);
sb->s_fs_info = NULL;
kfree(sbi->s_blockgroup_lock);
kfree(sbi);
} | 201 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:56:38-05:00 | ext2: convert to mbcache2
The conversion is generally straightforward. We convert filesystem from
a global cache to per-fs one. Similarly to ext4 the tricky part is that
xattr block corresponding to found mbcache entry can get freed before we
get buffer lock for that block. So we have to check whether the entry is
still valid after getting the buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | be0726d33cb8f411945884664924bed3cb8c70ee | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | init_ext2_fs | init_ext2_fs( void) | ['void'] | static int __init init_ext2_fs(void)
{
int err = init_ext2_xattr();
if (err)
return err;
err = init_inodecache();
if (err)
goto out1;
err = register_filesystem(&ext2_fs_type);
if (err)
goto out;
return 0;
out:
destroy_inodecache();
out1:
exit_ext2_xattr();
return err;
} | 66 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:56:38-05:00 | ext2: convert to mbcache2
The conversion is generally straightforward. We convert filesystem from
a global cache to per-fs one. Similarly to ext4 the tricky part is that
xattr block corresponding to found mbcache entry can get freed before we
get buffer lock for that block. So we have to check whether the entry is
still valid after getting the buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | be0726d33cb8f411945884664924bed3cb8c70ee | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | exit_ext2_xattr | exit_ext2_xattr( void) | ['void'] | exit_ext2_xattr(void)
{
mb_cache_destroy(ext2_xattr_cache);
} | 11 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:56:38-05:00 | ext2: convert to mbcache2
The conversion is generally straightforward. We convert filesystem from
a global cache to per-fs one. Similarly to ext4 the tricky part is that
xattr block corresponding to found mbcache entry can get freed before we
get buffer lock for that block. So we have to check whether the entry is
still valid after getting the buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | be0726d33cb8f411945884664924bed3cb8c70ee | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ext2_xattr_cache_find | ext2_xattr_cache_find( struct inode * inode , struct ext2_xattr_header * header) | ['inode', 'header'] | ext2_xattr_cache_find(struct inode *inode, struct ext2_xattr_header *header)
{
__u32 hash = le32_to_cpu(header->h_hash);
struct mb_cache_entry *ce;
if (!header->h_hash)
return NULL; /* never share */
ea_idebug(inode, "looking for cached blocks [%x]", (int)hash);
again:
ce = mb_cache_entry_find_first(ext2_xattr_cache, inode->i_sb->s_bdev,
hash);
while (ce) {
struct buffer_head *bh;
if (IS_ERR(ce)) {
if (PTR_ERR(ce) == -EAGAIN)
goto again;
break;
}
bh = sb_bread(inode->i_sb, ce->e_block);
if (!bh) {
ext2_error(inode->i_sb, "ext2_xattr_cache_find",
"inode %ld: block %ld read error",
inode->i_ino, (unsigned long) ce->e_block);
} else {
lock_buffer(bh);
if (le32_to_cpu(HDR(bh)->h_refcount) >
EXT2_XATTR_REFCOUNT_MAX) {
ea_idebug(inode, "block %ld refcount %d>%d",
(unsigned long) ce->e_block,
le32_to_cpu(HDR(bh)->h_refcount),
EXT2_XATTR_REFCOUNT_MAX);
} else if (!ext2_xattr_cmp(header, HDR(bh))) {
ea_bdebug(bh, "b_count=%d",
atomic_read(&(bh->b_count)));
mb_cache_entry_release(ce);
return bh;
}
unlock_buffer(bh);
brelse(bh);
}
ce = mb_cache_entry_find_next(ce, inode->i_sb->s_bdev, hash);
}
return NULL;
} | 266 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:56:38-05:00 | ext2: convert to mbcache2
The conversion is generally straightforward. We convert filesystem from
a global cache to per-fs one. Similarly to ext4 the tricky part is that
xattr block corresponding to found mbcache entry can get freed before we
get buffer lock for that block. So we have to check whether the entry is
still valid after getting the buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | be0726d33cb8f411945884664924bed3cb8c70ee | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ext2_xattr_cache_insert | ext2_xattr_cache_insert( struct buffer_head * bh) | ['bh'] | ext2_xattr_cache_insert(struct buffer_head *bh)
{
__u32 hash = le32_to_cpu(HDR(bh)->h_hash);
struct mb_cache_entry *ce;
int error;
ce = mb_cache_entry_alloc(ext2_xattr_cache, GFP_NOFS);
if (!ce)
return -ENOMEM;
error = mb_cache_entry_insert(ce, bh->b_bdev, bh->b_blocknr, hash);
if (error) {
mb_cache_entry_free(ce);
if (error == -EBUSY) {
ea_bdebug(bh, "already in cache (%d cache entries)",
atomic_read(&ext2_xattr_cache->c_entry_count));
error = 0;
}
} else {
ea_bdebug(bh, "inserting [%x] (%d cache entries)", (int)hash,
atomic_read(&ext2_xattr_cache->c_entry_count));
mb_cache_entry_release(ce);
}
return error;
} | 135 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:56:38-05:00 | ext2: convert to mbcache2
The conversion is generally straightforward. We convert filesystem from
a global cache to per-fs one. Similarly to ext4 the tricky part is that
xattr block corresponding to found mbcache entry can get freed before we
get buffer lock for that block. So we have to check whether the entry is
still valid after getting the buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | be0726d33cb8f411945884664924bed3cb8c70ee | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ext2_xattr_delete_inode | ext2_xattr_delete_inode( struct inode * inode) | ['inode'] | ext2_xattr_delete_inode(struct inode *inode)
{
struct buffer_head *bh = NULL;
struct mb_cache_entry *ce;
down_write(&EXT2_I(inode)->xattr_sem);
if (!EXT2_I(inode)->i_file_acl)
goto cleanup;
bh = sb_bread(inode->i_sb, EXT2_I(inode)->i_file_acl);
if (!bh) {
ext2_error(inode->i_sb, "ext2_xattr_delete_inode",
"inode %ld: block %d read error", inode->i_ino,
EXT2_I(inode)->i_file_acl);
goto cleanup;
}
ea_bdebug(bh, "b_count=%d", atomic_read(&(bh->b_count)));
if (HDR(bh)->h_magic != cpu_to_le32(EXT2_XATTR_MAGIC) ||
HDR(bh)->h_blocks != cpu_to_le32(1)) {
ext2_error(inode->i_sb, "ext2_xattr_delete_inode",
"inode %ld: bad block %d", inode->i_ino,
EXT2_I(inode)->i_file_acl);
goto cleanup;
}
ce = mb_cache_entry_get(ext2_xattr_cache, bh->b_bdev, bh->b_blocknr);
lock_buffer(bh);
if (HDR(bh)->h_refcount == cpu_to_le32(1)) {
if (ce)
mb_cache_entry_free(ce);
ext2_free_blocks(inode, EXT2_I(inode)->i_file_acl, 1);
get_bh(bh);
bforget(bh);
unlock_buffer(bh);
} else {
le32_add_cpu(&HDR(bh)->h_refcount, -1);
if (ce)
mb_cache_entry_release(ce);
ea_bdebug(bh, "refcount now=%d",
le32_to_cpu(HDR(bh)->h_refcount));
unlock_buffer(bh);
mark_buffer_dirty(bh);
if (IS_SYNC(inode))
sync_dirty_buffer(bh);
dquot_free_block_nodirty(inode, 1);
}
EXT2_I(inode)->i_file_acl = 0;
cleanup:
brelse(bh);
up_write(&EXT2_I(inode)->xattr_sem);
} | 336 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:56:38-05:00 | ext2: convert to mbcache2
The conversion is generally straightforward. We convert filesystem from
a global cache to per-fs one. Similarly to ext4 the tricky part is that
xattr block corresponding to found mbcache entry can get freed before we
get buffer lock for that block. So we have to check whether the entry is
still valid after getting the buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | be0726d33cb8f411945884664924bed3cb8c70ee | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ext2_xattr_get | ext2_xattr_get( struct inode * inode , int name_index , const char * name , void * buffer , size_t buffer_size) | ['inode', 'name_index', 'name', 'buffer', 'buffer_size'] | ext2_xattr_get(struct inode *inode, int name_index, const char *name,
void *buffer, size_t buffer_size)
{
struct buffer_head *bh = NULL;
struct ext2_xattr_entry *entry;
size_t name_len, size;
char *end;
int error;
ea_idebug(inode, "name=%d.%s, buffer=%p, buffer_size=%ld",
name_index, name, buffer, (long)buffer_size);
if (name == NULL)
return -EINVAL;
name_len = strlen(name);
if (name_len > 255)
return -ERANGE;
down_read(&EXT2_I(inode)->xattr_sem);
error = -ENODATA;
if (!EXT2_I(inode)->i_file_acl)
goto cleanup;
ea_idebug(inode, "reading block %d", EXT2_I(inode)->i_file_acl);
bh = sb_bread(inode->i_sb, EXT2_I(inode)->i_file_acl);
error = -EIO;
if (!bh)
goto cleanup;
ea_bdebug(bh, "b_count=%d, refcount=%d",
atomic_read(&(bh->b_count)), le32_to_cpu(HDR(bh)->h_refcount));
end = bh->b_data + bh->b_size;
if (HDR(bh)->h_magic != cpu_to_le32(EXT2_XATTR_MAGIC) ||
HDR(bh)->h_blocks != cpu_to_le32(1)) {
bad_block: ext2_error(inode->i_sb, "ext2_xattr_get",
"inode %ld: bad block %d", inode->i_ino,
EXT2_I(inode)->i_file_acl);
error = -EIO;
goto cleanup;
}
/* find named attribute */
entry = FIRST_ENTRY(bh);
while (!IS_LAST_ENTRY(entry)) {
struct ext2_xattr_entry *next =
EXT2_XATTR_NEXT(entry);
if ((char *)next >= end)
goto bad_block;
if (name_index == entry->e_name_index &&
name_len == entry->e_name_len &&
memcmp(name, entry->e_name, name_len) == 0)
goto found;
entry = next;
}
if (ext2_xattr_cache_insert(bh))
ea_idebug(inode, "cache insert failed");
error = -ENODATA;
goto cleanup;
found:
/* check the buffer size */
if (entry->e_value_block != 0)
goto bad_block;
size = le32_to_cpu(entry->e_value_size);
if (size > inode->i_sb->s_blocksize ||
le16_to_cpu(entry->e_value_offs) + size > inode->i_sb->s_blocksize)
goto bad_block;
if (ext2_xattr_cache_insert(bh))
ea_idebug(inode, "cache insert failed");
if (buffer) {
error = -ERANGE;
if (size > buffer_size)
goto cleanup;
/* return value of attribute */
memcpy(buffer, bh->b_data + le16_to_cpu(entry->e_value_offs),
size);
}
error = size;
cleanup:
brelse(bh);
up_read(&EXT2_I(inode)->xattr_sem);
return error;
} | 485 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:56:38-05:00 | ext2: convert to mbcache2
The conversion is generally straightforward. We convert filesystem from
a global cache to per-fs one. Similarly to ext4 the tricky part is that
xattr block corresponding to found mbcache entry can get freed before we
get buffer lock for that block. So we have to check whether the entry is
still valid after getting the buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | be0726d33cb8f411945884664924bed3cb8c70ee | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ext2_xattr_list | ext2_xattr_list( struct dentry * dentry , char * buffer , size_t buffer_size) | ['dentry', 'buffer', 'buffer_size'] | ext2_xattr_list(struct dentry *dentry, char *buffer, size_t buffer_size)
{
struct inode *inode = d_inode(dentry);
struct buffer_head *bh = NULL;
struct ext2_xattr_entry *entry;
char *end;
size_t rest = buffer_size;
int error;
ea_idebug(inode, "buffer=%p, buffer_size=%ld",
buffer, (long)buffer_size);
down_read(&EXT2_I(inode)->xattr_sem);
error = 0;
if (!EXT2_I(inode)->i_file_acl)
goto cleanup;
ea_idebug(inode, "reading block %d", EXT2_I(inode)->i_file_acl);
bh = sb_bread(inode->i_sb, EXT2_I(inode)->i_file_acl);
error = -EIO;
if (!bh)
goto cleanup;
ea_bdebug(bh, "b_count=%d, refcount=%d",
atomic_read(&(bh->b_count)), le32_to_cpu(HDR(bh)->h_refcount));
end = bh->b_data + bh->b_size;
if (HDR(bh)->h_magic != cpu_to_le32(EXT2_XATTR_MAGIC) ||
HDR(bh)->h_blocks != cpu_to_le32(1)) {
bad_block: ext2_error(inode->i_sb, "ext2_xattr_list",
"inode %ld: bad block %d", inode->i_ino,
EXT2_I(inode)->i_file_acl);
error = -EIO;
goto cleanup;
}
/* check the on-disk data structure */
entry = FIRST_ENTRY(bh);
while (!IS_LAST_ENTRY(entry)) {
struct ext2_xattr_entry *next = EXT2_XATTR_NEXT(entry);
if ((char *)next >= end)
goto bad_block;
entry = next;
}
if (ext2_xattr_cache_insert(bh))
ea_idebug(inode, "cache insert failed");
/* list the attribute names */
for (entry = FIRST_ENTRY(bh); !IS_LAST_ENTRY(entry);
entry = EXT2_XATTR_NEXT(entry)) {
const struct xattr_handler *handler =
ext2_xattr_handler(entry->e_name_index);
if (handler && (!handler->list || handler->list(dentry))) {
const char *prefix = handler->prefix ?: handler->name;
size_t prefix_len = strlen(prefix);
size_t size = prefix_len + entry->e_name_len + 1;
if (buffer) {
if (size > rest) {
error = -ERANGE;
goto cleanup;
}
memcpy(buffer, prefix, prefix_len);
buffer += prefix_len;
memcpy(buffer, entry->e_name, entry->e_name_len);
buffer += entry->e_name_len;
*buffer++ = 0;
}
rest -= size;
}
}
error = buffer_size - rest; /* total size */
cleanup:
brelse(bh);
up_read(&EXT2_I(inode)->xattr_sem);
return error;
} | 471 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:56:38-05:00 | ext2: convert to mbcache2
The conversion is generally straightforward. We convert filesystem from
a global cache to per-fs one. Similarly to ext4 the tricky part is that
xattr block corresponding to found mbcache entry can get freed before we
get buffer lock for that block. So we have to check whether the entry is
still valid after getting the buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | be0726d33cb8f411945884664924bed3cb8c70ee | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ext2_xattr_put_super | ext2_xattr_put_super( struct super_block * sb) | ['sb'] | ext2_xattr_put_super(struct super_block *sb)
{
mb_cache_shrink(sb->s_bdev);
} | 16 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:56:38-05:00 | ext2: convert to mbcache2
The conversion is generally straightforward. We convert filesystem from
a global cache to per-fs one. Similarly to ext4 the tricky part is that
xattr block corresponding to found mbcache entry can get freed before we
get buffer lock for that block. So we have to check whether the entry is
still valid after getting the buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | be0726d33cb8f411945884664924bed3cb8c70ee | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ext2_xattr_set | ext2_xattr_set( struct inode * inode , int name_index , const char * name , const void * value , size_t value_len , int flags) | ['inode', 'name_index', 'name', 'value', 'value_len', 'flags'] | ext2_xattr_set(struct inode *inode, int name_index, const char *name,
const void *value, size_t value_len, int flags)
{
struct super_block *sb = inode->i_sb;
struct buffer_head *bh = NULL;
struct ext2_xattr_header *header = NULL;
struct ext2_xattr_entry *here, *last;
size_t name_len, free, min_offs = sb->s_blocksize;
int not_found = 1, error;
char *end;
/*
* header -- Points either into bh, or to a temporarily
* allocated buffer.
* here -- The named entry found, or the place for inserting, within
* the block pointed to by header.
* last -- Points right after the last named entry within the block
* pointed to by header.
* min_offs -- The offset of the first value (values are aligned
* towards the end of the block).
* end -- Points right after the block pointed to by header.
*/
ea_idebug(inode, "name=%d.%s, value=%p, value_len=%ld",
name_index, name, value, (long)value_len);
if (value == NULL)
value_len = 0;
if (name == NULL)
return -EINVAL;
name_len = strlen(name);
if (name_len > 255 || value_len > sb->s_blocksize)
return -ERANGE;
down_write(&EXT2_I(inode)->xattr_sem);
if (EXT2_I(inode)->i_file_acl) {
/* The inode already has an extended attribute block. */
bh = sb_bread(sb, EXT2_I(inode)->i_file_acl);
error = -EIO;
if (!bh)
goto cleanup;
ea_bdebug(bh, "b_count=%d, refcount=%d",
atomic_read(&(bh->b_count)),
le32_to_cpu(HDR(bh)->h_refcount));
header = HDR(bh);
end = bh->b_data + bh->b_size;
if (header->h_magic != cpu_to_le32(EXT2_XATTR_MAGIC) ||
header->h_blocks != cpu_to_le32(1)) {
bad_block: ext2_error(sb, "ext2_xattr_set",
"inode %ld: bad block %d", inode->i_ino,
EXT2_I(inode)->i_file_acl);
error = -EIO;
goto cleanup;
}
/* Find the named attribute. */
here = FIRST_ENTRY(bh);
while (!IS_LAST_ENTRY(here)) {
struct ext2_xattr_entry *next = EXT2_XATTR_NEXT(here);
if ((char *)next >= end)
goto bad_block;
if (!here->e_value_block && here->e_value_size) {
size_t offs = le16_to_cpu(here->e_value_offs);
if (offs < min_offs)
min_offs = offs;
}
not_found = name_index - here->e_name_index;
if (!not_found)
not_found = name_len - here->e_name_len;
if (!not_found)
not_found = memcmp(name, here->e_name,name_len);
if (not_found <= 0)
break;
here = next;
}
last = here;
/* We still need to compute min_offs and last. */
while (!IS_LAST_ENTRY(last)) {
struct ext2_xattr_entry *next = EXT2_XATTR_NEXT(last);
if ((char *)next >= end)
goto bad_block;
if (!last->e_value_block && last->e_value_size) {
size_t offs = le16_to_cpu(last->e_value_offs);
if (offs < min_offs)
min_offs = offs;
}
last = next;
}
/* Check whether we have enough space left. */
free = min_offs - ((char*)last - (char*)header) - sizeof(__u32);
} else {
/* We will use a new extended attribute block. */
free = sb->s_blocksize -
sizeof(struct ext2_xattr_header) - sizeof(__u32);
here = last = NULL; /* avoid gcc uninitialized warning. */
}
if (not_found) {
/* Request to remove a nonexistent attribute? */
error = -ENODATA;
if (flags & XATTR_REPLACE)
goto cleanup;
error = 0;
if (value == NULL)
goto cleanup;
} else {
/* Request to create an existing attribute? */
error = -EEXIST;
if (flags & XATTR_CREATE)
goto cleanup;
if (!here->e_value_block && here->e_value_size) {
size_t size = le32_to_cpu(here->e_value_size);
if (le16_to_cpu(here->e_value_offs) + size >
sb->s_blocksize || size > sb->s_blocksize)
goto bad_block;
free += EXT2_XATTR_SIZE(size);
}
free += EXT2_XATTR_LEN(name_len);
}
error = -ENOSPC;
if (free < EXT2_XATTR_LEN(name_len) + EXT2_XATTR_SIZE(value_len))
goto cleanup;
/* Here we know that we can set the new attribute. */
if (header) {
struct mb_cache_entry *ce;
/* assert(header == HDR(bh)); */
ce = mb_cache_entry_get(ext2_xattr_cache, bh->b_bdev,
bh->b_blocknr);
lock_buffer(bh);
if (header->h_refcount == cpu_to_le32(1)) {
ea_bdebug(bh, "modifying in-place");
if (ce)
mb_cache_entry_free(ce);
/* keep the buffer locked while modifying it. */
} else {
int offset;
if (ce)
mb_cache_entry_release(ce);
unlock_buffer(bh);
ea_bdebug(bh, "cloning");
header = kmalloc(bh->b_size, GFP_KERNEL);
error = -ENOMEM;
if (header == NULL)
goto cleanup;
memcpy(header, HDR(bh), bh->b_size);
header->h_refcount = cpu_to_le32(1);
offset = (char *)here - bh->b_data;
here = ENTRY((char *)header + offset);
offset = (char *)last - bh->b_data;
last = ENTRY((char *)header + offset);
}
} else {
/* Allocate a buffer where we construct the new block. */
header = kzalloc(sb->s_blocksize, GFP_KERNEL);
error = -ENOMEM;
if (header == NULL)
goto cleanup;
end = (char *)header + sb->s_blocksize;
header->h_magic = cpu_to_le32(EXT2_XATTR_MAGIC);
header->h_blocks = header->h_refcount = cpu_to_le32(1);
last = here = ENTRY(header+1);
}
/* Iff we are modifying the block in-place, bh is locked here. */
if (not_found) {
/* Insert the new name. */
size_t size = EXT2_XATTR_LEN(name_len);
size_t rest = (char *)last - (char *)here;
memmove((char *)here + size, here, rest);
memset(here, 0, size);
here->e_name_index = name_index;
here->e_name_len = name_len;
memcpy(here->e_name, name, name_len);
} else {
if (!here->e_value_block && here->e_value_size) {
char *first_val = (char *)header + min_offs;
size_t offs = le16_to_cpu(here->e_value_offs);
char *val = (char *)header + offs;
size_t size = EXT2_XATTR_SIZE(
le32_to_cpu(here->e_value_size));
if (size == EXT2_XATTR_SIZE(value_len)) {
/* The old and the new value have the same
size. Just replace. */
here->e_value_size = cpu_to_le32(value_len);
memset(val + size - EXT2_XATTR_PAD, 0,
EXT2_XATTR_PAD); /* Clear pad bytes. */
memcpy(val, value, value_len);
goto skip_replace;
}
/* Remove the old value. */
memmove(first_val + size, first_val, val - first_val);
memset(first_val, 0, size);
here->e_value_offs = 0;
min_offs += size;
/* Adjust all value offsets. */
last = ENTRY(header+1);
while (!IS_LAST_ENTRY(last)) {
size_t o = le16_to_cpu(last->e_value_offs);
if (!last->e_value_block && o < offs)
last->e_value_offs =
cpu_to_le16(o + size);
last = EXT2_XATTR_NEXT(last);
}
}
if (value == NULL) {
/* Remove the old name. */
size_t size = EXT2_XATTR_LEN(name_len);
last = ENTRY((char *)last - size);
memmove(here, (char*)here + size,
(char*)last - (char*)here);
memset(last, 0, size);
}
}
if (value != NULL) {
/* Insert the new value. */
here->e_value_size = cpu_to_le32(value_len);
if (value_len) {
size_t size = EXT2_XATTR_SIZE(value_len);
char *val = (char *)header + min_offs - size;
here->e_value_offs =
cpu_to_le16((char *)val - (char *)header);
memset(val + size - EXT2_XATTR_PAD, 0,
EXT2_XATTR_PAD); /* Clear the pad bytes. */
memcpy(val, value, value_len);
}
}
skip_replace:
if (IS_LAST_ENTRY(ENTRY(header+1))) {
/* This block is now empty. */
if (bh && header == HDR(bh))
unlock_buffer(bh); /* we were modifying in-place. */
error = ext2_xattr_set2(inode, bh, NULL);
} else {
ext2_xattr_rehash(header, here);
if (bh && header == HDR(bh))
unlock_buffer(bh); /* we were modifying in-place. */
error = ext2_xattr_set2(inode, bh, header);
}
cleanup:
brelse(bh);
if (!(bh && header == HDR(bh)))
kfree(header);
up_write(&EXT2_I(inode)->xattr_sem);
return error;
} | 1468 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:56:38-05:00 | ext2: convert to mbcache2
The conversion is generally straightforward. We convert filesystem from
a global cache to per-fs one. Similarly to ext4 the tricky part is that
xattr block corresponding to found mbcache entry can get freed before we
get buffer lock for that block. So we have to check whether the entry is
still valid after getting the buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | be0726d33cb8f411945884664924bed3cb8c70ee | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ext2_xattr_set2 | ext2_xattr_set2( struct inode * inode , struct buffer_head * old_bh , struct ext2_xattr_header * header) | ['inode', 'old_bh', 'header'] | ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh,
struct ext2_xattr_header *header)
{
struct super_block *sb = inode->i_sb;
struct buffer_head *new_bh = NULL;
int error;
if (header) {
new_bh = ext2_xattr_cache_find(inode, header);
if (new_bh) {
/* We found an identical block in the cache. */
if (new_bh == old_bh) {
ea_bdebug(new_bh, "keeping this block");
} else {
/* The old block is released after updating
the inode. */
ea_bdebug(new_bh, "reusing block");
error = dquot_alloc_block(inode, 1);
if (error) {
unlock_buffer(new_bh);
goto cleanup;
}
le32_add_cpu(&HDR(new_bh)->h_refcount, 1);
ea_bdebug(new_bh, "refcount now=%d",
le32_to_cpu(HDR(new_bh)->h_refcount));
}
unlock_buffer(new_bh);
} else if (old_bh && header == HDR(old_bh)) {
/* Keep this block. No need to lock the block as we
don't need to change the reference count. */
new_bh = old_bh;
get_bh(new_bh);
ext2_xattr_cache_insert(new_bh);
} else {
/* We need to allocate a new block */
ext2_fsblk_t goal = ext2_group_first_block_no(sb,
EXT2_I(inode)->i_block_group);
int block = ext2_new_block(inode, goal, &error);
if (error)
goto cleanup;
ea_idebug(inode, "creating block %d", block);
new_bh = sb_getblk(sb, block);
if (unlikely(!new_bh)) {
ext2_free_blocks(inode, block, 1);
mark_inode_dirty(inode);
error = -ENOMEM;
goto cleanup;
}
lock_buffer(new_bh);
memcpy(new_bh->b_data, header, new_bh->b_size);
set_buffer_uptodate(new_bh);
unlock_buffer(new_bh);
ext2_xattr_cache_insert(new_bh);
ext2_xattr_update_super_block(sb);
}
mark_buffer_dirty(new_bh);
if (IS_SYNC(inode)) {
sync_dirty_buffer(new_bh);
error = -EIO;
if (buffer_req(new_bh) && !buffer_uptodate(new_bh))
goto cleanup;
}
}
/* Update the inode. */
EXT2_I(inode)->i_file_acl = new_bh ? new_bh->b_blocknr : 0;
inode->i_ctime = CURRENT_TIME_SEC;
if (IS_SYNC(inode)) {
error = sync_inode_metadata(inode, 1);
/* In case sync failed due to ENOSPC the inode was actually
* written (only some dirty data were not) so we just proceed
* as if nothing happened and cleanup the unused block */
if (error && error != -ENOSPC) {
if (new_bh && new_bh != old_bh) {
dquot_free_block_nodirty(inode, 1);
mark_inode_dirty(inode);
}
goto cleanup;
}
} else
mark_inode_dirty(inode);
error = 0;
if (old_bh && old_bh != new_bh) {
struct mb_cache_entry *ce;
/*
* If there was an old block and we are no longer using it,
* release the old block.
*/
ce = mb_cache_entry_get(ext2_xattr_cache, old_bh->b_bdev,
old_bh->b_blocknr);
lock_buffer(old_bh);
if (HDR(old_bh)->h_refcount == cpu_to_le32(1)) {
/* Free the old block. */
if (ce)
mb_cache_entry_free(ce);
ea_bdebug(old_bh, "freeing");
ext2_free_blocks(inode, old_bh->b_blocknr, 1);
mark_inode_dirty(inode);
/* We let our caller release old_bh, so we
* need to duplicate the buffer before. */
get_bh(old_bh);
bforget(old_bh);
} else {
/* Decrement the refcount only. */
le32_add_cpu(&HDR(old_bh)->h_refcount, -1);
if (ce)
mb_cache_entry_release(ce);
dquot_free_block_nodirty(inode, 1);
mark_inode_dirty(inode);
mark_buffer_dirty(old_bh);
ea_bdebug(old_bh, "refcount now=%d",
le32_to_cpu(HDR(old_bh)->h_refcount));
}
unlock_buffer(old_bh);
}
cleanup:
brelse(new_bh);
return error;
} | 589 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:56:38-05:00 | ext2: convert to mbcache2
The conversion is generally straightforward. We convert filesystem from
a global cache to per-fs one. Similarly to ext4 the tricky part is that
xattr block corresponding to found mbcache entry can get freed before we
get buffer lock for that block. So we have to check whether the entry is
still valid after getting the buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | be0726d33cb8f411945884664924bed3cb8c70ee | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | init_ext2_xattr | init_ext2_xattr( void) | ['void'] | init_ext2_xattr(void)
{
ext2_xattr_cache = mb_cache_create("ext2_xattr", 6);
if (!ext2_xattr_cache)
return -ENOMEM;
return 0;
} | 27 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:56:38-05:00 | ext2: convert to mbcache2
The conversion is generally straightforward. We convert filesystem from
a global cache to per-fs one. Similarly to ext4 the tricky part is that
xattr block corresponding to found mbcache entry can get freed before we
get buffer lock for that block. So we have to check whether the entry is
still valid after getting the buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | be0726d33cb8f411945884664924bed3cb8c70ee | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | exit_ext2_xattr | exit_ext2_xattr( void) | ['void'] | exit_ext2_xattr(void)
{
} | 6 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:56:38-05:00 | ext2: convert to mbcache2
The conversion is generally straightforward. We convert filesystem from
a global cache to per-fs one. Similarly to ext4 the tricky part is that
xattr block corresponding to found mbcache entry can get freed before we
get buffer lock for that block. So we have to check whether the entry is
still valid after getting the buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | be0726d33cb8f411945884664924bed3cb8c70ee | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ext2_xattr_put_super | ext2_xattr_put_super( struct super_block * sb) | ['sb'] | ext2_xattr_put_super(struct super_block *sb)
{
} | 9 | True | 1 |
||
CVE-2015-8952 | 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 | True | [{'url': 'http://www.openwall.com/lists/oss-security/2016/08/22/2', 'name': '[oss-security] 20160822 CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1360968', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://lwn.net/Articles/668718/', 'name': 'https://lwn.net/Articles/668718/', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'https://github.com/torvalds/linux/commit/f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/25/4', 'name': '[oss-security] 20160825 Re: CVE request: Linux kernel mbcache lock contention denial of service.', 'refsource': 'MLIST', 'tags': ['Patch', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'https://github.com/torvalds/linux/commit/82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f9a61eb4e2471c56a63cd804c7474128138c38ac', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'name': 'https://bugzilla.kernel.org/show_bug.cgi?id=107301', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'name': 'https://github.com/torvalds/linux/commit/be0726d33cb8f411945884664924bed3cb8c70ee', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=82939d7999dfc1f1998c4b1c12e2f19edbdff272', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://usn.ubuntu.com/3582-2/', 'name': 'USN-3582-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'https://usn.ubuntu.com/3582-1/', 'name': 'USN-3582-1', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The mbcache feature in the ext2 and ext4 filesystem implementations in the Linux kernel before 4.6 mishandles xattr block caching, which allows local users to cause a denial of service (soft lockup) via filesystem operations in environments that use many attributes, as demonstrated by Ceph and Samba.'}] | 2018-03-16T01:29Z | 2016-10-16T21:59Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Jan Kara | 2016-02-22 11:56:38-05:00 | ext2: convert to mbcache2
The conversion is generally straightforward. We convert filesystem from
a global cache to per-fs one. Similarly to ext4 the tricky part is that
xattr block corresponding to found mbcache entry can get freed before we
get buffer lock for that block. So we have to check whether the entry is
still valid after getting the buffer lock.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu> | be0726d33cb8f411945884664924bed3cb8c70ee | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | init_ext2_xattr | init_ext2_xattr( void) | ['void'] | init_ext2_xattr(void)
{
return 0;
} | 9 | True | 1 |
||
CVE-2016-6327 | 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 | True | [{'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.5.1', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.5.1', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=51093254bf879bc9ce96590400a87897c7498463', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=51093254bf879bc9ce96590400a87897c7498463', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/51093254bf879bc9ce96590400a87897c7498463', 'name': 'https://github.com/torvalds/linux/commit/51093254bf879bc9ce96590400a87897c7498463', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/19/5', 'name': '[oss-security] 20160819 Re: CVE-2016-6327 | Linux kernel crash in infiniband subsystem.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1354525', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1354525', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/92549', 'name': '92549', 'refsource': 'BID', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2584.html', 'name': 'RHSA-2016:2584', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2574.html', 'name': 'RHSA-2016:2574', 'refsource': 'REDHAT', '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.5.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'drivers/infiniband/ulp/srpt/ib_srpt.c in the Linux kernel before 4.5.1 allows local users to cause a denial of service (NULL pointer dereference and system crash) by using an ABORT_TASK command to abort a device write operation.'}] | 2018-01-05T02:31Z | 2016-10-16T21:59Z | 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 | Bart Van Assche | 2016-02-11 11:03:09-08:00 | IB/srpt: Simplify srpt_handle_tsk_mgmt()
Let the target core check task existence instead of the SRP target
driver. Additionally, let the target core check the validity of the
task management request instead of the ib_srpt driver.
This patch fixes the following kernel crash:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000001
IP: [<ffffffffa0565f37>] srpt_handle_new_iu+0x6d7/0x790 [ib_srpt]
Oops: 0002 [#1] SMP
Call Trace:
[<ffffffffa05660ce>] srpt_process_completion+0xde/0x570 [ib_srpt]
[<ffffffffa056669f>] srpt_compl_thread+0x13f/0x160 [ib_srpt]
[<ffffffff8109726f>] kthread+0xcf/0xe0
[<ffffffff81613cfc>] ret_from_fork+0x7c/0xb0
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Fixes: 3e4f574857ee ("ib_srpt: Convert TMR path to target_submit_tmr")
Tested-by: Alex Estrin <alex.estrin@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Sagi Grimberg <sagig@mellanox.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com> | 51093254bf879bc9ce96590400a87897c7498463 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | srpt_handle_tsk_mgmt | srpt_handle_tsk_mgmt( struct srpt_rdma_ch * ch , struct srpt_recv_ioctx * recv_ioctx , struct srpt_send_ioctx * send_ioctx) | ['ch', 'recv_ioctx', 'send_ioctx'] | static void srpt_handle_tsk_mgmt(struct srpt_rdma_ch *ch,
struct srpt_recv_ioctx *recv_ioctx,
struct srpt_send_ioctx *send_ioctx)
{
struct srp_tsk_mgmt *srp_tsk;
struct se_cmd *cmd;
struct se_session *sess = ch->sess;
uint64_t unpacked_lun;
uint32_t tag = 0;
int tcm_tmr;
int rc;
BUG_ON(!send_ioctx);
srp_tsk = recv_ioctx->ioctx.buf;
cmd = &send_ioctx->cmd;
pr_debug("recv tsk_mgmt fn %d for task_tag %lld and cmd tag %lld"
" cm_id %p sess %p\n", srp_tsk->tsk_mgmt_func,
srp_tsk->task_tag, srp_tsk->tag, ch->cm_id, ch->sess);
srpt_set_cmd_state(send_ioctx, SRPT_STATE_MGMT);
send_ioctx->cmd.tag = srp_tsk->tag;
tcm_tmr = srp_tmr_to_tcm(srp_tsk->tsk_mgmt_func);
if (tcm_tmr < 0) {
send_ioctx->cmd.se_tmr_req->response =
TMR_TASK_MGMT_FUNCTION_NOT_SUPPORTED;
goto fail;
}
unpacked_lun = srpt_unpack_lun((uint8_t *)&srp_tsk->lun,
sizeof(srp_tsk->lun));
if (srp_tsk->tsk_mgmt_func == SRP_TSK_ABORT_TASK) {
rc = srpt_rx_mgmt_fn_tag(send_ioctx, srp_tsk->task_tag);
if (rc < 0) {
send_ioctx->cmd.se_tmr_req->response =
TMR_TASK_DOES_NOT_EXIST;
goto fail;
}
tag = srp_tsk->task_tag;
}
rc = target_submit_tmr(&send_ioctx->cmd, sess, NULL, unpacked_lun,
srp_tsk, tcm_tmr, GFP_KERNEL, tag,
TARGET_SCF_ACK_KREF);
if (rc != 0) {
send_ioctx->cmd.se_tmr_req->response = TMR_FUNCTION_REJECTED;
goto fail;
}
return;
fail:
transport_send_check_condition_and_sense(cmd, 0, 0); // XXX:
} | 275 | True | 1 |
|
CVE-2016-6327 | 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 | True | [{'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.5.1', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.5.1', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=51093254bf879bc9ce96590400a87897c7498463', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=51093254bf879bc9ce96590400a87897c7498463', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/51093254bf879bc9ce96590400a87897c7498463', 'name': 'https://github.com/torvalds/linux/commit/51093254bf879bc9ce96590400a87897c7498463', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/08/19/5', 'name': '[oss-security] 20160819 Re: CVE-2016-6327 | Linux kernel crash in infiniband subsystem.', 'refsource': 'MLIST', 'tags': ['Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1354525', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1354525', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.securityfocus.com/bid/92549', 'name': '92549', 'refsource': 'BID', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2584.html', 'name': 'RHSA-2016:2584', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2574.html', 'name': 'RHSA-2016:2574', 'refsource': 'REDHAT', '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.5.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'drivers/infiniband/ulp/srpt/ib_srpt.c in the Linux kernel before 4.5.1 allows local users to cause a denial of service (NULL pointer dereference and system crash) by using an ABORT_TASK command to abort a device write operation.'}] | 2018-01-05T02:31Z | 2016-10-16T21:59Z | 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 | Bart Van Assche | 2016-02-11 11:03:09-08:00 | IB/srpt: Simplify srpt_handle_tsk_mgmt()
Let the target core check task existence instead of the SRP target
driver. Additionally, let the target core check the validity of the
task management request instead of the ib_srpt driver.
This patch fixes the following kernel crash:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000001
IP: [<ffffffffa0565f37>] srpt_handle_new_iu+0x6d7/0x790 [ib_srpt]
Oops: 0002 [#1] SMP
Call Trace:
[<ffffffffa05660ce>] srpt_process_completion+0xde/0x570 [ib_srpt]
[<ffffffffa056669f>] srpt_compl_thread+0x13f/0x160 [ib_srpt]
[<ffffffff8109726f>] kthread+0xcf/0xe0
[<ffffffff81613cfc>] ret_from_fork+0x7c/0xb0
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Fixes: 3e4f574857ee ("ib_srpt: Convert TMR path to target_submit_tmr")
Tested-by: Alex Estrin <alex.estrin@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Sagi Grimberg <sagig@mellanox.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com> | 51093254bf879bc9ce96590400a87897c7498463 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | srpt_rx_mgmt_fn_tag | srpt_rx_mgmt_fn_tag( struct srpt_send_ioctx * ioctx , u64 tag) | ['ioctx', 'tag'] | static int srpt_rx_mgmt_fn_tag(struct srpt_send_ioctx *ioctx, u64 tag)
{
struct srpt_device *sdev;
struct srpt_rdma_ch *ch;
struct srpt_send_ioctx *target;
int ret, i;
ret = -EINVAL;
ch = ioctx->ch;
BUG_ON(!ch);
BUG_ON(!ch->sport);
sdev = ch->sport->sdev;
BUG_ON(!sdev);
spin_lock_irq(&sdev->spinlock);
for (i = 0; i < ch->rq_size; ++i) {
target = ch->ioctx_ring[i];
if (target->cmd.se_lun == ioctx->cmd.se_lun &&
target->cmd.tag == tag &&
srpt_get_cmd_state(target) != SRPT_STATE_DONE) {
ret = 0;
/* now let the target core abort &target->cmd; */
break;
}
}
spin_unlock_irq(&sdev->spinlock);
return ret;
} | 153 | True | 1 |
|
CVE-2016-9685 | 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 | nan | [{'url': 'https://github.com/torvalds/linux/commit/2e83b79b2d6c78bf1b4aa227938a214dcbddc83f', 'name': 'https://github.com/torvalds/linux/commit/2e83b79b2d6c78bf1b4aa227938a214dcbddc83f', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396941', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396941', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/30/1', 'name': '[oss-security] 20161130 cve-request: linux kernel - memory leak in xfs attribute mechanism.', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Patch']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.5.1', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.5.1', 'refsource': 'CONFIRM', 'tags': ['Release Notes']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2e83b79b2d6c78bf1b4aa227938a214dcbddc83f', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2e83b79b2d6c78bf1b4aa227938a214dcbddc83f', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/94593', 'name': '94593', 'refsource': 'BID', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:2669', 'name': 'RHSA-2017:2669', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:2077', 'name': 'RHSA-2017:2077', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1842', 'name': 'RHSA-2017:1842', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-400'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple memory leaks in error paths in fs/xfs/xfs_attr_list.c in the Linux kernel before 4.5.1 allow local users to cause a denial of service (memory consumption) via crafted XFS filesystem operations.'}] | 2018-01-05T02:31Z | 2016-12-28T07:59Z | 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 | Mateusz Guzik | 2016-03-02 09:51:09+11:00 | xfs: fix two memory leaks in xfs_attr_list.c error paths
This plugs 2 trivial leaks in xfs_attr_shortform_list and
xfs_attr3_leaf_list_int.
Signed-off-by: Mateusz Guzik <mguzik@redhat.com>
Cc: <stable@vger.kernel.org>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com> | 2e83b79b2d6c78bf1b4aa227938a214dcbddc83f | 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_attr3_leaf_list_int | xfs_attr3_leaf_list_int( struct xfs_buf * bp , struct xfs_attr_list_context * context) | ['bp', 'context'] | xfs_attr3_leaf_list_int(
struct xfs_buf *bp,
struct xfs_attr_list_context *context)
{
struct attrlist_cursor_kern *cursor;
struct xfs_attr_leafblock *leaf;
struct xfs_attr3_icleaf_hdr ichdr;
struct xfs_attr_leaf_entry *entries;
struct xfs_attr_leaf_entry *entry;
int retval;
int i;
struct xfs_mount *mp = context->dp->i_mount;
trace_xfs_attr_list_leaf(context);
leaf = bp->b_addr;
xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &ichdr, leaf);
entries = xfs_attr3_leaf_entryp(leaf);
cursor = context->cursor;
cursor->initted = 1;
/*
* Re-find our place in the leaf block if this is a new syscall.
*/
if (context->resynch) {
entry = &entries[0];
for (i = 0; i < ichdr.count; entry++, i++) {
if (be32_to_cpu(entry->hashval) == cursor->hashval) {
if (cursor->offset == context->dupcnt) {
context->dupcnt = 0;
break;
}
context->dupcnt++;
} else if (be32_to_cpu(entry->hashval) >
cursor->hashval) {
context->dupcnt = 0;
break;
}
}
if (i == ichdr.count) {
trace_xfs_attr_list_notfound(context);
return 0;
}
} else {
entry = &entries[0];
i = 0;
}
context->resynch = 0;
/*
* We have found our place, start copying out the new attributes.
*/
retval = 0;
for (; i < ichdr.count; entry++, i++) {
if (be32_to_cpu(entry->hashval) != cursor->hashval) {
cursor->hashval = be32_to_cpu(entry->hashval);
cursor->offset = 0;
}
if (entry->flags & XFS_ATTR_INCOMPLETE)
continue; /* skip incomplete entries */
if (entry->flags & XFS_ATTR_LOCAL) {
xfs_attr_leaf_name_local_t *name_loc =
xfs_attr3_leaf_name_local(leaf, i);
retval = context->put_listent(context,
entry->flags,
name_loc->nameval,
(int)name_loc->namelen,
be16_to_cpu(name_loc->valuelen),
&name_loc->nameval[name_loc->namelen]);
if (retval)
return retval;
} else {
xfs_attr_leaf_name_remote_t *name_rmt =
xfs_attr3_leaf_name_remote(leaf, i);
int valuelen = be32_to_cpu(name_rmt->valuelen);
if (context->put_value) {
xfs_da_args_t args;
memset((char *)&args, 0, sizeof(args));
args.geo = context->dp->i_mount->m_attr_geo;
args.dp = context->dp;
args.whichfork = XFS_ATTR_FORK;
args.valuelen = valuelen;
args.rmtvaluelen = valuelen;
args.value = kmem_alloc(valuelen, KM_SLEEP | KM_NOFS);
args.rmtblkno = be32_to_cpu(name_rmt->valueblk);
args.rmtblkcnt = xfs_attr3_rmt_blocks(
args.dp->i_mount, valuelen);
retval = xfs_attr_rmtval_get(&args);
if (retval)
return retval;
retval = context->put_listent(context,
entry->flags,
name_rmt->name,
(int)name_rmt->namelen,
valuelen,
args.value);
kmem_free(args.value);
} else {
retval = context->put_listent(context,
entry->flags,
name_rmt->name,
(int)name_rmt->namelen,
valuelen,
NULL);
}
if (retval)
return retval;
}
if (context->seen_enough)
break;
cursor->offset++;
}
trace_xfs_attr_list_leaf_end(context);
return retval;
} | 608 | True | 1 |
|
CVE-2016-9685 | 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 | nan | [{'url': 'https://github.com/torvalds/linux/commit/2e83b79b2d6c78bf1b4aa227938a214dcbddc83f', 'name': 'https://github.com/torvalds/linux/commit/2e83b79b2d6c78bf1b4aa227938a214dcbddc83f', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396941', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1396941', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/11/30/1', 'name': '[oss-security] 20161130 cve-request: linux kernel - memory leak in xfs attribute mechanism.', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Patch']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.5.1', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.5.1', 'refsource': 'CONFIRM', 'tags': ['Release Notes']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2e83b79b2d6c78bf1b4aa227938a214dcbddc83f', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2e83b79b2d6c78bf1b4aa227938a214dcbddc83f', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/94593', 'name': '94593', 'refsource': 'BID', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:2669', 'name': 'RHSA-2017:2669', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:2077', 'name': 'RHSA-2017:2077', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:1842', 'name': 'RHSA-2017:1842', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-400'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.0', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Multiple memory leaks in error paths in fs/xfs/xfs_attr_list.c in the Linux kernel before 4.5.1 allow local users to cause a denial of service (memory consumption) via crafted XFS filesystem operations.'}] | 2018-01-05T02:31Z | 2016-12-28T07:59Z | 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 | Mateusz Guzik | 2016-03-02 09:51:09+11:00 | xfs: fix two memory leaks in xfs_attr_list.c error paths
This plugs 2 trivial leaks in xfs_attr_shortform_list and
xfs_attr3_leaf_list_int.
Signed-off-by: Mateusz Guzik <mguzik@redhat.com>
Cc: <stable@vger.kernel.org>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com> | 2e83b79b2d6c78bf1b4aa227938a214dcbddc83f | 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_list | xfs_attr_shortform_list( xfs_attr_list_context_t * context) | ['context'] | xfs_attr_shortform_list(xfs_attr_list_context_t *context)
{
attrlist_cursor_kern_t *cursor;
xfs_attr_sf_sort_t *sbuf, *sbp;
xfs_attr_shortform_t *sf;
xfs_attr_sf_entry_t *sfe;
xfs_inode_t *dp;
int sbsize, nsbuf, count, i;
int error;
ASSERT(context != NULL);
dp = context->dp;
ASSERT(dp != NULL);
ASSERT(dp->i_afp != NULL);
sf = (xfs_attr_shortform_t *)dp->i_afp->if_u1.if_data;
ASSERT(sf != NULL);
if (!sf->hdr.count)
return 0;
cursor = context->cursor;
ASSERT(cursor != NULL);
trace_xfs_attr_list_sf(context);
/*
* If the buffer is large enough and the cursor is at the start,
* do not bother with sorting since we will return everything in
* one buffer and another call using the cursor won't need to be
* made.
* Note the generous fudge factor of 16 overhead bytes per entry.
* If bufsize is zero then put_listent must be a search function
* and can just scan through what we have.
*/
if (context->bufsize == 0 ||
(XFS_ISRESET_CURSOR(cursor) &&
(dp->i_afp->if_bytes + sf->hdr.count * 16) < context->bufsize)) {
for (i = 0, sfe = &sf->list[0]; i < sf->hdr.count; i++) {
error = context->put_listent(context,
sfe->flags,
sfe->nameval,
(int)sfe->namelen,
(int)sfe->valuelen,
&sfe->nameval[sfe->namelen]);
/*
* Either search callback finished early or
* didn't fit it all in the buffer after all.
*/
if (context->seen_enough)
break;
if (error)
return error;
sfe = XFS_ATTR_SF_NEXTENTRY(sfe);
}
trace_xfs_attr_list_sf_all(context);
return 0;
}
/* do no more for a search callback */
if (context->bufsize == 0)
return 0;
/*
* It didn't all fit, so we have to sort everything on hashval.
*/
sbsize = sf->hdr.count * sizeof(*sbuf);
sbp = sbuf = kmem_alloc(sbsize, KM_SLEEP | KM_NOFS);
/*
* Scan the attribute list for the rest of the entries, storing
* the relevant info from only those that match into a buffer.
*/
nsbuf = 0;
for (i = 0, sfe = &sf->list[0]; i < sf->hdr.count; i++) {
if (unlikely(
((char *)sfe < (char *)sf) ||
((char *)sfe >= ((char *)sf + dp->i_afp->if_bytes)))) {
XFS_CORRUPTION_ERROR("xfs_attr_shortform_list",
XFS_ERRLEVEL_LOW,
context->dp->i_mount, sfe);
kmem_free(sbuf);
return -EFSCORRUPTED;
}
sbp->entno = i;
sbp->hash = xfs_da_hashname(sfe->nameval, sfe->namelen);
sbp->name = sfe->nameval;
sbp->namelen = sfe->namelen;
/* These are bytes, and both on-disk, don't endian-flip */
sbp->valuelen = sfe->valuelen;
sbp->flags = sfe->flags;
sfe = XFS_ATTR_SF_NEXTENTRY(sfe);
sbp++;
nsbuf++;
}
/*
* Sort the entries on hash then entno.
*/
xfs_sort(sbuf, nsbuf, sizeof(*sbuf), xfs_attr_shortform_compare);
/*
* Re-find our place IN THE SORTED LIST.
*/
count = 0;
cursor->initted = 1;
cursor->blkno = 0;
for (sbp = sbuf, i = 0; i < nsbuf; i++, sbp++) {
if (sbp->hash == cursor->hashval) {
if (cursor->offset == count) {
break;
}
count++;
} else if (sbp->hash > cursor->hashval) {
break;
}
}
if (i == nsbuf) {
kmem_free(sbuf);
return 0;
}
/*
* Loop putting entries into the user buffer.
*/
for ( ; i < nsbuf; i++, sbp++) {
if (cursor->hashval != sbp->hash) {
cursor->hashval = sbp->hash;
cursor->offset = 0;
}
error = context->put_listent(context,
sbp->flags,
sbp->name,
sbp->namelen,
sbp->valuelen,
&sbp->name[sbp->namelen]);
if (error)
return error;
if (context->seen_enough)
break;
cursor->offset++;
}
kmem_free(sbuf);
return 0;
} | 679 | True | 1 |
|
CVE-2016-3951 | 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:P/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | PHYSICAL | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 4.6 | MEDIUM | 0.9 | 3.6 | nan | [{'url': 'https://github.com/torvalds/linux/commit/4d06dd537f95683aba3651098ae288b7cbff8274', 'name': 'https://github.com/torvalds/linux/commit/4d06dd537f95683aba3651098ae288b7cbff8274', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/1666984c8625b3db19a9abc298931d35ab7bc64b', 'name': 'https://github.com/torvalds/linux/commit/1666984c8625b3db19a9abc298931d35ab7bc64b', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1666984c8625b3db19a9abc298931d35ab7bc64b', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1666984c8625b3db19a9abc298931d35ab7bc64b', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4d06dd537f95683aba3651098ae288b7cbff8274', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4d06dd537f95683aba3651098ae288b7cbff8274', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/04/06/4', 'name': '[oss-security] 20160406 Fwd: CVE Request: Linux: usbnet: memory corruption triggered by invalid USB descriptor', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://www.spinics.net/lists/netdev/msg367669.html', 'name': '[netdev] 20160304 Re: Possible double-free in the usbnet driver', 'refsource': 'MLIST', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1324782', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1324782', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.ubuntu.com/usn/USN-3002-1', 'name': 'USN-3002-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-3001-1', 'name': 'USN-3001-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-3004-1', 'name': 'USN-3004-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2989-1', 'name': 'USN-2989-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-3000-1', 'name': 'USN-3000-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2998-1', 'name': 'USN-2998-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-3003-1', 'name': 'USN-3003-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-3021-1', 'name': 'USN-3021-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-3021-2', 'name': 'USN-3021-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00056.html', 'name': 'SUSE-SU-2016:1696', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00054.html', 'name': 'SUSE-SU-2016:1690', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-07/msg00005.html', 'name': 'SUSE-SU-2016:1764', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/91028', 'name': '91028', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3607', 'name': 'DSA-3607', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-05/msg00060.html', 'name': 'openSUSE-SU-2016:1382', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1036763', 'name': '1036763', 'refsource': 'SECTRACK', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | MEDIUM | [{'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:15.10:*:*:*:*:*:*:*', '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:novell:suse_linux_enterprise_server:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_desktop:12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:suse:suse_linux_enterprise_software_development_kit:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_desktop:12:sp1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_live_patching:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_server:12.0:sp1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_module_for_public_cloud:12:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_workstation_extension:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_workstation_extension:12.0:sp1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_real_time_extension:12:sp1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:novell:suse_linux_enterprise_software_development_kit:12.0:sp1:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:4.5.0:rc7:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Double free vulnerability in drivers/net/usb/cdc_ncm.c in the Linux kernel before 4.5 allows physically proximate attackers to cause a denial of service (system crash) or possibly have unspecified other impact by inserting a USB device with an invalid USB descriptor.'}] | 2017-08-13T01:29Z | 2016-05-02T10:59Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Bjørn Mork | 2016-03-07 21:15:36+01:00 | cdc_ncm: do not call usbnet_link_change from cdc_ncm_bind
usbnet_link_change will call schedule_work and should be
avoided if bind is failing. Otherwise we will end up with
scheduled work referring to a netdev which has gone away.
Instead of making the call conditional, we can just defer
it to usbnet_probe, using the driver_info flag made for
this purpose.
Fixes: 8a34b0ae8778 ("usbnet: cdc_ncm: apply usbnet_link_change")
Reported-by: Andrey Konovalov <andreyknvl@gmail.com>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net> | 4d06dd537f95683aba3651098ae288b7cbff8274 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | cdc_ncm_bind | cdc_ncm_bind( struct usbnet * dev , struct usb_interface * intf) | ['dev', 'intf'] | static int cdc_ncm_bind(struct usbnet *dev, struct usb_interface *intf)
{
int ret;
/* MBIM backwards compatible function? */
if (cdc_ncm_select_altsetting(intf) != CDC_NCM_COMM_ALTSETTING_NCM)
return -ENODEV;
/* The NCM data altsetting is fixed, so we hard-coded it.
* Additionally, generic NCM devices are assumed to accept arbitrarily
* placed NDP.
*/
ret = cdc_ncm_bind_common(dev, intf, CDC_NCM_DATA_ALTSETTING_NCM, 0);
/*
* We should get an event when network connection is "connected" or
* "disconnected". Set network connection in "disconnected" state
* (carrier is OFF) during attach, so the IP network stack does not
* start IPv6 negotiation and more.
*/
usbnet_link_change(dev, 0, 0);
return ret;
} | 55 | True | 1 |
|
CVE-2016-2143 | False | False | False | True | AV:L/AC:M/Au:N/C:C/I:C/A:C | LOCAL | MEDIUM | NONE | COMPLETE | COMPLETE | COMPLETE | 6.9 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | nan | [{'url': 'https://github.com/torvalds/linux/commit/3446c13b268af86391d06611327006b059b8bab1', 'name': 'https://github.com/torvalds/linux/commit/3446c13b268af86391d06611327006b059b8bab1', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://security-tracker.debian.org/tracker/CVE-2016-2143', 'name': 'https://security-tracker.debian.org/tracker/CVE-2016-2143', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3446c13b268af86391d06611327006b059b8bab1', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3446c13b268af86391d06611327006b059b8bab1', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00052.html', 'name': 'SUSE-SU-2016:1672', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00054.html', 'name': 'SUSE-SU-2016:1690', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00059.html', 'name': 'SUSE-SU-2016:1707', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-07/msg00005.html', 'name': 'SUSE-SU-2016:1764', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-1539.html', 'name': 'RHSA-2016:1539', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3607', 'name': 'DSA-3607', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00019.html', 'name': 'SUSE-SU-2016:1019', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2766.html', 'name': 'RHSA-2016:2766', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:4.4:rc8:*:*:*:*:*:*', '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:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The fork implementation in the Linux kernel before 4.5 on s390 platforms mishandles the case of four page-table levels, which allows local users to cause a denial of service (system crash) or possibly have unspecified other impact via a crafted application, related to arch/s390/include/asm/mmu_context.h and arch/s390/include/asm/pgalloc.h.'}] | 2018-01-05T02:30Z | 2016-04-27T17:59Z | 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 | Martin Schwidefsky | 2016-02-15 14:46:49+01:00 | s390/mm: four page table levels vs. fork
The fork of a process with four page table levels is broken since
git commit 6252d702c5311ce9 "[S390] dynamic page tables."
All new mm contexts are created with three page table levels and
an asce limit of 4TB. If the parent has four levels dup_mmap will
add vmas to the new context which are outside of the asce limit.
The subsequent call to copy_page_range will walk the three level
page table structure of the new process with non-zero pgd and pud
indexes. This leads to memory clobbers as the pgd_index *and* the
pud_index is added to the mm->pgd pointer without a pgd_deref
in between.
The init_new_context() function is selecting the number of page
table levels for a new context. The function is used by mm_init()
which in turn is called by dup_mm() and mm_alloc(). These two are
used by fork() and exec(). The init_new_context() function can
distinguish the two cases by looking at mm->context.asce_limit,
for fork() the mm struct has been copied and the number of page
table levels may not change. For exec() the mm_alloc() function
set the new mm structure to zero, in this case a three-level page
table is created as the temporary stack space is located at
STACK_TOP_MAX = 4TB.
This fixes CVE-2016-2143.
Reported-by: Marcin Kościelnicki <koriakin@0x04.net>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> | 3446c13b268af86391d06611327006b059b8bab1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | arch_dup_mmap | arch_dup_mmap( struct mm_struct * oldmm , struct mm_struct * mm) | ['oldmm', 'mm'] | static inline void arch_dup_mmap(struct mm_struct *oldmm,
struct mm_struct *mm)
{
if (oldmm->context.asce_limit < mm->context.asce_limit)
crst_table_downgrade(mm, oldmm->context.asce_limit);
} | 39 | True | 1 |
|
CVE-2016-2143 | False | False | False | True | AV:L/AC:M/Au:N/C:C/I:C/A:C | LOCAL | MEDIUM | NONE | COMPLETE | COMPLETE | COMPLETE | 6.9 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | nan | [{'url': 'https://github.com/torvalds/linux/commit/3446c13b268af86391d06611327006b059b8bab1', 'name': 'https://github.com/torvalds/linux/commit/3446c13b268af86391d06611327006b059b8bab1', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://security-tracker.debian.org/tracker/CVE-2016-2143', 'name': 'https://security-tracker.debian.org/tracker/CVE-2016-2143', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3446c13b268af86391d06611327006b059b8bab1', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3446c13b268af86391d06611327006b059b8bab1', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00052.html', 'name': 'SUSE-SU-2016:1672', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00054.html', 'name': 'SUSE-SU-2016:1690', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00059.html', 'name': 'SUSE-SU-2016:1707', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-07/msg00005.html', 'name': 'SUSE-SU-2016:1764', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-1539.html', 'name': 'RHSA-2016:1539', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3607', 'name': 'DSA-3607', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00019.html', 'name': 'SUSE-SU-2016:1019', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2766.html', 'name': 'RHSA-2016:2766', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:4.4:rc8:*:*:*:*:*:*', '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:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The fork implementation in the Linux kernel before 4.5 on s390 platforms mishandles the case of four page-table levels, which allows local users to cause a denial of service (system crash) or possibly have unspecified other impact via a crafted application, related to arch/s390/include/asm/mmu_context.h and arch/s390/include/asm/pgalloc.h.'}] | 2018-01-05T02:30Z | 2016-04-27T17:59Z | 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 | Martin Schwidefsky | 2016-02-15 14:46:49+01:00 | s390/mm: four page table levels vs. fork
The fork of a process with four page table levels is broken since
git commit 6252d702c5311ce9 "[S390] dynamic page tables."
All new mm contexts are created with three page table levels and
an asce limit of 4TB. If the parent has four levels dup_mmap will
add vmas to the new context which are outside of the asce limit.
The subsequent call to copy_page_range will walk the three level
page table structure of the new process with non-zero pgd and pud
indexes. This leads to memory clobbers as the pgd_index *and* the
pud_index is added to the mm->pgd pointer without a pgd_deref
in between.
The init_new_context() function is selecting the number of page
table levels for a new context. The function is used by mm_init()
which in turn is called by dup_mm() and mm_alloc(). These two are
used by fork() and exec(). The init_new_context() function can
distinguish the two cases by looking at mm->context.asce_limit,
for fork() the mm struct has been copied and the number of page
table levels may not change. For exec() the mm_alloc() function
set the new mm structure to zero, in this case a three-level page
table is created as the temporary stack space is located at
STACK_TOP_MAX = 4TB.
This fixes CVE-2016-2143.
Reported-by: Marcin Kościelnicki <koriakin@0x04.net>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> | 3446c13b268af86391d06611327006b059b8bab1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | init_new_context | init_new_context( struct task_struct * tsk , struct mm_struct * mm) | ['tsk', 'mm'] | static inline int init_new_context(struct task_struct *tsk,
struct mm_struct *mm)
{
cpumask_clear(&mm->context.cpu_attach_mask);
atomic_set(&mm->context.attach_count, 0);
mm->context.flush_mm = 0;
mm->context.asce_bits = _ASCE_TABLE_LENGTH | _ASCE_USER_BITS;
mm->context.asce_bits |= _ASCE_TYPE_REGION3;
#ifdef CONFIG_PGSTE
mm->context.alloc_pgste = page_table_allocate_pgste;
mm->context.has_pgste = 0;
mm->context.use_skey = 0;
#endif
mm->context.asce_limit = STACK_TOP_MAX;
crst_table_init((unsigned long *) mm->pgd, pgd_entry_type(mm));
return 0;
} | 114 | True | 1 |
|
CVE-2016-2143 | False | False | False | True | AV:L/AC:M/Au:N/C:C/I:C/A:C | LOCAL | MEDIUM | NONE | COMPLETE | COMPLETE | COMPLETE | 6.9 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | nan | [{'url': 'https://github.com/torvalds/linux/commit/3446c13b268af86391d06611327006b059b8bab1', 'name': 'https://github.com/torvalds/linux/commit/3446c13b268af86391d06611327006b059b8bab1', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://security-tracker.debian.org/tracker/CVE-2016-2143', 'name': 'https://security-tracker.debian.org/tracker/CVE-2016-2143', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3446c13b268af86391d06611327006b059b8bab1', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3446c13b268af86391d06611327006b059b8bab1', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00052.html', 'name': 'SUSE-SU-2016:1672', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00054.html', 'name': 'SUSE-SU-2016:1690', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00059.html', 'name': 'SUSE-SU-2016:1707', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-07/msg00005.html', 'name': 'SUSE-SU-2016:1764', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-1539.html', 'name': 'RHSA-2016:1539', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3607', 'name': 'DSA-3607', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00019.html', 'name': 'SUSE-SU-2016:1019', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2766.html', 'name': 'RHSA-2016:2766', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:4.4:rc8:*:*:*:*:*:*', '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:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The fork implementation in the Linux kernel before 4.5 on s390 platforms mishandles the case of four page-table levels, which allows local users to cause a denial of service (system crash) or possibly have unspecified other impact via a crafted application, related to arch/s390/include/asm/mmu_context.h and arch/s390/include/asm/pgalloc.h.'}] | 2018-01-05T02:30Z | 2016-04-27T17:59Z | 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 | Martin Schwidefsky | 2016-02-15 14:46:49+01:00 | s390/mm: four page table levels vs. fork
The fork of a process with four page table levels is broken since
git commit 6252d702c5311ce9 "[S390] dynamic page tables."
All new mm contexts are created with three page table levels and
an asce limit of 4TB. If the parent has four levels dup_mmap will
add vmas to the new context which are outside of the asce limit.
The subsequent call to copy_page_range will walk the three level
page table structure of the new process with non-zero pgd and pud
indexes. This leads to memory clobbers as the pgd_index *and* the
pud_index is added to the mm->pgd pointer without a pgd_deref
in between.
The init_new_context() function is selecting the number of page
table levels for a new context. The function is used by mm_init()
which in turn is called by dup_mm() and mm_alloc(). These two are
used by fork() and exec(). The init_new_context() function can
distinguish the two cases by looking at mm->context.asce_limit,
for fork() the mm struct has been copied and the number of page
table levels may not change. For exec() the mm_alloc() function
set the new mm structure to zero, in this case a three-level page
table is created as the temporary stack space is located at
STACK_TOP_MAX = 4TB.
This fixes CVE-2016-2143.
Reported-by: Marcin Kościelnicki <koriakin@0x04.net>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> | 3446c13b268af86391d06611327006b059b8bab1 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | pgd_alloc | pgd_alloc( struct mm_struct * mm) | ['mm'] | static inline pgd_t *pgd_alloc(struct mm_struct *mm)
{
spin_lock_init(&mm->context.list_lock);
INIT_LIST_HEAD(&mm->context.pgtable_list);
INIT_LIST_HEAD(&mm->context.gmap_list);
return (pgd_t *) crst_table_alloc(mm);
} | 49 | True | 1 |
|
CVE-2016-3672 | 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 | nan | [{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1324749', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1324749', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'https://github.com/torvalds/linux/commit/8b8addf891de8a00e4d39fc32f93f7c5eb8feceb', 'name': 'https://github.com/torvalds/linux/commit/8b8addf891de8a00e4d39fc32f93f7c5eb8feceb', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8b8addf891de8a00e4d39fc32f93f7c5eb8feceb', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8b8addf891de8a00e4d39fc32f93f7c5eb8feceb', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2997-1', 'name': 'USN-2997-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2996-1', 'name': 'USN-2996-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-3000-1', 'name': 'USN-3000-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2998-1', 'name': 'USN-2998-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-3002-1', 'name': 'USN-3002-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-3003-1', 'name': 'USN-3003-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-3001-1', 'name': 'USN-3001-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-3004-1', 'name': 'USN-3004-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2989-1', 'name': 'USN-2989-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00054.html', 'name': 'SUSE-SU-2016:1690', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00000.html', 'name': 'SUSE-SU-2016:1937', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00044.html', 'name': 'openSUSE-SU-2016:1641', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00055.html', 'name': 'openSUSE-SU-2016:2184', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/85884', 'name': '85884', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3607', 'name': 'DSA-3607', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00044.html', 'name': 'SUSE-SU-2016:2105', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://hmarco.org/bugs/CVE-2016-3672-Unlimiting-the-stack-not-longer-dis', 'name': 'http://hmarco.org/bugs/CVE-2016-3672-Unlimiting-the-stack-not-longer-dis', 'refsource': 'MISC', 'tags': []}, {'url': 'http://seclists.org/fulldisclosure/2016/Apr/26', 'name': '20160406 CVE-2016-3672 - Unlimiting the stack not longer disables ASLR', 'refsource': 'FULLDISC', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2016-April/182524.html', 'name': 'FEDORA-2016-76706f51a7', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://www.exploit-db.com/exploits/39669/', 'name': '39669', 'refsource': 'EXPLOIT-DB', 'tags': []}, {'url': 'http://hmarco.org/bugs/CVE-2016-3672-Unlimiting-the-stack-not-longer-disables-ASLR.html', 'name': 'http://hmarco.org/bugs/CVE-2016-3672-Unlimiting-the-stack-not-longer-disables-ASLR.html', 'refsource': 'MISC', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1035506', 'name': '1035506', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1062', 'name': 'RHSA-2018:1062', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:0676', 'name': 'RHSA-2018:0676', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.securityfocus.com/archive/1/537996/100/0/threaded', 'name': '20160406 CVE-2016-3672 - Unlimiting the stack not longer disables ASLR', 'refsource': 'BUGTRAQ', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-254'}]}] | MEDIUM | [{'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:15.10:*:*:*:*:*:*:*', '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:novell:suse_linux_enterprise_module_for_public_cloud:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_server:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_live_patching:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_real_time_extension:12.0:sp1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_desktop:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_workstation_extension:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_software_development_kit:12.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.2', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The arch_pick_mmap_layout function in arch/x86/mm/mmap.c in the Linux kernel through 4.5.2 does not properly randomize the legacy base address, which makes it easier for local users to defeat the intended restrictions on the ADDR_NO_RANDOMIZE flag, and bypass the ASLR protection mechanism for a setuid or setgid program, by disabling stack-consumption resource limits.'}] | 2018-10-09T19:59Z | 2016-04-27T17:59Z | 7PK - Security Features | Software security is not security software. Here we're concerned with topics like authentication, access control, confidentiality, cryptography, and privilege management. | https://cwe.mitre.org/data/definitions/254.html | 1 | Hector Marco-Gisbert | 2016-03-10 20:51:00+01:00 | x86/mm/32: Enable full randomization on i386 and X86_32
Currently on i386 and on X86_64 when emulating X86_32 in legacy mode, only
the stack and the executable are randomized but not other mmapped files
(libraries, vDSO, etc.). This patch enables randomization for the
libraries, vDSO and mmap requests on i386 and in X86_32 in legacy mode.
By default on i386 there are 8 bits for the randomization of the libraries,
vDSO and mmaps which only uses 1MB of VA.
This patch preserves the original randomness, using 1MB of VA out of 3GB or
4GB. We think that 1MB out of 3GB is not a big cost for having the ASLR.
The first obvious security benefit is that all objects are randomized (not
only the stack and the executable) in legacy mode which highly increases
the ASLR effectiveness, otherwise the attackers may use these
non-randomized areas. But also sensitive setuid/setgid applications are
more secure because currently, attackers can disable the randomization of
these applications by setting the ulimit stack to "unlimited". This is a
very old and widely known trick to disable the ASLR in i386 which has been
allowed for too long.
Another trick used to disable the ASLR was to set the ADDR_NO_RANDOMIZE
personality flag, but fortunately this doesn't work on setuid/setgid
applications because there is security checks which clear Security-relevant
flags.
This patch always randomizes the mmap_legacy_base address, removing the
possibility to disable the ASLR by setting the stack to "unlimited".
Signed-off-by: Hector Marco-Gisbert <hecmargi@upv.es>
Acked-by: Ismael Ripoll Ripoll <iripoll@upv.es>
Acked-by: Kees Cook <keescook@chromium.org>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: akpm@linux-foundation.org
Cc: kees Cook <keescook@chromium.org>
Link: http://lkml.kernel.org/r/1457639460-5242-1-git-send-email-hecmargi@upv.es
Signed-off-by: Ingo Molnar <mingo@kernel.org> | 8b8addf891de8a00e4d39fc32f93f7c5eb8feceb | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | arch_pick_mmap_layout | arch_pick_mmap_layout( struct mm_struct * mm) | ['mm'] | void arch_pick_mmap_layout(struct mm_struct *mm)
{
unsigned long random_factor = 0UL;
if (current->flags & PF_RANDOMIZE)
random_factor = arch_mmap_rnd();
mm->mmap_legacy_base = mmap_legacy_base(random_factor);
if (mmap_is_legacy()) {
mm->mmap_base = mm->mmap_legacy_base;
mm->get_unmapped_area = arch_get_unmapped_area;
} else {
mm->mmap_base = mmap_base(random_factor);
mm->get_unmapped_area = arch_get_unmapped_area_topdown;
}
} | 78 | True | 1 |
||
CVE-2016-3672 | 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 | nan | [{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1324749', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1324749', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'https://github.com/torvalds/linux/commit/8b8addf891de8a00e4d39fc32f93f7c5eb8feceb', 'name': 'https://github.com/torvalds/linux/commit/8b8addf891de8a00e4d39fc32f93f7c5eb8feceb', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8b8addf891de8a00e4d39fc32f93f7c5eb8feceb', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8b8addf891de8a00e4d39fc32f93f7c5eb8feceb', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2997-1', 'name': 'USN-2997-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2996-1', 'name': 'USN-2996-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-3000-1', 'name': 'USN-3000-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2998-1', 'name': 'USN-2998-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-3002-1', 'name': 'USN-3002-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-3003-1', 'name': 'USN-3003-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-3001-1', 'name': 'USN-3001-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-3004-1', 'name': 'USN-3004-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2989-1', 'name': 'USN-2989-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00054.html', 'name': 'SUSE-SU-2016:1690', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00000.html', 'name': 'SUSE-SU-2016:1937', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00044.html', 'name': 'openSUSE-SU-2016:1641', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00055.html', 'name': 'openSUSE-SU-2016:2184', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/85884', 'name': '85884', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3607', 'name': 'DSA-3607', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00044.html', 'name': 'SUSE-SU-2016:2105', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://hmarco.org/bugs/CVE-2016-3672-Unlimiting-the-stack-not-longer-dis', 'name': 'http://hmarco.org/bugs/CVE-2016-3672-Unlimiting-the-stack-not-longer-dis', 'refsource': 'MISC', 'tags': []}, {'url': 'http://seclists.org/fulldisclosure/2016/Apr/26', 'name': '20160406 CVE-2016-3672 - Unlimiting the stack not longer disables ASLR', 'refsource': 'FULLDISC', 'tags': []}, {'url': 'http://lists.fedoraproject.org/pipermail/package-announce/2016-April/182524.html', 'name': 'FEDORA-2016-76706f51a7', 'refsource': 'FEDORA', 'tags': []}, {'url': 'https://www.exploit-db.com/exploits/39669/', 'name': '39669', 'refsource': 'EXPLOIT-DB', 'tags': []}, {'url': 'http://hmarco.org/bugs/CVE-2016-3672-Unlimiting-the-stack-not-longer-disables-ASLR.html', 'name': 'http://hmarco.org/bugs/CVE-2016-3672-Unlimiting-the-stack-not-longer-disables-ASLR.html', 'refsource': 'MISC', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1035506', 'name': '1035506', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:1062', 'name': 'RHSA-2018:1062', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2018:0676', 'name': 'RHSA-2018:0676', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://www.securityfocus.com/archive/1/537996/100/0/threaded', 'name': '20160406 CVE-2016-3672 - Unlimiting the stack not longer disables ASLR', 'refsource': 'BUGTRAQ', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-254'}]}] | MEDIUM | [{'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:15.10:*:*:*:*:*:*:*', '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:novell:suse_linux_enterprise_module_for_public_cloud:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_server:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_live_patching:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_real_time_extension:12.0:sp1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_desktop:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_workstation_extension:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_software_development_kit:12.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.2', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The arch_pick_mmap_layout function in arch/x86/mm/mmap.c in the Linux kernel through 4.5.2 does not properly randomize the legacy base address, which makes it easier for local users to defeat the intended restrictions on the ADDR_NO_RANDOMIZE flag, and bypass the ASLR protection mechanism for a setuid or setgid program, by disabling stack-consumption resource limits.'}] | 2018-10-09T19:59Z | 2016-04-27T17:59Z | 7PK - Security Features | Software security is not security software. Here we're concerned with topics like authentication, access control, confidentiality, cryptography, and privilege management. | https://cwe.mitre.org/data/definitions/254.html | 1 | Hector Marco-Gisbert | 2016-03-10 20:51:00+01:00 | x86/mm/32: Enable full randomization on i386 and X86_32
Currently on i386 and on X86_64 when emulating X86_32 in legacy mode, only
the stack and the executable are randomized but not other mmapped files
(libraries, vDSO, etc.). This patch enables randomization for the
libraries, vDSO and mmap requests on i386 and in X86_32 in legacy mode.
By default on i386 there are 8 bits for the randomization of the libraries,
vDSO and mmaps which only uses 1MB of VA.
This patch preserves the original randomness, using 1MB of VA out of 3GB or
4GB. We think that 1MB out of 3GB is not a big cost for having the ASLR.
The first obvious security benefit is that all objects are randomized (not
only the stack and the executable) in legacy mode which highly increases
the ASLR effectiveness, otherwise the attackers may use these
non-randomized areas. But also sensitive setuid/setgid applications are
more secure because currently, attackers can disable the randomization of
these applications by setting the ulimit stack to "unlimited". This is a
very old and widely known trick to disable the ASLR in i386 which has been
allowed for too long.
Another trick used to disable the ASLR was to set the ADDR_NO_RANDOMIZE
personality flag, but fortunately this doesn't work on setuid/setgid
applications because there is security checks which clear Security-relevant
flags.
This patch always randomizes the mmap_legacy_base address, removing the
possibility to disable the ASLR by setting the stack to "unlimited".
Signed-off-by: Hector Marco-Gisbert <hecmargi@upv.es>
Acked-by: Ismael Ripoll Ripoll <iripoll@upv.es>
Acked-by: Kees Cook <keescook@chromium.org>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: akpm@linux-foundation.org
Cc: kees Cook <keescook@chromium.org>
Link: http://lkml.kernel.org/r/1457639460-5242-1-git-send-email-hecmargi@upv.es
Signed-off-by: Ingo Molnar <mingo@kernel.org> | 8b8addf891de8a00e4d39fc32f93f7c5eb8feceb | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | mmap_legacy_base | mmap_legacy_base( unsigned long rnd) | ['rnd'] | static unsigned long mmap_legacy_base(unsigned long rnd)
{
if (mmap_is_ia32())
return TASK_UNMAPPED_BASE;
else
return TASK_UNMAPPED_BASE + rnd;
} | 23 | True | 1 |
||
CVE-2016-9120 | False | False | False | True | AV:N/AC:M/Au:N/C:C/I:C/A:C | NETWORK | MEDIUM | NONE | COMPLETE | COMPLETE | COMPLETE | 9.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | nan | [{'url': 'https://github.com/torvalds/linux/commit/9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'name': 'https://github.com/torvalds/linux/commit/9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://source.android.com/security/bulletin/2016-12-01.html', 'name': 'http://source.android.com/security/bulletin/2016-12-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/94669', 'name': '94669', 'refsource': 'BID', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-264'}, {'lang': 'en', 'value': 'CWE-416'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Race condition in the ion_ioctl function in drivers/staging/android/ion/ion.c in the Linux kernel before 4.6 allows local users to gain privileges or cause a denial of service (use-after-free) by calling ION_IOC_FREE on two CPUs at the same time.'}] | 2016-12-10T02:59Z | 2016-12-08T21:59Z | Permissions, Privileges, and Access Controls | Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control. | https://cwe.mitre.org/data/definitions/264.html | 1 | EunTaik Lee | 2016-02-24 04:38:06+00:00 | staging/android/ion : fix a race condition in the ion driver
There is a use-after-free problem in the ion driver.
This is caused by a race condition in the ion_ioctl()
function.
A handle has ref count of 1 and two tasks on different
cpus calls ION_IOC_FREE simultaneously.
cpu 0 cpu 1
-------------------------------------------------------
ion_handle_get_by_id()
(ref == 2)
ion_handle_get_by_id()
(ref == 3)
ion_free()
(ref == 2)
ion_handle_put()
(ref == 1)
ion_free()
(ref == 0 so ion_handle_destroy() is
called
and the handle is freed.)
ion_handle_put() is called and it
decreases the slub's next free pointer
The problem is detected as an unaligned access in the
spin lock functions since it uses load exclusive
instruction. In some cases it corrupts the slub's
free pointer which causes a mis-aligned access to the
next free pointer.(kmalloc returns a pointer like
ffffc0745b4580aa). And it causes lots of other
hard-to-debug problems.
This symptom is caused since the first member in the
ion_handle structure is the reference count and the
ion driver decrements the reference after it has been
freed.
To fix this problem client->lock mutex is extended
to protect all the codes that uses the handle.
Signed-off-by: Eun Taik Lee <eun.taik.lee@samsung.com>
Reviewed-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 9590232bb4f4cc824f3425a6e1349afbe6d6d2b7 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ion_free | ion_free( struct ion_client * client , struct ion_handle * handle) | ['client', 'handle'] | void ion_free(struct ion_client *client, struct ion_handle *handle)
{
bool valid_handle;
BUG_ON(client != handle->client);
mutex_lock(&client->lock);
valid_handle = ion_handle_validate(client, handle);
if (!valid_handle) {
WARN(1, "%s: invalid handle passed to free.\n", __func__);
mutex_unlock(&client->lock);
return;
}
mutex_unlock(&client->lock);
ion_handle_put(handle);
} | 82 | True | 1 |
||
CVE-2016-9120 | False | False | False | True | AV:N/AC:M/Au:N/C:C/I:C/A:C | NETWORK | MEDIUM | NONE | COMPLETE | COMPLETE | COMPLETE | 9.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | nan | [{'url': 'https://github.com/torvalds/linux/commit/9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'name': 'https://github.com/torvalds/linux/commit/9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://source.android.com/security/bulletin/2016-12-01.html', 'name': 'http://source.android.com/security/bulletin/2016-12-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/94669', 'name': '94669', 'refsource': 'BID', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-264'}, {'lang': 'en', 'value': 'CWE-416'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Race condition in the ion_ioctl function in drivers/staging/android/ion/ion.c in the Linux kernel before 4.6 allows local users to gain privileges or cause a denial of service (use-after-free) by calling ION_IOC_FREE on two CPUs at the same time.'}] | 2016-12-10T02:59Z | 2016-12-08T21:59Z | 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 | EunTaik Lee | 2016-02-24 04:38:06+00:00 | staging/android/ion : fix a race condition in the ion driver
There is a use-after-free problem in the ion driver.
This is caused by a race condition in the ion_ioctl()
function.
A handle has ref count of 1 and two tasks on different
cpus calls ION_IOC_FREE simultaneously.
cpu 0 cpu 1
-------------------------------------------------------
ion_handle_get_by_id()
(ref == 2)
ion_handle_get_by_id()
(ref == 3)
ion_free()
(ref == 2)
ion_handle_put()
(ref == 1)
ion_free()
(ref == 0 so ion_handle_destroy() is
called
and the handle is freed.)
ion_handle_put() is called and it
decreases the slub's next free pointer
The problem is detected as an unaligned access in the
spin lock functions since it uses load exclusive
instruction. In some cases it corrupts the slub's
free pointer which causes a mis-aligned access to the
next free pointer.(kmalloc returns a pointer like
ffffc0745b4580aa). And it causes lots of other
hard-to-debug problems.
This symptom is caused since the first member in the
ion_handle structure is the reference count and the
ion driver decrements the reference after it has been
freed.
To fix this problem client->lock mutex is extended
to protect all the codes that uses the handle.
Signed-off-by: Eun Taik Lee <eun.taik.lee@samsung.com>
Reviewed-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 9590232bb4f4cc824f3425a6e1349afbe6d6d2b7 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ion_free | ion_free( struct ion_client * client , struct ion_handle * handle) | ['client', 'handle'] | void ion_free(struct ion_client *client, struct ion_handle *handle)
{
bool valid_handle;
BUG_ON(client != handle->client);
mutex_lock(&client->lock);
valid_handle = ion_handle_validate(client, handle);
if (!valid_handle) {
WARN(1, "%s: invalid handle passed to free.\n", __func__);
mutex_unlock(&client->lock);
return;
}
mutex_unlock(&client->lock);
ion_handle_put(handle);
} | 82 | True | 1 |
|
CVE-2016-9120 | False | False | False | True | AV:N/AC:M/Au:N/C:C/I:C/A:C | NETWORK | MEDIUM | NONE | COMPLETE | COMPLETE | COMPLETE | 9.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | nan | [{'url': 'https://github.com/torvalds/linux/commit/9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'name': 'https://github.com/torvalds/linux/commit/9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://source.android.com/security/bulletin/2016-12-01.html', 'name': 'http://source.android.com/security/bulletin/2016-12-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/94669', 'name': '94669', 'refsource': 'BID', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-264'}, {'lang': 'en', 'value': 'CWE-416'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Race condition in the ion_ioctl function in drivers/staging/android/ion/ion.c in the Linux kernel before 4.6 allows local users to gain privileges or cause a denial of service (use-after-free) by calling ION_IOC_FREE on two CPUs at the same time.'}] | 2016-12-10T02:59Z | 2016-12-08T21:59Z | Permissions, Privileges, and Access Controls | Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control. | https://cwe.mitre.org/data/definitions/264.html | 1 | EunTaik Lee | 2016-02-24 04:38:06+00:00 | staging/android/ion : fix a race condition in the ion driver
There is a use-after-free problem in the ion driver.
This is caused by a race condition in the ion_ioctl()
function.
A handle has ref count of 1 and two tasks on different
cpus calls ION_IOC_FREE simultaneously.
cpu 0 cpu 1
-------------------------------------------------------
ion_handle_get_by_id()
(ref == 2)
ion_handle_get_by_id()
(ref == 3)
ion_free()
(ref == 2)
ion_handle_put()
(ref == 1)
ion_free()
(ref == 0 so ion_handle_destroy() is
called
and the handle is freed.)
ion_handle_put() is called and it
decreases the slub's next free pointer
The problem is detected as an unaligned access in the
spin lock functions since it uses load exclusive
instruction. In some cases it corrupts the slub's
free pointer which causes a mis-aligned access to the
next free pointer.(kmalloc returns a pointer like
ffffc0745b4580aa). And it causes lots of other
hard-to-debug problems.
This symptom is caused since the first member in the
ion_handle structure is the reference count and the
ion driver decrements the reference after it has been
freed.
To fix this problem client->lock mutex is extended
to protect all the codes that uses the handle.
Signed-off-by: Eun Taik Lee <eun.taik.lee@samsung.com>
Reviewed-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 9590232bb4f4cc824f3425a6e1349afbe6d6d2b7 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ion_handle_get_by_id | ion_handle_get_by_id( struct ion_client * client , int id) | ['client', 'id'] | static struct ion_handle *ion_handle_get_by_id(struct ion_client *client,
int id)
{
struct ion_handle *handle;
mutex_lock(&client->lock);
handle = idr_find(&client->idr, id);
if (handle)
ion_handle_get(handle);
mutex_unlock(&client->lock);
return handle ? handle : ERR_PTR(-EINVAL);
} | 65 | True | 1 |
||
CVE-2016-9120 | False | False | False | True | AV:N/AC:M/Au:N/C:C/I:C/A:C | NETWORK | MEDIUM | NONE | COMPLETE | COMPLETE | COMPLETE | 9.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | nan | [{'url': 'https://github.com/torvalds/linux/commit/9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'name': 'https://github.com/torvalds/linux/commit/9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://source.android.com/security/bulletin/2016-12-01.html', 'name': 'http://source.android.com/security/bulletin/2016-12-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/94669', 'name': '94669', 'refsource': 'BID', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-264'}, {'lang': 'en', 'value': 'CWE-416'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Race condition in the ion_ioctl function in drivers/staging/android/ion/ion.c in the Linux kernel before 4.6 allows local users to gain privileges or cause a denial of service (use-after-free) by calling ION_IOC_FREE on two CPUs at the same time.'}] | 2016-12-10T02:59Z | 2016-12-08T21:59Z | 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 | EunTaik Lee | 2016-02-24 04:38:06+00:00 | staging/android/ion : fix a race condition in the ion driver
There is a use-after-free problem in the ion driver.
This is caused by a race condition in the ion_ioctl()
function.
A handle has ref count of 1 and two tasks on different
cpus calls ION_IOC_FREE simultaneously.
cpu 0 cpu 1
-------------------------------------------------------
ion_handle_get_by_id()
(ref == 2)
ion_handle_get_by_id()
(ref == 3)
ion_free()
(ref == 2)
ion_handle_put()
(ref == 1)
ion_free()
(ref == 0 so ion_handle_destroy() is
called
and the handle is freed.)
ion_handle_put() is called and it
decreases the slub's next free pointer
The problem is detected as an unaligned access in the
spin lock functions since it uses load exclusive
instruction. In some cases it corrupts the slub's
free pointer which causes a mis-aligned access to the
next free pointer.(kmalloc returns a pointer like
ffffc0745b4580aa). And it causes lots of other
hard-to-debug problems.
This symptom is caused since the first member in the
ion_handle structure is the reference count and the
ion driver decrements the reference after it has been
freed.
To fix this problem client->lock mutex is extended
to protect all the codes that uses the handle.
Signed-off-by: Eun Taik Lee <eun.taik.lee@samsung.com>
Reviewed-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 9590232bb4f4cc824f3425a6e1349afbe6d6d2b7 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ion_handle_get_by_id | ion_handle_get_by_id( struct ion_client * client , int id) | ['client', 'id'] | static struct ion_handle *ion_handle_get_by_id(struct ion_client *client,
int id)
{
struct ion_handle *handle;
mutex_lock(&client->lock);
handle = idr_find(&client->idr, id);
if (handle)
ion_handle_get(handle);
mutex_unlock(&client->lock);
return handle ? handle : ERR_PTR(-EINVAL);
} | 65 | True | 1 |
|
CVE-2016-9120 | False | False | False | True | AV:N/AC:M/Au:N/C:C/I:C/A:C | NETWORK | MEDIUM | NONE | COMPLETE | COMPLETE | COMPLETE | 9.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | nan | [{'url': 'https://github.com/torvalds/linux/commit/9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'name': 'https://github.com/torvalds/linux/commit/9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://source.android.com/security/bulletin/2016-12-01.html', 'name': 'http://source.android.com/security/bulletin/2016-12-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/94669', 'name': '94669', 'refsource': 'BID', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-264'}, {'lang': 'en', 'value': 'CWE-416'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Race condition in the ion_ioctl function in drivers/staging/android/ion/ion.c in the Linux kernel before 4.6 allows local users to gain privileges or cause a denial of service (use-after-free) by calling ION_IOC_FREE on two CPUs at the same time.'}] | 2016-12-10T02:59Z | 2016-12-08T21:59Z | Permissions, Privileges, and Access Controls | Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control. | https://cwe.mitre.org/data/definitions/264.html | 1 | EunTaik Lee | 2016-02-24 04:38:06+00:00 | staging/android/ion : fix a race condition in the ion driver
There is a use-after-free problem in the ion driver.
This is caused by a race condition in the ion_ioctl()
function.
A handle has ref count of 1 and two tasks on different
cpus calls ION_IOC_FREE simultaneously.
cpu 0 cpu 1
-------------------------------------------------------
ion_handle_get_by_id()
(ref == 2)
ion_handle_get_by_id()
(ref == 3)
ion_free()
(ref == 2)
ion_handle_put()
(ref == 1)
ion_free()
(ref == 0 so ion_handle_destroy() is
called
and the handle is freed.)
ion_handle_put() is called and it
decreases the slub's next free pointer
The problem is detected as an unaligned access in the
spin lock functions since it uses load exclusive
instruction. In some cases it corrupts the slub's
free pointer which causes a mis-aligned access to the
next free pointer.(kmalloc returns a pointer like
ffffc0745b4580aa). And it causes lots of other
hard-to-debug problems.
This symptom is caused since the first member in the
ion_handle structure is the reference count and the
ion driver decrements the reference after it has been
freed.
To fix this problem client->lock mutex is extended
to protect all the codes that uses the handle.
Signed-off-by: Eun Taik Lee <eun.taik.lee@samsung.com>
Reviewed-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 9590232bb4f4cc824f3425a6e1349afbe6d6d2b7 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ion_handle_put | ion_handle_put( struct ion_handle * handle) | ['handle'] | static int ion_handle_put(struct ion_handle *handle)
{
struct ion_client *client = handle->client;
int ret;
mutex_lock(&client->lock);
ret = kref_put(&handle->ref, ion_handle_destroy);
mutex_unlock(&client->lock);
return ret;
} | 52 | True | 1 |
||
CVE-2016-9120 | False | False | False | True | AV:N/AC:M/Au:N/C:C/I:C/A:C | NETWORK | MEDIUM | NONE | COMPLETE | COMPLETE | COMPLETE | 9.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | nan | [{'url': 'https://github.com/torvalds/linux/commit/9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'name': 'https://github.com/torvalds/linux/commit/9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://source.android.com/security/bulletin/2016-12-01.html', 'name': 'http://source.android.com/security/bulletin/2016-12-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/94669', 'name': '94669', 'refsource': 'BID', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-264'}, {'lang': 'en', 'value': 'CWE-416'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Race condition in the ion_ioctl function in drivers/staging/android/ion/ion.c in the Linux kernel before 4.6 allows local users to gain privileges or cause a denial of service (use-after-free) by calling ION_IOC_FREE on two CPUs at the same time.'}] | 2016-12-10T02:59Z | 2016-12-08T21:59Z | 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 | EunTaik Lee | 2016-02-24 04:38:06+00:00 | staging/android/ion : fix a race condition in the ion driver
There is a use-after-free problem in the ion driver.
This is caused by a race condition in the ion_ioctl()
function.
A handle has ref count of 1 and two tasks on different
cpus calls ION_IOC_FREE simultaneously.
cpu 0 cpu 1
-------------------------------------------------------
ion_handle_get_by_id()
(ref == 2)
ion_handle_get_by_id()
(ref == 3)
ion_free()
(ref == 2)
ion_handle_put()
(ref == 1)
ion_free()
(ref == 0 so ion_handle_destroy() is
called
and the handle is freed.)
ion_handle_put() is called and it
decreases the slub's next free pointer
The problem is detected as an unaligned access in the
spin lock functions since it uses load exclusive
instruction. In some cases it corrupts the slub's
free pointer which causes a mis-aligned access to the
next free pointer.(kmalloc returns a pointer like
ffffc0745b4580aa). And it causes lots of other
hard-to-debug problems.
This symptom is caused since the first member in the
ion_handle structure is the reference count and the
ion driver decrements the reference after it has been
freed.
To fix this problem client->lock mutex is extended
to protect all the codes that uses the handle.
Signed-off-by: Eun Taik Lee <eun.taik.lee@samsung.com>
Reviewed-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 9590232bb4f4cc824f3425a6e1349afbe6d6d2b7 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ion_handle_put | ion_handle_put( struct ion_handle * handle) | ['handle'] | static int ion_handle_put(struct ion_handle *handle)
{
struct ion_client *client = handle->client;
int ret;
mutex_lock(&client->lock);
ret = kref_put(&handle->ref, ion_handle_destroy);
mutex_unlock(&client->lock);
return ret;
} | 52 | True | 1 |
|
CVE-2016-9120 | False | False | False | True | AV:N/AC:M/Au:N/C:C/I:C/A:C | NETWORK | MEDIUM | NONE | COMPLETE | COMPLETE | COMPLETE | 9.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | nan | [{'url': 'https://github.com/torvalds/linux/commit/9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'name': 'https://github.com/torvalds/linux/commit/9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://source.android.com/security/bulletin/2016-12-01.html', 'name': 'http://source.android.com/security/bulletin/2016-12-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/94669', 'name': '94669', 'refsource': 'BID', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-264'}, {'lang': 'en', 'value': 'CWE-416'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Race condition in the ion_ioctl function in drivers/staging/android/ion/ion.c in the Linux kernel before 4.6 allows local users to gain privileges or cause a denial of service (use-after-free) by calling ION_IOC_FREE on two CPUs at the same time.'}] | 2016-12-10T02:59Z | 2016-12-08T21:59Z | Permissions, Privileges, and Access Controls | Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control. | https://cwe.mitre.org/data/definitions/264.html | 1 | EunTaik Lee | 2016-02-24 04:38:06+00:00 | staging/android/ion : fix a race condition in the ion driver
There is a use-after-free problem in the ion driver.
This is caused by a race condition in the ion_ioctl()
function.
A handle has ref count of 1 and two tasks on different
cpus calls ION_IOC_FREE simultaneously.
cpu 0 cpu 1
-------------------------------------------------------
ion_handle_get_by_id()
(ref == 2)
ion_handle_get_by_id()
(ref == 3)
ion_free()
(ref == 2)
ion_handle_put()
(ref == 1)
ion_free()
(ref == 0 so ion_handle_destroy() is
called
and the handle is freed.)
ion_handle_put() is called and it
decreases the slub's next free pointer
The problem is detected as an unaligned access in the
spin lock functions since it uses load exclusive
instruction. In some cases it corrupts the slub's
free pointer which causes a mis-aligned access to the
next free pointer.(kmalloc returns a pointer like
ffffc0745b4580aa). And it causes lots of other
hard-to-debug problems.
This symptom is caused since the first member in the
ion_handle structure is the reference count and the
ion driver decrements the reference after it has been
freed.
To fix this problem client->lock mutex is extended
to protect all the codes that uses the handle.
Signed-off-by: Eun Taik Lee <eun.taik.lee@samsung.com>
Reviewed-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 9590232bb4f4cc824f3425a6e1349afbe6d6d2b7 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ion_ioctl | ion_ioctl( struct file * filp , unsigned int cmd , unsigned long arg) | ['filp', 'cmd', 'arg'] | static long ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
struct ion_client *client = filp->private_data;
struct ion_device *dev = client->dev;
struct ion_handle *cleanup_handle = NULL;
int ret = 0;
unsigned int dir;
union {
struct ion_fd_data fd;
struct ion_allocation_data allocation;
struct ion_handle_data handle;
struct ion_custom_data custom;
} data;
dir = ion_ioctl_dir(cmd);
if (_IOC_SIZE(cmd) > sizeof(data))
return -EINVAL;
if (dir & _IOC_WRITE)
if (copy_from_user(&data, (void __user *)arg, _IOC_SIZE(cmd)))
return -EFAULT;
switch (cmd) {
case ION_IOC_ALLOC:
{
struct ion_handle *handle;
handle = ion_alloc(client, data.allocation.len,
data.allocation.align,
data.allocation.heap_id_mask,
data.allocation.flags);
if (IS_ERR(handle))
return PTR_ERR(handle);
data.allocation.handle = handle->id;
cleanup_handle = handle;
break;
}
case ION_IOC_FREE:
{
struct ion_handle *handle;
handle = ion_handle_get_by_id(client, data.handle.handle);
if (IS_ERR(handle))
return PTR_ERR(handle);
ion_free(client, handle);
ion_handle_put(handle);
break;
}
case ION_IOC_SHARE:
case ION_IOC_MAP:
{
struct ion_handle *handle;
handle = ion_handle_get_by_id(client, data.handle.handle);
if (IS_ERR(handle))
return PTR_ERR(handle);
data.fd.fd = ion_share_dma_buf_fd(client, handle);
ion_handle_put(handle);
if (data.fd.fd < 0)
ret = data.fd.fd;
break;
}
case ION_IOC_IMPORT:
{
struct ion_handle *handle;
handle = ion_import_dma_buf_fd(client, data.fd.fd);
if (IS_ERR(handle))
ret = PTR_ERR(handle);
else
data.handle.handle = handle->id;
break;
}
case ION_IOC_SYNC:
{
ret = ion_sync_for_device(client, data.fd.fd);
break;
}
case ION_IOC_CUSTOM:
{
if (!dev->custom_ioctl)
return -ENOTTY;
ret = dev->custom_ioctl(client, data.custom.cmd,
data.custom.arg);
break;
}
default:
return -ENOTTY;
}
if (dir & _IOC_READ) {
if (copy_to_user((void __user *)arg, &data, _IOC_SIZE(cmd))) {
if (cleanup_handle)
ion_free(client, cleanup_handle);
return -EFAULT;
}
}
return ret;
} | 491 | True | 1 |
||
CVE-2016-9120 | False | False | False | True | AV:N/AC:M/Au:N/C:C/I:C/A:C | NETWORK | MEDIUM | NONE | COMPLETE | COMPLETE | COMPLETE | 9.3 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | LOCAL | LOW | NONE | REQUIRED | UNCHANGED | HIGH | HIGH | HIGH | 7.8 | HIGH | 1.8 | 5.9 | nan | [{'url': 'https://github.com/torvalds/linux/commit/9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'name': 'https://github.com/torvalds/linux/commit/9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Third Party Advisory']}, {'url': 'http://source.android.com/security/bulletin/2016-12-01.html', 'name': 'http://source.android.com/security/bulletin/2016-12-01.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9590232bb4f4cc824f3425a6e1349afbe6d6d2b7', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch', 'Vendor Advisory']}, {'url': 'http://www.securityfocus.com/bid/94669', 'name': '94669', 'refsource': 'BID', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-264'}, {'lang': 'en', 'value': 'CWE-416'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Race condition in the ion_ioctl function in drivers/staging/android/ion/ion.c in the Linux kernel before 4.6 allows local users to gain privileges or cause a denial of service (use-after-free) by calling ION_IOC_FREE on two CPUs at the same time.'}] | 2016-12-10T02:59Z | 2016-12-08T21:59Z | 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 | EunTaik Lee | 2016-02-24 04:38:06+00:00 | staging/android/ion : fix a race condition in the ion driver
There is a use-after-free problem in the ion driver.
This is caused by a race condition in the ion_ioctl()
function.
A handle has ref count of 1 and two tasks on different
cpus calls ION_IOC_FREE simultaneously.
cpu 0 cpu 1
-------------------------------------------------------
ion_handle_get_by_id()
(ref == 2)
ion_handle_get_by_id()
(ref == 3)
ion_free()
(ref == 2)
ion_handle_put()
(ref == 1)
ion_free()
(ref == 0 so ion_handle_destroy() is
called
and the handle is freed.)
ion_handle_put() is called and it
decreases the slub's next free pointer
The problem is detected as an unaligned access in the
spin lock functions since it uses load exclusive
instruction. In some cases it corrupts the slub's
free pointer which causes a mis-aligned access to the
next free pointer.(kmalloc returns a pointer like
ffffc0745b4580aa). And it causes lots of other
hard-to-debug problems.
This symptom is caused since the first member in the
ion_handle structure is the reference count and the
ion driver decrements the reference after it has been
freed.
To fix this problem client->lock mutex is extended
to protect all the codes that uses the handle.
Signed-off-by: Eun Taik Lee <eun.taik.lee@samsung.com>
Reviewed-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 9590232bb4f4cc824f3425a6e1349afbe6d6d2b7 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ion_ioctl | ion_ioctl( struct file * filp , unsigned int cmd , unsigned long arg) | ['filp', 'cmd', 'arg'] | static long ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
struct ion_client *client = filp->private_data;
struct ion_device *dev = client->dev;
struct ion_handle *cleanup_handle = NULL;
int ret = 0;
unsigned int dir;
union {
struct ion_fd_data fd;
struct ion_allocation_data allocation;
struct ion_handle_data handle;
struct ion_custom_data custom;
} data;
dir = ion_ioctl_dir(cmd);
if (_IOC_SIZE(cmd) > sizeof(data))
return -EINVAL;
if (dir & _IOC_WRITE)
if (copy_from_user(&data, (void __user *)arg, _IOC_SIZE(cmd)))
return -EFAULT;
switch (cmd) {
case ION_IOC_ALLOC:
{
struct ion_handle *handle;
handle = ion_alloc(client, data.allocation.len,
data.allocation.align,
data.allocation.heap_id_mask,
data.allocation.flags);
if (IS_ERR(handle))
return PTR_ERR(handle);
data.allocation.handle = handle->id;
cleanup_handle = handle;
break;
}
case ION_IOC_FREE:
{
struct ion_handle *handle;
handle = ion_handle_get_by_id(client, data.handle.handle);
if (IS_ERR(handle))
return PTR_ERR(handle);
ion_free(client, handle);
ion_handle_put(handle);
break;
}
case ION_IOC_SHARE:
case ION_IOC_MAP:
{
struct ion_handle *handle;
handle = ion_handle_get_by_id(client, data.handle.handle);
if (IS_ERR(handle))
return PTR_ERR(handle);
data.fd.fd = ion_share_dma_buf_fd(client, handle);
ion_handle_put(handle);
if (data.fd.fd < 0)
ret = data.fd.fd;
break;
}
case ION_IOC_IMPORT:
{
struct ion_handle *handle;
handle = ion_import_dma_buf_fd(client, data.fd.fd);
if (IS_ERR(handle))
ret = PTR_ERR(handle);
else
data.handle.handle = handle->id;
break;
}
case ION_IOC_SYNC:
{
ret = ion_sync_for_device(client, data.fd.fd);
break;
}
case ION_IOC_CUSTOM:
{
if (!dev->custom_ioctl)
return -ENOTTY;
ret = dev->custom_ioctl(client, data.custom.cmd,
data.custom.arg);
break;
}
default:
return -ENOTTY;
}
if (dir & _IOC_READ) {
if (copy_to_user((void __user *)arg, &data, _IOC_SIZE(cmd))) {
if (cleanup_handle)
ion_free(client, cleanup_handle);
return -EFAULT;
}
}
return ret;
} | 491 | True | 1 |
|
CVE-2016-3156 | 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 | nan | [{'url': 'http://www.openwall.com/lists/oss-security/2016/03/15/3', 'name': "[oss-security] 20160315 CVE request: ipv4: Don't do expensive useless work during inetdev destroy", 'refsource': 'MLIST', 'tags': []}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=fbd40ea0180a2d328c5adc61414dc8bab9335ce2', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=fbd40ea0180a2d328c5adc61414dc8bab9335ce2', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://github.com/torvalds/linux/commit/fbd40ea0180a2d328c5adc61414dc8bab9335ce2', 'name': 'https://github.com/torvalds/linux/commit/fbd40ea0180a2d328c5adc61414dc8bab9335ce2', 'refsource': 'CONFIRM', 'tags': ['Patch', 'Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1318172', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1318172', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.ubuntu.com/usn/USN-2997-1', 'name': 'USN-2997-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2996-1', 'name': 'USN-2996-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00052.html', 'name': 'SUSE-SU-2016:1672', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00054.html', 'name': 'SUSE-SU-2016:1690', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00059.html', 'name': 'SUSE-SU-2016:1707', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-07/msg00005.html', 'name': 'SUSE-SU-2016:1764', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinoct2016-3090547.html', 'name': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinoct2016-3090547.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3607', 'name': 'DSA-3607', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/84428', 'name': '84428', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-05/msg00060.html', 'name': 'openSUSE-SU-2016:1382', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2968-1', 'name': 'USN-2968-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2969-1', 'name': 'USN-2969-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2971-1', 'name': 'USN-2971-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2971-2', 'name': 'USN-2971-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2970-1', 'name': 'USN-2970-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2971-3', 'name': 'USN-2971-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2968-2', 'name': 'USN-2968-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00019.html', 'name': 'SUSE-SU-2016:1019', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2584.html', 'name': 'RHSA-2016:2584', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2574.html', 'name': 'RHSA-2016:2574', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-399'}]}] | LOW | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_module_for_public_cloud:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_server:11.0:sp4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_server:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_server:11.0:extra:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_live_patching:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_real_time_extension:11.0:sp4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_real_time_extension:12.0:sp1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_desktop:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_workstation_extension:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_software_development_kit:11.0:sp4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_debuginfo:11.0:sp4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_software_development_kit:12.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.1', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The IPv4 implementation in the Linux kernel before 4.5.2 mishandles destruction of device objects, which allows guest OS users to cause a denial of service (host OS networking outage) by arranging for a large number of IP addresses.'}] | 2018-01-05T02:30Z | 2016-04-27T17:59Z | Resource Management Errors | Weaknesses in this category are related to improper management of system resources. | https://cwe.mitre.org/data/definitions/399.html | 1 | David S. Miller | 2016-03-13 23:28:00-04:00 | ipv4: Don't do expensive useless work during inetdev destroy.
When an inetdev is destroyed, every address assigned to the interface
is removed. And in this scenerio we do two pointless things which can
be very expensive if the number of assigned interfaces is large:
1) Address promotion. We are deleting all addresses, so there is no
point in doing this.
2) A full nf conntrack table purge for every address. We only need to
do this once, as is already caught by the existing
masq_dev_notifier so masq_inet_event() can skip this.
Reported-by: Solar Designer <solar@openwall.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tested-by: Cyrill Gorcunov <gorcunov@openvz.org> | fbd40ea0180a2d328c5adc61414dc8bab9335ce2 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | masq_inet_event | masq_inet_event( struct notifier_block * this , unsigned long event , void * ptr) | ['this', 'event', 'ptr'] | static int masq_inet_event(struct notifier_block *this,
unsigned long event,
void *ptr)
{
struct net_device *dev = ((struct in_ifaddr *)ptr)->ifa_dev->dev;
struct netdev_notifier_info info;
netdev_notifier_info_init(&info, dev);
return masq_device_event(this, event, &info);
} | 58 | True | 1 |
||
CVE-2016-7117 | False | False | False | False | AV:N/AC:L/Au:N/C:C/I:C/A:C | NETWORK | LOW | NONE | COMPLETE | COMPLETE | COMPLETE | 10.0 | CVSS:3.0/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 | nan | [{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34b88a68f26a75e4fded796f1a49c40f82234b7d', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34b88a68f26a75e4fded796f1a49c40f82234b7d', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1382268', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1382268', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'https://bugzilla.novell.com/show_bug.cgi?id=1003077', 'name': 'https://bugzilla.novell.com/show_bug.cgi?id=1003077', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'https://github.com/torvalds/linux/commit/34b88a68f26a75e4fded796f1a49c40f82234b7d', 'name': 'https://github.com/torvalds/linux/commit/34b88a68f26a75e4fded796f1a49c40f82234b7d', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'https://people.canonical.com/~ubuntu-security/cve/2016/CVE-2016-7117.html', 'name': 'https://people.canonical.com/~ubuntu-security/cve/2016/CVE-2016-7117.html', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://source.android.com/security/bulletin/2016-10-01.html', 'name': 'http://source.android.com/security/bulletin/2016-10-01.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.5.2', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.5.2', 'refsource': 'CONFIRM', 'tags': ['Release Notes']}, {'url': 'https://security-tracker.debian.org/tracker/CVE-2016-7117', 'name': 'https://security-tracker.debian.org/tracker/CVE-2016-7117', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'http://www.securityfocus.com/bid/93304', 'name': '93304', 'refsource': 'BID', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2962.html', 'name': 'RHSA-2016:2962', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2017-0270.html', 'name': 'RHSA-2017:0270', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2017-0217.html', 'name': 'RHSA-2017:0217', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2017-0216.html', 'name': 'RHSA-2017:0216', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2017-0215.html', 'name': 'RHSA-2017:0215', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2017-0196.html', 'name': 'RHSA-2017:0196', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2017-0113.html', 'name': 'RHSA-2017:0113', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2017-0091.html', 'name': 'RHSA-2017:0091', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2017-0086.html', 'name': 'RHSA-2017:0086', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2017-0065.html', 'name': 'RHSA-2017:0065', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2017-0036.html', 'name': 'RHSA-2017:0036', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2017-0031.html', 'name': 'RHSA-2017:0031', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-19'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.1', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Use-after-free vulnerability in the __sys_recvmmsg function in net/socket.c in the Linux kernel before 4.5.2 allows remote attackers to execute arbitrary code via vectors involving a recvmmsg system call that is mishandled during error processing.'}] | 2018-01-05T02:31Z | 2016-10-10T11:00Z | Data Processing Errors | Weaknesses in this category are typically found in functionality that processes data. Data processing is the manipulation of input to retrieve or save information. | https://cwe.mitre.org/data/definitions/19.html | 1 | Arnaldo Carvalho de Melo | 2016-03-14 09:56:35-03:00 | net: Fix use after free in the recvmmsg exit path
The syzkaller fuzzer hit the following use-after-free:
Call Trace:
[<ffffffff8175ea0e>] __asan_report_load8_noabort+0x3e/0x40 mm/kasan/report.c:295
[<ffffffff851cc31a>] __sys_recvmmsg+0x6fa/0x7f0 net/socket.c:2261
[< inline >] SYSC_recvmmsg net/socket.c:2281
[<ffffffff851cc57f>] SyS_recvmmsg+0x16f/0x180 net/socket.c:2270
[<ffffffff86332bb6>] entry_SYSCALL_64_fastpath+0x16/0x7a
arch/x86/entry/entry_64.S:185
And, as Dmitry rightly assessed, that is because we can drop the
reference and then touch it when the underlying recvmsg calls return
some packets and then hit an error, which will make recvmmsg to set
sock->sk->sk_err, oops, fix it.
Reported-and-Tested-by: Dmitry Vyukov <dvyukov@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Kostya Serebryany <kcc@google.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Fixes: a2e2725541fa ("net: Introduce recvmmsg socket syscall")
http://lkml.kernel.org/r/20160122211644.GC2470@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | 34b88a68f26a75e4fded796f1a49c40f82234b7d | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | __sys_recvmmsg | __sys_recvmmsg( int fd , struct mmsghdr __user * mmsg , unsigned int vlen , unsigned int flags , struct timespec * timeout) | ['fd', 'mmsg', 'vlen', 'flags', 'timeout'] | int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,
unsigned int flags, struct timespec *timeout)
{
int fput_needed, err, datagrams;
struct socket *sock;
struct mmsghdr __user *entry;
struct compat_mmsghdr __user *compat_entry;
struct msghdr msg_sys;
struct timespec end_time;
if (timeout &&
poll_select_set_timeout(&end_time, timeout->tv_sec,
timeout->tv_nsec))
return -EINVAL;
datagrams = 0;
sock = sockfd_lookup_light(fd, &err, &fput_needed);
if (!sock)
return err;
err = sock_error(sock->sk);
if (err)
goto out_put;
entry = mmsg;
compat_entry = (struct compat_mmsghdr __user *)mmsg;
while (datagrams < vlen) {
/*
* No need to ask LSM for more than the first datagram.
*/
if (MSG_CMSG_COMPAT & flags) {
err = ___sys_recvmsg(sock, (struct user_msghdr __user *)compat_entry,
&msg_sys, flags & ~MSG_WAITFORONE,
datagrams);
if (err < 0)
break;
err = __put_user(err, &compat_entry->msg_len);
++compat_entry;
} else {
err = ___sys_recvmsg(sock,
(struct user_msghdr __user *)entry,
&msg_sys, flags & ~MSG_WAITFORONE,
datagrams);
if (err < 0)
break;
err = put_user(err, &entry->msg_len);
++entry;
}
if (err)
break;
++datagrams;
/* MSG_WAITFORONE turns on MSG_DONTWAIT after one packet */
if (flags & MSG_WAITFORONE)
flags |= MSG_DONTWAIT;
if (timeout) {
ktime_get_ts(timeout);
*timeout = timespec_sub(end_time, *timeout);
if (timeout->tv_sec < 0) {
timeout->tv_sec = timeout->tv_nsec = 0;
break;
}
/* Timeout, return less than vlen datagrams */
if (timeout->tv_nsec == 0 && timeout->tv_sec == 0)
break;
}
/* Out of band data, return right away */
if (msg_sys.msg_flags & MSG_OOB)
break;
cond_resched();
}
out_put:
fput_light(sock->file, fput_needed);
if (err == 0)
return datagrams;
if (datagrams != 0) {
/*
* We may return less entries than requested (vlen) if the
* sock is non block and there aren't enough datagrams...
*/
if (err != -EAGAIN) {
/*
* ... or if recvmsg returns an error after we
* received some datagrams, where we record the
* error to return on the next call or if the
* app asks about it using getsockopt(SO_ERROR).
*/
sock->sk->sk_err = -err;
}
return datagrams;
}
return err;
} | 393 | True | 1 |
||
CVE-2016-8666 | 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.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 | nan | [{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1384991', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1384991', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://bugzilla.suse.com/show_bug.cgi?id=1001486', 'name': 'https://bugzilla.suse.com/show_bug.cgi?id=1001486', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/fac8e0f579695a3ecbc4d3cac369139d7f819971', 'name': 'https://github.com/torvalds/linux/commit/fac8e0f579695a3ecbc4d3cac369139d7f819971', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=fac8e0f579695a3ecbc4d3cac369139d7f819971', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=fac8e0f579695a3ecbc4d3cac369139d7f819971', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/10/13/11', 'name': '[oss-security] 20161013 CVE Request: another recursion in GRE', 'refsource': 'MLIST', 'tags': ['Mailing List']}, {'url': 'http://www.securityfocus.com/bid/93562', 'name': '93562', 'refsource': 'BID', 'tags': []}, {'url': 'https://bto.bluecoat.com/security-advisory/sa134', 'name': 'https://bto.bluecoat.com/security-advisory/sa134', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2017-0004.html', 'name': 'RHSA-2017:0004', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:0372', 'name': 'RHSA-2017:0372', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2110.html', 'name': 'RHSA-2016:2110', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2107.html', 'name': 'RHSA-2016:2107', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2047.html', 'name': 'RHSA-2016:2047', '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:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The IP stack in the Linux kernel before 4.6 allows remote attackers to cause a denial of service (stack consumption and panic) or possibly have unspecified other impact by triggering use of the GRO path for packets with tunnel stacking, as demonstrated by interleaved IPv4 headers and GRE headers, a related issue to CVE-2016-7039.'}] | 2018-01-05T02:31Z | 2016-10-16T21:59Z | 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 | Jesse Gross | 2016-03-19 09:32:01-07:00 | tunnels: Don't apply GRO to multiple layers of encapsulation.
When drivers express support for TSO of encapsulated packets, they
only mean that they can do it for one layer of encapsulation.
Supporting additional levels would mean updating, at a minimum,
more IP length fields and they are unaware of this.
No encapsulation device expresses support for handling offloaded
encapsulated packets, so we won't generate these types of frames
in the transmit path. However, GRO doesn't have a check for
multiple levels of encapsulation and will attempt to build them.
UDP tunnel GRO actually does prevent this situation but it only
handles multiple UDP tunnels stacked on top of each other. This
generalizes that solution to prevent any kind of tunnel stacking
that would cause problems.
Fixes: bf5a755f ("net-gre-gro: Add GRE support to the GRO stack")
Signed-off-by: Jesse Gross <jesse@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | fac8e0f579695a3ecbc4d3cac369139d7f819971 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | dev_gro_receive | dev_gro_receive( struct napi_struct * napi , struct sk_buff * skb) | ['napi', 'skb'] |
static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
{
struct sk_buff **pp = NULL;
struct packet_offload *ptype;
__be16 type = skb->protocol;
struct list_head *head = &offload_base;
int same_flow;
enum gro_result ret;
int grow;
if (!(skb->dev->features & NETIF_F_GRO))
goto normal;
if (skb_is_gso(skb) || skb_has_frag_list(skb) || skb->csum_bad)
goto normal;
gro_list_prepare(napi, skb);
rcu_read_lock();
list_for_each_entry_rcu(ptype, head, list) {
if (ptype->type != type || !ptype->callbacks.gro_receive)
continue;
skb_set_network_header(skb, skb_gro_offset(skb));
skb_reset_mac_len(skb);
NAPI_GRO_CB(skb)->same_flow = 0;
NAPI_GRO_CB(skb)->flush = 0;
NAPI_GRO_CB(skb)->free = 0;
NAPI_GRO_CB(skb)->udp_mark = 0;
NAPI_GRO_CB(skb)->gro_remcsum_start = 0;
/* Setup for GRO checksum validation */
switch (skb->ip_summed) {
case CHECKSUM_COMPLETE:
NAPI_GRO_CB(skb)->csum = skb->csum;
NAPI_GRO_CB(skb)->csum_valid = 1;
NAPI_GRO_CB(skb)->csum_cnt = 0;
break;
case CHECKSUM_UNNECESSARY:
NAPI_GRO_CB(skb)->csum_cnt = skb->csum_level + 1;
NAPI_GRO_CB(skb)->csum_valid = 0;
break;
default:
NAPI_GRO_CB(skb)->csum_cnt = 0;
NAPI_GRO_CB(skb)->csum_valid = 0;
}
pp = ptype->callbacks.gro_receive(&napi->gro_list, skb);
break;
}
rcu_read_unlock();
if (&ptype->list == head)
goto normal;
same_flow = NAPI_GRO_CB(skb)->same_flow;
ret = NAPI_GRO_CB(skb)->free ? GRO_MERGED_FREE : GRO_MERGED;
if (pp) {
struct sk_buff *nskb = *pp;
*pp = nskb->next;
nskb->next = NULL;
napi_gro_complete(nskb);
napi->gro_count--;
}
if (same_flow)
goto ok;
if (NAPI_GRO_CB(skb)->flush)
goto normal;
if (unlikely(napi->gro_count >= MAX_GRO_SKBS)) {
struct sk_buff *nskb = napi->gro_list;
/* locate the end of the list to select the 'oldest' flow */
while (nskb->next) {
pp = &nskb->next;
nskb = *pp;
}
*pp = NULL;
nskb->next = NULL;
napi_gro_complete(nskb);
} else {
napi->gro_count++;
}
NAPI_GRO_CB(skb)->count = 1;
NAPI_GRO_CB(skb)->age = jiffies;
NAPI_GRO_CB(skb)->last = skb;
skb_shinfo(skb)->gso_size = skb_gro_len(skb);
skb->next = napi->gro_list;
napi->gro_list = skb;
ret = GRO_HELD;
pull:
grow = skb_gro_offset(skb) - skb_headlen(skb);
if (grow > 0)
gro_pull_from_frag0(skb, grow);
ok:
return ret;
normal:
ret = GRO_NORMAL;
goto pull; | 549 | True | 1 |
|
CVE-2016-8666 | 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.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 | nan | [{'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1384991', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1384991', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://bugzilla.suse.com/show_bug.cgi?id=1001486', 'name': 'https://bugzilla.suse.com/show_bug.cgi?id=1001486', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory']}, {'url': 'https://github.com/torvalds/linux/commit/fac8e0f579695a3ecbc4d3cac369139d7f819971', 'name': 'https://github.com/torvalds/linux/commit/fac8e0f579695a3ecbc4d3cac369139d7f819971', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=fac8e0f579695a3ecbc4d3cac369139d7f819971', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=fac8e0f579695a3ecbc4d3cac369139d7f819971', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/10/13/11', 'name': '[oss-security] 20161013 CVE Request: another recursion in GRE', 'refsource': 'MLIST', 'tags': ['Mailing List']}, {'url': 'http://www.securityfocus.com/bid/93562', 'name': '93562', 'refsource': 'BID', 'tags': []}, {'url': 'https://bto.bluecoat.com/security-advisory/sa134', 'name': 'https://bto.bluecoat.com/security-advisory/sa134', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2017-0004.html', 'name': 'RHSA-2017:0004', 'refsource': 'REDHAT', 'tags': []}, {'url': 'https://access.redhat.com/errata/RHSA-2017:0372', 'name': 'RHSA-2017:0372', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2110.html', 'name': 'RHSA-2016:2110', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2107.html', 'name': 'RHSA-2016:2107', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-2047.html', 'name': 'RHSA-2016:2047', '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:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The IP stack in the Linux kernel before 4.6 allows remote attackers to cause a denial of service (stack consumption and panic) or possibly have unspecified other impact by triggering use of the GRO path for packets with tunnel stacking, as demonstrated by interleaved IPv4 headers and GRE headers, a related issue to CVE-2016-7039.'}] | 2018-01-05T02:31Z | 2016-10-16T21:59Z | 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 | Jesse Gross | 2016-03-19 09:32:01-07:00 | tunnels: Don't apply GRO to multiple layers of encapsulation.
When drivers express support for TSO of encapsulated packets, they
only mean that they can do it for one layer of encapsulation.
Supporting additional levels would mean updating, at a minimum,
more IP length fields and they are unaware of this.
No encapsulation device expresses support for handling offloaded
encapsulated packets, so we won't generate these types of frames
in the transmit path. However, GRO doesn't have a check for
multiple levels of encapsulation and will attempt to build them.
UDP tunnel GRO actually does prevent this situation but it only
handles multiple UDP tunnels stacked on top of each other. This
generalizes that solution to prevent any kind of tunnel stacking
that would cause problems.
Fixes: bf5a755f ("net-gre-gro: Add GRE support to the GRO stack")
Signed-off-by: Jesse Gross <jesse@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | fac8e0f579695a3ecbc4d3cac369139d7f819971 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | udp_gro_receive | udp_gro_receive( struct sk_buff ** head , struct sk_buff * skb , struct udphdr * uh) | ['head', 'skb', 'uh'] | struct sk_buff **udp_gro_receive(struct sk_buff **head, struct sk_buff *skb,
struct udphdr *uh)
{
struct udp_offload_priv *uo_priv;
struct sk_buff *p, **pp = NULL;
struct udphdr *uh2;
unsigned int off = skb_gro_offset(skb);
int flush = 1;
if (NAPI_GRO_CB(skb)->udp_mark ||
(skb->ip_summed != CHECKSUM_PARTIAL &&
NAPI_GRO_CB(skb)->csum_cnt == 0 &&
!NAPI_GRO_CB(skb)->csum_valid))
goto out;
/* mark that this skb passed once through the udp gro layer */
NAPI_GRO_CB(skb)->udp_mark = 1;
rcu_read_lock();
uo_priv = rcu_dereference(udp_offload_base);
for (; uo_priv != NULL; uo_priv = rcu_dereference(uo_priv->next)) {
if (net_eq(read_pnet(&uo_priv->net), dev_net(skb->dev)) &&
uo_priv->offload->port == uh->dest &&
uo_priv->offload->callbacks.gro_receive)
goto unflush;
}
goto out_unlock;
unflush:
flush = 0;
for (p = *head; p; p = p->next) {
if (!NAPI_GRO_CB(p)->same_flow)
continue;
uh2 = (struct udphdr *)(p->data + off);
/* Match ports and either checksums are either both zero
* or nonzero.
*/
if ((*(u32 *)&uh->source != *(u32 *)&uh2->source) ||
(!uh->check ^ !uh2->check)) {
NAPI_GRO_CB(p)->same_flow = 0;
continue;
}
}
skb_gro_pull(skb, sizeof(struct udphdr)); /* pull encapsulating udp header */
skb_gro_postpull_rcsum(skb, uh, sizeof(struct udphdr));
NAPI_GRO_CB(skb)->proto = uo_priv->offload->ipproto;
pp = uo_priv->offload->callbacks.gro_receive(head, skb,
uo_priv->offload);
out_unlock:
rcu_read_unlock();
out:
NAPI_GRO_CB(skb)->flush |= flush;
return pp;
} | 347 | True | 1 |
|
CVE-2016-6197 | 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 | nan | [{'url': 'https://github.com/torvalds/linux/commit/11f3710417d026ea2f4fcf362d866342c5274185', 'name': 'https://github.com/torvalds/linux/commit/11f3710417d026ea2f4fcf362d866342c5274185', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=11f3710417d026ea2f4fcf362d866342c5274185', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=11f3710417d026ea2f4fcf362d866342c5274185', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/07/11/8', 'name': '[oss-security] 20160711 Re: cvs request: local DoS using rename syscall on overlayfs on top of xfs to crash the kernel - Linux kernel', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1355650', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1355650', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinjul2016-3090546.html', 'name': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinjul2016-3090546.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-3070-2', 'name': 'USN-3070-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/91709', 'name': '91709', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-3070-1', 'name': 'USN-3070-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-3070-3', 'name': 'USN-3070-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-3070-4', 'name': 'USN-3070-4', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1036273', 'name': '1036273', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-1875.html', 'name': 'RHSA-2016:1875', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-1847.html', 'name': 'RHSA-2016:1847', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:oracle:linux:6:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:oracle:vm_server:3.4:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'fs/overlayfs/dir.c in the OverlayFS filesystem implementation in the Linux kernel before 4.6 does not properly verify the upper dentry before proceeding with unlink and rename system-call processing, which allows local users to cause a denial of service (system crash) via a rename system call that specifies a self-hardlink.'}] | 2019-12-27T16:08Z | 2016-08-06T20:59Z | 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 | Miklos Szeredi | 2016-03-21 17:31:44+01:00 | ovl: verify upper dentry before unlink and rename
Unlink and rename in overlayfs checked the upper dentry for staleness by
verifying upper->d_parent against upperdir. However the dentry can go
stale also by being unhashed, for example.
Expand the verification to actually look up the name again (under parent
lock) and check if it matches the upper dentry. This matches what the VFS
does before passing the dentry to filesytem's unlink/rename methods, which
excludes any inconsistency caused by overlayfs.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> | 11f3710417d026ea2f4fcf362d866342c5274185 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ovl_remove_upper | ovl_remove_upper( struct dentry * dentry , bool is_dir) | ['dentry', 'is_dir'] | static int ovl_remove_upper(struct dentry *dentry, bool is_dir)
{
struct dentry *upperdir = ovl_dentry_upper(dentry->d_parent);
struct inode *dir = upperdir->d_inode;
struct dentry *upper = ovl_dentry_upper(dentry);
int err;
inode_lock_nested(dir, I_MUTEX_PARENT);
err = -ESTALE;
if (upper->d_parent == upperdir) {
/* Don't let d_delete() think it can reset d_inode */
dget(upper);
if (is_dir)
err = vfs_rmdir(dir, upper);
else
err = vfs_unlink(dir, upper, NULL);
dput(upper);
ovl_dentry_version_inc(dentry->d_parent);
}
/*
* Keeping this dentry hashed would mean having to release
* upperpath/lowerpath, which could only be done if we are the
* sole user of this dentry. Too tricky... Just unhash for
* now.
*/
if (!err)
d_drop(dentry);
inode_unlock(dir);
return err;
} | 128 | True | 1 |
|
CVE-2016-6197 | 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 | nan | [{'url': 'https://github.com/torvalds/linux/commit/11f3710417d026ea2f4fcf362d866342c5274185', 'name': 'https://github.com/torvalds/linux/commit/11f3710417d026ea2f4fcf362d866342c5274185', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=11f3710417d026ea2f4fcf362d866342c5274185', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=11f3710417d026ea2f4fcf362d866342c5274185', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Patch']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/07/11/8', 'name': '[oss-security] 20160711 Re: cvs request: local DoS using rename syscall on overlayfs on top of xfs to crash the kernel - Linux kernel', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Third Party Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1355650', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1355650', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinjul2016-3090546.html', 'name': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinjul2016-3090546.html', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-3070-2', 'name': 'USN-3070-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/91709', 'name': '91709', 'refsource': 'BID', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-3070-1', 'name': 'USN-3070-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-3070-3', 'name': 'USN-3070-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-3070-4', 'name': 'USN-3070-4', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1036273', 'name': '1036273', 'refsource': 'SECTRACK', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-1875.html', 'name': 'RHSA-2016:1875', 'refsource': 'REDHAT', 'tags': []}, {'url': 'http://rhn.redhat.com/errata/RHSA-2016-1847.html', 'name': 'RHSA-2016:1847', 'refsource': 'REDHAT', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-20'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:oracle:linux:6:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.7', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:oracle:vm_server:3.4:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'fs/overlayfs/dir.c in the OverlayFS filesystem implementation in the Linux kernel before 4.6 does not properly verify the upper dentry before proceeding with unlink and rename system-call processing, which allows local users to cause a denial of service (system crash) via a rename system call that specifies a self-hardlink.'}] | 2019-12-27T16:08Z | 2016-08-06T20:59Z | 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 | Miklos Szeredi | 2016-03-21 17:31:44+01:00 | ovl: verify upper dentry before unlink and rename
Unlink and rename in overlayfs checked the upper dentry for staleness by
verifying upper->d_parent against upperdir. However the dentry can go
stale also by being unhashed, for example.
Expand the verification to actually look up the name again (under parent
lock) and check if it matches the upper dentry. This matches what the VFS
does before passing the dentry to filesytem's unlink/rename methods, which
excludes any inconsistency caused by overlayfs.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> | 11f3710417d026ea2f4fcf362d866342c5274185 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ovl_rename2 | ovl_rename2( struct inode * olddir , struct dentry * old , struct inode * newdir , struct dentry * new , unsigned int flags) | ['olddir', 'old', 'newdir', 'new', 'flags'] | static int ovl_rename2(struct inode *olddir, struct dentry *old,
struct inode *newdir, struct dentry *new,
unsigned int flags)
{
int err;
enum ovl_path_type old_type;
enum ovl_path_type new_type;
struct dentry *old_upperdir;
struct dentry *new_upperdir;
struct dentry *olddentry;
struct dentry *newdentry;
struct dentry *trap;
bool old_opaque;
bool new_opaque;
bool new_create = false;
bool cleanup_whiteout = false;
bool overwrite = !(flags & RENAME_EXCHANGE);
bool is_dir = d_is_dir(old);
bool new_is_dir = false;
struct dentry *opaquedir = NULL;
const struct cred *old_cred = NULL;
struct cred *override_cred = NULL;
err = -EINVAL;
if (flags & ~(RENAME_EXCHANGE | RENAME_NOREPLACE))
goto out;
flags &= ~RENAME_NOREPLACE;
err = ovl_check_sticky(old);
if (err)
goto out;
/* Don't copy up directory trees */
old_type = ovl_path_type(old);
err = -EXDEV;
if (OVL_TYPE_MERGE_OR_LOWER(old_type) && is_dir)
goto out;
if (new->d_inode) {
err = ovl_check_sticky(new);
if (err)
goto out;
if (d_is_dir(new))
new_is_dir = true;
new_type = ovl_path_type(new);
err = -EXDEV;
if (!overwrite && OVL_TYPE_MERGE_OR_LOWER(new_type) && new_is_dir)
goto out;
err = 0;
if (!OVL_TYPE_UPPER(new_type) && !OVL_TYPE_UPPER(old_type)) {
if (ovl_dentry_lower(old)->d_inode ==
ovl_dentry_lower(new)->d_inode)
goto out;
}
if (OVL_TYPE_UPPER(new_type) && OVL_TYPE_UPPER(old_type)) {
if (ovl_dentry_upper(old)->d_inode ==
ovl_dentry_upper(new)->d_inode)
goto out;
}
} else {
if (ovl_dentry_is_opaque(new))
new_type = __OVL_PATH_UPPER;
else
new_type = __OVL_PATH_UPPER | __OVL_PATH_PURE;
}
err = ovl_want_write(old);
if (err)
goto out;
err = ovl_copy_up(old);
if (err)
goto out_drop_write;
err = ovl_copy_up(new->d_parent);
if (err)
goto out_drop_write;
if (!overwrite) {
err = ovl_copy_up(new);
if (err)
goto out_drop_write;
}
old_opaque = !OVL_TYPE_PURE_UPPER(old_type);
new_opaque = !OVL_TYPE_PURE_UPPER(new_type);
if (old_opaque || new_opaque) {
err = -ENOMEM;
override_cred = prepare_creds();
if (!override_cred)
goto out_drop_write;
/*
* CAP_SYS_ADMIN for setting xattr on whiteout, opaque dir
* CAP_DAC_OVERRIDE for create in workdir
* CAP_FOWNER for removing whiteout from sticky dir
* CAP_FSETID for chmod of opaque dir
* CAP_CHOWN for chown of opaque dir
*/
cap_raise(override_cred->cap_effective, CAP_SYS_ADMIN);
cap_raise(override_cred->cap_effective, CAP_DAC_OVERRIDE);
cap_raise(override_cred->cap_effective, CAP_FOWNER);
cap_raise(override_cred->cap_effective, CAP_FSETID);
cap_raise(override_cred->cap_effective, CAP_CHOWN);
old_cred = override_creds(override_cred);
}
if (overwrite && OVL_TYPE_MERGE_OR_LOWER(new_type) && new_is_dir) {
opaquedir = ovl_check_empty_and_clear(new);
err = PTR_ERR(opaquedir);
if (IS_ERR(opaquedir)) {
opaquedir = NULL;
goto out_revert_creds;
}
}
if (overwrite) {
if (old_opaque) {
if (new->d_inode || !new_opaque) {
/* Whiteout source */
flags |= RENAME_WHITEOUT;
} else {
/* Switch whiteouts */
flags |= RENAME_EXCHANGE;
}
} else if (is_dir && !new->d_inode && new_opaque) {
flags |= RENAME_EXCHANGE;
cleanup_whiteout = true;
}
}
old_upperdir = ovl_dentry_upper(old->d_parent);
new_upperdir = ovl_dentry_upper(new->d_parent);
trap = lock_rename(new_upperdir, old_upperdir);
olddentry = ovl_dentry_upper(old);
newdentry = ovl_dentry_upper(new);
if (newdentry) {
if (opaquedir) {
newdentry = opaquedir;
opaquedir = NULL;
} else {
dget(newdentry);
}
} else {
new_create = true;
newdentry = lookup_one_len(new->d_name.name, new_upperdir,
new->d_name.len);
err = PTR_ERR(newdentry);
if (IS_ERR(newdentry))
goto out_unlock;
}
err = -ESTALE;
if (olddentry->d_parent != old_upperdir)
goto out_dput;
if (newdentry->d_parent != new_upperdir)
goto out_dput;
if (olddentry == trap)
goto out_dput;
if (newdentry == trap)
goto out_dput;
if (is_dir && !old_opaque && new_opaque) {
err = ovl_set_opaque(olddentry);
if (err)
goto out_dput;
}
if (!overwrite && new_is_dir && old_opaque && !new_opaque) {
err = ovl_set_opaque(newdentry);
if (err)
goto out_dput;
}
if (old_opaque || new_opaque) {
err = ovl_do_rename(old_upperdir->d_inode, olddentry,
new_upperdir->d_inode, newdentry,
flags);
} else {
/* No debug for the plain case */
BUG_ON(flags & ~RENAME_EXCHANGE);
err = vfs_rename(old_upperdir->d_inode, olddentry,
new_upperdir->d_inode, newdentry,
NULL, flags);
}
if (err) {
if (is_dir && !old_opaque && new_opaque)
ovl_remove_opaque(olddentry);
if (!overwrite && new_is_dir && old_opaque && !new_opaque)
ovl_remove_opaque(newdentry);
goto out_dput;
}
if (is_dir && old_opaque && !new_opaque)
ovl_remove_opaque(olddentry);
if (!overwrite && new_is_dir && !old_opaque && new_opaque)
ovl_remove_opaque(newdentry);
/*
* Old dentry now lives in different location. Dentries in
* lowerstack are stale. We cannot drop them here because
* access to them is lockless. This could be only pure upper
* or opaque directory - numlower is zero. Or upper non-dir
* entry - its pureness is tracked by flag opaque.
*/
if (old_opaque != new_opaque) {
ovl_dentry_set_opaque(old, new_opaque);
if (!overwrite)
ovl_dentry_set_opaque(new, old_opaque);
}
if (cleanup_whiteout)
ovl_cleanup(old_upperdir->d_inode, newdentry);
ovl_dentry_version_inc(old->d_parent);
ovl_dentry_version_inc(new->d_parent);
out_dput:
dput(newdentry);
out_unlock:
unlock_rename(new_upperdir, old_upperdir);
out_revert_creds:
if (old_opaque || new_opaque) {
revert_creds(old_cred);
put_cred(override_cred);
}
out_drop_write:
ovl_drop_write(old);
out:
dput(opaquedir);
return err;
} | 1043 | True | 1 |
|
CVE-2016-4805 | 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 | nan | [{'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1f461dcdd296eecedaffffc6bae2bfa90bd7eb89', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1f461dcdd296eecedaffffc6bae2bfa90bd7eb89', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://github.com/torvalds/linux/commit/1f461dcdd296eecedaffffc6bae2bfa90bd7eb89', 'name': 'https://github.com/torvalds/linux/commit/1f461dcdd296eecedaffffc6bae2bfa90bd7eb89', 'refsource': 'CONFIRM', 'tags': ['Patch']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1335803', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1335803', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking']}, {'url': 'http://www.openwall.com/lists/oss-security/2016/05/15/2', 'name': '[oss-security] 20160515 Re: CVE Requests: Linux: use-after-free issue for ppp channel', 'refsource': 'MLIST', 'tags': ['Mailing List', 'Patch']}, {'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.5.2', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.5.2', 'refsource': 'CONFIRM', 'tags': ['Mailing List']}, {'url': 'http://www.ubuntu.com/usn/USN-3021-1', 'name': 'USN-3021-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00052.html', 'name': 'SUSE-SU-2016:1672', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Release Notes']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00054.html', 'name': 'SUSE-SU-2016:1690', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Release Notes']}, {'url': 'http://www.ubuntu.com/usn/USN-3021-2', 'name': 'USN-3021-2', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00000.html', 'name': 'SUSE-SU-2016:1937', 'refsource': 'SUSE', 'tags': ['Mailing List', 'Release Notes']}, {'url': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'name': 'http://www.oracle.com/technetwork/topics/security/linuxbulletinjul2016-3090544.html', 'refsource': 'CONFIRM', 'tags': ['Third Party Advisory']}, {'url': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinoct2016-3090547.html', 'name': 'http://www.oracle.com/technetwork/topics/security/ovmbulletinoct2016-3090547.html', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00044.html', 'name': 'openSUSE-SU-2016:1641', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00055.html', 'name': 'openSUSE-SU-2016:2184', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.debian.org/security/2016/dsa-3607', 'name': 'DSA-3607', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00044.html', 'name': 'SUSE-SU-2016:2105', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/90605', 'name': '90605', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00007.html', 'name': 'SUSE-SU-2016:1985', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.securitytracker.com/id/1036763', 'name': '1036763', 'refsource': 'SECTRACK', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'CWE-416'}]}] | HIGH | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_desktop:12.0:-:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:novell:suse_linux_enterprise_workstation_extension:12.0:-:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:novell:suse_linux_enterprise_module_for_public_cloud:12.0:-:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_server:11.0:sp4:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:novell:suse_linux_enterprise_module_for_public_cloud:12.0:-:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:opensuse_leap:42.1:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:novell:suse_linux_enterprise_software_development_kit:11.0:sp4:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:redhat:enterprise_linux:6.0:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:-:lts:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.1', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:novell:suse_linux_enterprise_software_development_kit:12.0:-:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:novell:suse_linux_enterprise_workstation_extension:12.0:sp1:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_server:12.0:-:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_desktop:12.0:sp1:*:*:*:*:*:*', '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:oracle:linux:6:*:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_real_time_extension:11.0:sp4:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_server:12.0:sp1:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_real_time_extension:12.0:sp1:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:novell:suse_linux_enterprise_software_development_kit:12.0:sp1:*:*:*:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:a:novell:suse_linux_enterprise_live_patching:12.0:-:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'Use-after-free vulnerability in drivers/net/ppp/ppp_generic.c in the Linux kernel before 4.5.2 allows local users to cause a denial of service (memory corruption and system crash, or spinlock) or possibly have unspecified other impact by removing a network namespace, related to the ppp_register_net_channel and ppp_unregister_channel functions.'}] | 2019-12-27T16:08Z | 2016-05-23T10:59Z | 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 | Guillaume Nault | 2016-03-23 16:38:55+01:00 | ppp: take reference on channels netns
Let channels hold a reference on their network namespace.
Some channel types, like ppp_async and ppp_synctty, can have their
userspace controller running in a different namespace. Therefore they
can't rely on them to preclude their netns from being removed from
under them.
==================================================================
BUG: KASAN: use-after-free in ppp_unregister_channel+0x372/0x3a0 at
addr ffff880064e217e0
Read of size 8 by task syz-executor/11581
=============================================================================
BUG net_namespace (Not tainted): kasan: bad access detected
-----------------------------------------------------------------------------
Disabling lock debugging due to kernel taint
INFO: Allocated in copy_net_ns+0x6b/0x1a0 age=92569 cpu=3 pid=6906
[< none >] ___slab_alloc+0x4c7/0x500 kernel/mm/slub.c:2440
[< none >] __slab_alloc+0x4c/0x90 kernel/mm/slub.c:2469
[< inline >] slab_alloc_node kernel/mm/slub.c:2532
[< inline >] slab_alloc kernel/mm/slub.c:2574
[< none >] kmem_cache_alloc+0x23a/0x2b0 kernel/mm/slub.c:2579
[< inline >] kmem_cache_zalloc kernel/include/linux/slab.h:597
[< inline >] net_alloc kernel/net/core/net_namespace.c:325
[< none >] copy_net_ns+0x6b/0x1a0 kernel/net/core/net_namespace.c:360
[< none >] create_new_namespaces+0x2f6/0x610 kernel/kernel/nsproxy.c:95
[< none >] copy_namespaces+0x297/0x320 kernel/kernel/nsproxy.c:150
[< none >] copy_process.part.35+0x1bf4/0x5760 kernel/kernel/fork.c:1451
[< inline >] copy_process kernel/kernel/fork.c:1274
[< none >] _do_fork+0x1bc/0xcb0 kernel/kernel/fork.c:1723
[< inline >] SYSC_clone kernel/kernel/fork.c:1832
[< none >] SyS_clone+0x37/0x50 kernel/kernel/fork.c:1826
[< none >] entry_SYSCALL_64_fastpath+0x16/0x7a kernel/arch/x86/entry/entry_64.S:185
INFO: Freed in net_drop_ns+0x67/0x80 age=575 cpu=2 pid=2631
[< none >] __slab_free+0x1fc/0x320 kernel/mm/slub.c:2650
[< inline >] slab_free kernel/mm/slub.c:2805
[< none >] kmem_cache_free+0x2a0/0x330 kernel/mm/slub.c:2814
[< inline >] net_free kernel/net/core/net_namespace.c:341
[< none >] net_drop_ns+0x67/0x80 kernel/net/core/net_namespace.c:348
[< none >] cleanup_net+0x4e5/0x600 kernel/net/core/net_namespace.c:448
[< none >] process_one_work+0x794/0x1440 kernel/kernel/workqueue.c:2036
[< none >] worker_thread+0xdb/0xfc0 kernel/kernel/workqueue.c:2170
[< none >] kthread+0x23f/0x2d0 kernel/drivers/block/aoe/aoecmd.c:1303
[< none >] ret_from_fork+0x3f/0x70 kernel/arch/x86/entry/entry_64.S:468
INFO: Slab 0xffffea0001938800 objects=3 used=0 fp=0xffff880064e20000
flags=0x5fffc0000004080
INFO: Object 0xffff880064e20000 @offset=0 fp=0xffff880064e24200
CPU: 1 PID: 11581 Comm: syz-executor Tainted: G B 4.4.0+
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
rel-1.8.2-0-g33fbe13 by qemu-project.org 04/01/2014
00000000ffffffff ffff8800662c7790 ffffffff8292049d ffff88003e36a300
ffff880064e20000 ffff880064e20000 ffff8800662c77c0 ffffffff816f2054
ffff88003e36a300 ffffea0001938800 ffff880064e20000 0000000000000000
Call Trace:
[< inline >] __dump_stack kernel/lib/dump_stack.c:15
[<ffffffff8292049d>] dump_stack+0x6f/0xa2 kernel/lib/dump_stack.c:50
[<ffffffff816f2054>] print_trailer+0xf4/0x150 kernel/mm/slub.c:654
[<ffffffff816f875f>] object_err+0x2f/0x40 kernel/mm/slub.c:661
[< inline >] print_address_description kernel/mm/kasan/report.c:138
[<ffffffff816fb0c5>] kasan_report_error+0x215/0x530 kernel/mm/kasan/report.c:236
[< inline >] kasan_report kernel/mm/kasan/report.c:259
[<ffffffff816fb4de>] __asan_report_load8_noabort+0x3e/0x40 kernel/mm/kasan/report.c:280
[< inline >] ? ppp_pernet kernel/include/linux/compiler.h:218
[<ffffffff83ad71b2>] ? ppp_unregister_channel+0x372/0x3a0 kernel/drivers/net/ppp/ppp_generic.c:2392
[< inline >] ppp_pernet kernel/include/linux/compiler.h:218
[<ffffffff83ad71b2>] ppp_unregister_channel+0x372/0x3a0 kernel/drivers/net/ppp/ppp_generic.c:2392
[< inline >] ? ppp_pernet kernel/drivers/net/ppp/ppp_generic.c:293
[<ffffffff83ad6f26>] ? ppp_unregister_channel+0xe6/0x3a0 kernel/drivers/net/ppp/ppp_generic.c:2392
[<ffffffff83ae18f3>] ppp_asynctty_close+0xa3/0x130 kernel/drivers/net/ppp/ppp_async.c:241
[<ffffffff83ae1850>] ? async_lcp_peek+0x5b0/0x5b0 kernel/drivers/net/ppp/ppp_async.c:1000
[<ffffffff82c33239>] tty_ldisc_close.isra.1+0x99/0xe0 kernel/drivers/tty/tty_ldisc.c:478
[<ffffffff82c332c0>] tty_ldisc_kill+0x40/0x170 kernel/drivers/tty/tty_ldisc.c:744
[<ffffffff82c34943>] tty_ldisc_release+0x1b3/0x260 kernel/drivers/tty/tty_ldisc.c:772
[<ffffffff82c1ef21>] tty_release+0xac1/0x13e0 kernel/drivers/tty/tty_io.c:1901
[<ffffffff82c1e460>] ? release_tty+0x320/0x320 kernel/drivers/tty/tty_io.c:1688
[<ffffffff8174de36>] __fput+0x236/0x780 kernel/fs/file_table.c:208
[<ffffffff8174e405>] ____fput+0x15/0x20 kernel/fs/file_table.c:244
[<ffffffff813595ab>] task_work_run+0x16b/0x200 kernel/kernel/task_work.c:115
[< inline >] exit_task_work kernel/include/linux/task_work.h:21
[<ffffffff81307105>] do_exit+0x8b5/0x2c60 kernel/kernel/exit.c:750
[<ffffffff813fdd20>] ? debug_check_no_locks_freed+0x290/0x290 kernel/kernel/locking/lockdep.c:4123
[<ffffffff81306850>] ? mm_update_next_owner+0x6f0/0x6f0 kernel/kernel/exit.c:357
[<ffffffff813215e6>] ? __dequeue_signal+0x136/0x470 kernel/kernel/signal.c:550
[<ffffffff8132067b>] ? recalc_sigpending_tsk+0x13b/0x180 kernel/kernel/signal.c:145
[<ffffffff81309628>] do_group_exit+0x108/0x330 kernel/kernel/exit.c:880
[<ffffffff8132b9d4>] get_signal+0x5e4/0x14f0 kernel/kernel/signal.c:2307
[< inline >] ? kretprobe_table_lock kernel/kernel/kprobes.c:1113
[<ffffffff8151d355>] ? kprobe_flush_task+0xb5/0x450 kernel/kernel/kprobes.c:1158
[<ffffffff8115f7d3>] do_signal+0x83/0x1c90 kernel/arch/x86/kernel/signal.c:712
[<ffffffff8151d2a0>] ? recycle_rp_inst+0x310/0x310 kernel/include/linux/list.h:655
[<ffffffff8115f750>] ? setup_sigcontext+0x780/0x780 kernel/arch/x86/kernel/signal.c:165
[<ffffffff81380864>] ? finish_task_switch+0x424/0x5f0 kernel/kernel/sched/core.c:2692
[< inline >] ? finish_lock_switch kernel/kernel/sched/sched.h:1099
[<ffffffff81380560>] ? finish_task_switch+0x120/0x5f0 kernel/kernel/sched/core.c:2678
[< inline >] ? context_switch kernel/kernel/sched/core.c:2807
[<ffffffff85d794e9>] ? __schedule+0x919/0x1bd0 kernel/kernel/sched/core.c:3283
[<ffffffff81003901>] exit_to_usermode_loop+0xf1/0x1a0 kernel/arch/x86/entry/common.c:247
[< inline >] prepare_exit_to_usermode kernel/arch/x86/entry/common.c:282
[<ffffffff810062ef>] syscall_return_slowpath+0x19f/0x210 kernel/arch/x86/entry/common.c:344
[<ffffffff85d88022>] int_ret_from_sys_call+0x25/0x9f kernel/arch/x86/entry/entry_64.S:281
Memory state around the buggy address:
ffff880064e21680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff880064e21700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff880064e21780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff880064e21800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff880064e21880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
Fixes: 273ec51dd7ce ("net: ppp_generic - introduce net-namespace functionality v2")
Reported-by: Baozeng Ding <sploving1@gmail.com>
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net> | 1f461dcdd296eecedaffffc6bae2bfa90bd7eb89 | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ppp_register_net_channel | ppp_register_net_channel( struct net * net , struct ppp_channel * chan) | ['net', 'chan'] | int ppp_register_net_channel(struct net *net, struct ppp_channel *chan)
{
struct channel *pch;
struct ppp_net *pn;
pch = kzalloc(sizeof(struct channel), GFP_KERNEL);
if (!pch)
return -ENOMEM;
pn = ppp_pernet(net);
pch->ppp = NULL;
pch->chan = chan;
pch->chan_net = net;
chan->ppp = pch;
init_ppp_file(&pch->file, CHANNEL);
pch->file.hdrlen = chan->hdrlen;
#ifdef CONFIG_PPP_MULTILINK
pch->lastseq = -1;
#endif /* CONFIG_PPP_MULTILINK */
init_rwsem(&pch->chan_sem);
spin_lock_init(&pch->downl);
rwlock_init(&pch->upl);
spin_lock_bh(&pn->all_channels_lock);
pch->file.index = ++pn->last_channel_index;
list_add(&pch->list, &pn->new_channels);
atomic_inc(&channel_count);
spin_unlock_bh(&pn->all_channels_lock);
return 0;
} | 177 | True | 1 |
|
CVE-2016-2185 | 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:P/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | PHYSICAL | LOW | NONE | NONE | UNCHANGED | NONE | NONE | HIGH | 4.6 | MEDIUM | 0.9 | 3.6 | nan | [{'url': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.5.1', 'name': 'http://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.5.1', 'refsource': 'CONFIRM', 'tags': []}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1283362', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1283362', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'https://github.com/torvalds/linux/commit/950336ba3e4a1ffd2ca60d29f6ef386dd2c7351d', 'name': 'https://github.com/torvalds/linux/commit/950336ba3e4a1ffd2ca60d29f6ef386dd2c7351d', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=950336ba3e4a1ffd2ca60d29f6ef386dd2c7351d', 'name': 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=950336ba3e4a1ffd2ca60d29f6ef386dd2c7351d', 'refsource': 'CONFIRM', 'tags': ['Vendor Advisory']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1283363', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1283363', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://seclists.org/bugtraq/2016/Mar/116', 'name': '20160315 Re: oss-2016-18: Multiple Local RedHat Enterprise Linux DoS - RHEL 7.1 Kernel crashes on invalid USB device descriptors (ati_remote2 driver)', 'refsource': 'BUGTRAQ', 'tags': ['Third Party Advisory', 'VDB Entry']}, {'url': 'https://bugzilla.redhat.com/show_bug.cgi?id=1317014', 'name': 'https://bugzilla.redhat.com/show_bug.cgi?id=1317014', 'refsource': 'CONFIRM', 'tags': ['Issue Tracking', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://seclists.org/bugtraq/2016/Mar/90', 'name': '20160310 oss-2016-18: Multiple Local RedHat Enterprise Linux DoS - RHEL 7.1 Kernel crashes on invalid USB device descriptors (ati_remote2 driver)', 'refsource': 'BUGTRAQ', 'tags': ['Exploit', 'Third Party Advisory', 'VDB Entry']}, {'url': 'http://www.ubuntu.com/usn/USN-2997-1', 'name': 'USN-2997-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://www.ubuntu.com/usn/USN-2996-1', 'name': 'USN-2996-1', 'refsource': 'UBUNTU', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00052.html', 'name': 'SUSE-SU-2016:1672', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00056.html', 'name': 'SUSE-SU-2016:1696', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00054.html', 'name': 'SUSE-SU-2016:1690', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00059.html', 'name': 'SUSE-SU-2016:1707', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-07/msg00005.html', 'name': 'SUSE-SU-2016:1764', 'refsource': 'SUSE', 'tags': ['Third Party Advisory']}, {'url': 'http://www.debian.org/security/2016/dsa-3607', 'name': 'DSA-3607', 'refsource': 'DEBIAN', 'tags': []}, {'url': 'http://www.securityfocus.com/bid/84341', 'name': '84341', 'refsource': 'BID', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00038.html', 'name': 'SUSE-SU-2016:2074', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2969-1', 'name': 'USN-2969-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2971-1', 'name': 'USN-2971-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2971-3', 'name': 'USN-2971-3', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://lists.opensuse.org/opensuse-security-announce/2016-05/msg00060.html', 'name': 'openSUSE-SU-2016:1382', 'refsource': 'SUSE', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2968-1', 'name': 'USN-2968-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2971-2', 'name': 'USN-2971-2', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2970-1', 'name': 'USN-2970-1', 'refsource': 'UBUNTU', 'tags': []}, {'url': 'http://www.ubuntu.com/usn/USN-2968-2', 'name': 'USN-2968-2', 'refsource': 'UBUNTU', 'tags': []}] | [{'description': [{'lang': 'en', 'value': 'NVD-CWE-Other'}]}] | MEDIUM | [{'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:canonical:ubuntu_linux:12.04:*:*:*:lts:*:*:*', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*', 'versionEndIncluding': '4.5.0', 'cpe_name': []}]}, {'operator': 'OR', 'children': [], 'cpe_match': [{'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_module_for_public_cloud:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_server:11.0:sp4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_server:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_server:11.0:extra:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_live_patching:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_server:12.0:sp1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_real_time_extension:11.0:sp4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_desktop:12.0:sp1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_real_time_extension:12.0:sp1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_software_development_kit:11.0:sp4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_workstation_extension:12.0:sp1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_debuginfo:11.0:sp4:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_software_development_kit:12.0:sp1:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_desktop:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_workstation_extension:12.0:*:*:*:*:*:*:*', 'cpe_name': []}, {'vulnerable': True, 'cpe23Uri': 'cpe:2.3:o:novell:suse_linux_enterprise_software_development_kit:12.0:*:*:*:*:*:*:*', 'cpe_name': []}]}] | [{'lang': 'en', 'value': 'The ati_remote2_probe function in drivers/input/misc/ati_remote2.c in the Linux kernel before 4.5.1 allows physically proximate attackers to cause a denial of service (NULL pointer dereference and system crash) via a crafted endpoints value in a USB device descriptor.'}] | 2016-12-01T03:08Z | 2016-05-02T10:59Z | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | Insufficient Information | https://nvd.nist.gov/vuln/categories | 0 | Vladis Dronov | 2016-03-23 11:53:46-07:00 | Input: ati_remote2 - fix crashes on detecting device with invalid descriptor
The ati_remote2 driver expects at least two interfaces with one
endpoint each. If given malicious descriptor that specify one
interface or no endpoints, it will crash in the probe function.
Ensure there is at least two interfaces and one endpoint for each
interface before using it.
The full disclosure: http://seclists.org/bugtraq/2016/Mar/90
Reported-by: Ralf Spenneberg <ralf@spenneberg.net>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> | 950336ba3e4a1ffd2ca60d29f6ef386dd2c7351d | False | torvalds/linux | Linux kernel source tree | 2011-09-04 22:48:12 | 2022-08-26 19:08:15 | torvalds | 136917.0 | 44307.0 | ati_remote2_probe | ati_remote2_probe( struct usb_interface * interface , const struct usb_device_id * id) | ['interface', 'id'] | static int ati_remote2_probe(struct usb_interface *interface, const struct usb_device_id *id)
{
struct usb_device *udev = interface_to_usbdev(interface);
struct usb_host_interface *alt = interface->cur_altsetting;
struct ati_remote2 *ar2;
int r;
if (alt->desc.bInterfaceNumber)
return -ENODEV;
ar2 = kzalloc(sizeof (struct ati_remote2), GFP_KERNEL);
if (!ar2)
return -ENOMEM;
ar2->udev = udev;
ar2->intf[0] = interface;
ar2->ep[0] = &alt->endpoint[0].desc;
ar2->intf[1] = usb_ifnum_to_if(udev, 1);
r = usb_driver_claim_interface(&ati_remote2_driver, ar2->intf[1], ar2);
if (r)
goto fail1;
alt = ar2->intf[1]->cur_altsetting;
ar2->ep[1] = &alt->endpoint[0].desc;
r = ati_remote2_urb_init(ar2);
if (r)
goto fail2;
ar2->channel_mask = channel_mask;
ar2->mode_mask = mode_mask;
r = ati_remote2_setup(ar2, ar2->channel_mask);
if (r)
goto fail2;
usb_make_path(udev, ar2->phys, sizeof(ar2->phys));
strlcat(ar2->phys, "/input0", sizeof(ar2->phys));
strlcat(ar2->name, "ATI Remote Wonder II", sizeof(ar2->name));
r = sysfs_create_group(&udev->dev.kobj, &ati_remote2_attr_group);
if (r)
goto fail2;
r = ati_remote2_input_init(ar2);
if (r)
goto fail3;
usb_set_intfdata(interface, ar2);
interface->needs_remote_wakeup = 1;
return 0;
fail3:
sysfs_remove_group(&udev->dev.kobj, &ati_remote2_attr_group);
fail2:
ati_remote2_urb_cleanup(ar2);
usb_driver_release_interface(&ati_remote2_driver, ar2->intf[1]);
fail1:
kfree(ar2);
return r;
} | 363 | True | 1 |
Subsets and Splits