idx int64 0 25.4k | project stringclasses 707
values | project_url stringclasses 735
values | filepath stringlengths 4 100 | commit_id stringlengths 7 40 | commit_message stringlengths 0 18.3k ⌀ | is_vulnerable bool 2
classes | hash stringlengths 32 32 | func_name stringlengths 3 112 | func_body stringlengths 23 235k | changed_lines stringlengths 2 27.6k | changed_statements stringlengths 2 161k | cve_list listlengths 1 19 | cwe_list listlengths 1 6 | fixed_func_idx int64 1 25.4k ⌀ | context dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
100 | linux | https://github.com/torvalds/linux | drivers/hid/hid-monterey.c | 4ab25786c87eb20857bbb715c3ae34ec8fd6a214 | HID: fix a couple of off-by-ones
There are a few very theoretical off-by-one bugs in report descriptor size
checking when performing a pre-parsing fixup. Fix those.
Cc: stable@vger.kernel.org
Reported-by: Ben Hawkes <hawkes@google.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jir... | false | 758865c4c0aeb50378a3bcc6bc2337aa | mr_report_fixup | static __u8 *mr_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
{
if (*rsize >= 31 && rdesc[29] == 0x05 && rdesc[30] == 0x09) {
hid_info(hdev, "fixing up button/consumer in HID report descriptor\n");
rdesc[30] = 0x0c;
}
return rdesc;
}
| [[27, "\tif (*rsize >= 31 && rdesc[29] == 0x05 && rdesc[30] == 0x09) {\n"]] | [[27, "if (*rsize >= 31 && rdesc[29] == 0x05 && rdesc[30] == 0x09)"]] | [
"CVE-2014-3184"
] | [
"CWE-119"
] | 100 | {
"Execution Environment": [
"HID device with user-controlled/bad report descriptor"
],
"Explanation": null,
"External Function": [],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": []
} |
101 | linux | https://github.com/torvalds/linux | drivers/hid/hid-petalynx.c | 4ab25786c87eb20857bbb715c3ae34ec8fd6a214 | HID: fix a couple of off-by-ones
There are a few very theoretical off-by-one bugs in report descriptor size
checking when performing a pre-parsing fixup. Fix those.
Cc: stable@vger.kernel.org
Reported-by: Ben Hawkes <hawkes@google.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jir... | true | ae1666687d57f58f4949c3b3e2f37570 | pl_report_fixup | static __u8 *pl_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
{
if (*rsize >= 60 && rdesc[39] == 0x2a && rdesc[40] == 0xf5 &&
rdesc[41] == 0x00 && rdesc[59] == 0x26 &&
rdesc[60] == 0xf9 && rdesc[61] == 0x00) {
hid_info(hdev, "fixing up Petalynx Maxter Remote report descriptor\n");
... | [[28, "\tif (*rsize >= 60 && rdesc[39] == 0x2a && rdesc[40] == 0xf5 &&\n"]] | [[28, "if (*rsize >= 60 && rdesc[39] == 0x2a && rdesc[40] == 0xf5 &&\n\t\t\trdesc[41] == 0x00 && rdesc[59] == 0x26 &&\n\t\t\trdesc[60] == 0xf9 && rdesc[61] == 0x00)"]] | [
"CVE-2014-3184"
] | [
"CWE-119"
] | 102 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": []
} |
102 | linux | https://github.com/torvalds/linux | drivers/hid/hid-petalynx.c | 4ab25786c87eb20857bbb715c3ae34ec8fd6a214 | HID: fix a couple of off-by-ones
There are a few very theoretical off-by-one bugs in report descriptor size
checking when performing a pre-parsing fixup. Fix those.
Cc: stable@vger.kernel.org
Reported-by: Ben Hawkes <hawkes@google.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jir... | false | 3745e89bce1bc213d31ddb2a5c6d7f24 | pl_report_fixup | static __u8 *pl_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
{
if (*rsize >= 62 && rdesc[39] == 0x2a && rdesc[40] == 0xf5 &&
rdesc[41] == 0x00 && rdesc[59] == 0x26 &&
rdesc[60] == 0xf9 && rdesc[61] == 0x00) {
hid_info(hdev, "fixing up Petalynx Maxter Remote report descriptor\n");
... | [[28, "\tif (*rsize >= 62 && rdesc[39] == 0x2a && rdesc[40] == 0xf5 &&\n"]] | [[28, "if (*rsize >= 62 && rdesc[39] == 0x2a && rdesc[40] == 0xf5 &&\n\t\t\trdesc[41] == 0x00 && rdesc[59] == 0x26 &&\n\t\t\trdesc[60] == 0xf9 && rdesc[61] == 0x00)"]] | [
"CVE-2014-3184"
] | [
"CWE-119"
] | 102 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": []
} |
103 | linux | https://github.com/torvalds/linux | drivers/hid/hid-sunplus.c | 4ab25786c87eb20857bbb715c3ae34ec8fd6a214 | HID: fix a couple of off-by-ones
There are a few very theoretical off-by-one bugs in report descriptor size
checking when performing a pre-parsing fixup. Fix those.
Cc: stable@vger.kernel.org
Reported-by: Ben Hawkes <hawkes@google.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jir... | true | 340b2ec4a75a5ab2e3e07043b2dedfcc | sp_report_fixup | static __u8 *sp_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
{
if (*rsize >= 107 && rdesc[104] == 0x26 && rdesc[105] == 0x80 &&
rdesc[106] == 0x03) {
hid_info(hdev, "fixing up Sunplus Wireless Desktop report descriptor\n");
rdesc[105] = rdesc[110] = 0x03;
rdesc[106] = rdesc[111] =... | [[27, "\tif (*rsize >= 107 && rdesc[104] == 0x26 && rdesc[105] == 0x80 &&\n"]] | [[27, "if (*rsize >= 107 && rdesc[104] == 0x26 && rdesc[105] == 0x80 &&\n\t\t\trdesc[106] == 0x03)"]] | [
"CVE-2014-3184"
] | [
"CWE-119"
] | 104 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": []
} |
104 | linux | https://github.com/torvalds/linux | drivers/hid/hid-sunplus.c | 4ab25786c87eb20857bbb715c3ae34ec8fd6a214 | HID: fix a couple of off-by-ones
There are a few very theoretical off-by-one bugs in report descriptor size
checking when performing a pre-parsing fixup. Fix those.
Cc: stable@vger.kernel.org
Reported-by: Ben Hawkes <hawkes@google.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jir... | false | 619c1fa41a66b38c491ee0ebefcb0cc4 | sp_report_fixup | static __u8 *sp_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
{
if (*rsize >= 112 && rdesc[104] == 0x26 && rdesc[105] == 0x80 &&
rdesc[106] == 0x03) {
hid_info(hdev, "fixing up Sunplus Wireless Desktop report descriptor\n");
rdesc[105] = rdesc[110] = 0x03;
rdesc[106] = rdesc[111] =... | [[27, "\tif (*rsize >= 112 && rdesc[104] == 0x26 && rdesc[105] == 0x80 &&\n"]] | [[27, "if (*rsize >= 112 && rdesc[104] == 0x26 && rdesc[105] == 0x80 &&\n\t\t\trdesc[106] == 0x03)"]] | [
"CVE-2014-3184"
] | [
"CWE-119"
] | 104 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": []
} |
105 | linux | https://github.com/torvalds/linux | fs/smb/server/auth.c | 4b081ce0d830b684fdf967abc3696d1261387254 | ksmbd: fix slub overflow in ksmbd_decode_ntlmssp_auth_blob()
If authblob->SessionKey.Length is bigger than session key
size(CIFS_KEY_SIZE), slub overflow can happen in key exchange codes.
cifs_arc4_crypt copy to session key array from SessionKey from client.
Cc: stable@vger.kernel.org
Reported-by: zdi-disclosures@tre... | true | f0a7d60c994b078bf8e85f0ed04fc444 | ksmbd_decode_ntlmssp_auth_blob | int ksmbd_decode_ntlmssp_auth_blob(struct authenticate_message *authblob,
int blob_len, struct ksmbd_conn *conn,
struct ksmbd_session *sess)
{
char *domain_name;
unsigned int nt_off, dn_off;
unsigned short nt_len, dn_len;
int ret;
if (blob_len < sizeof(struct authenticate_message)) {
ksmbd_debug(A... | [] | [] | [
"CVE-2023-52440"
] | [
"CWE-119"
] | 106 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [],
"Globals": [
"CIFS_KEY_SIZE"
],
"Type Execution Declaration": []
} |
106 | linux | https://github.com/torvalds/linux | fs/smb/server/auth.c | 4b081ce0d830b684fdf967abc3696d1261387254 | ksmbd: fix slub overflow in ksmbd_decode_ntlmssp_auth_blob()
If authblob->SessionKey.Length is bigger than session key
size(CIFS_KEY_SIZE), slub overflow can happen in key exchange codes.
cifs_arc4_crypt copy to session key array from SessionKey from client.
Cc: stable@vger.kernel.org
Reported-by: zdi-disclosures@tre... | false | bbd2b4efbe5b136bf3c8d2f17200c70c | ksmbd_decode_ntlmssp_auth_blob | int ksmbd_decode_ntlmssp_auth_blob(struct authenticate_message *authblob,
int blob_len, struct ksmbd_conn *conn,
struct ksmbd_session *sess)
{
char *domain_name;
unsigned int nt_off, dn_off;
unsigned short nt_len, dn_len;
int ret;
if (blob_len < sizeof(struct authenticate_message)) {
ksmbd_debug(A... | [[358, "\t\tif (sess_key_len > CIFS_KEY_SIZE)\n"], [359, "\t\t\treturn -EINVAL;\n"], [360, "\n"]] | [[358, "if (sess_key_len > CIFS_KEY_SIZE)"], [359, "return -EINVAL;"], [360, "\n"]] | [
"CVE-2023-52440"
] | [
"CWE-119"
] | 106 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [],
"Globals": [
"CIFS_KEY_SIZE"
],
"Type Execution Declaration": []
} |
107 | linux | https://github.com/torvalds/linux | kernel/bpf/ringbuf.c | 4b81ccebaeee885ab1aa1438133f2991e3a2b6ea | bpf, ringbuf: Deny reserve of buffers larger than ringbuf
A BPF program might try to reserve a buffer larger than the ringbuf size.
If the consumer pointer is way ahead of the producer, that would be
successfully reserved, allowing the BPF program to read or write out of
the ringbuf allocated area.
Reported-by: Ryota... | true | ed1dc11862a0870d254464da4ae21a75 | __bpf_ringbuf_reserve | static void *__bpf_ringbuf_reserve(struct bpf_ringbuf *rb, u64 size)
{
unsigned long cons_pos, prod_pos, new_prod_pos, flags;
u32 len, pg_off;
struct bpf_ringbuf_hdr *hdr;
if (unlikely(size > RINGBUF_MAX_RECORD_SZ))
return NULL;
len = round_up(size + BPF_RINGBUF_HDR_SZ, 8);
cons_pos = smp_load_acquire(&rb->co... | [] | [] | [
"CVE-2021-3489"
] | [
"CWE-787",
"CWE-119"
] | 108 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"bpf_ringbuf_rec_pg_off",
"smp_load_acquire",
"spin_trylock_irqsave",
"spin_lock_irqsave",
"spin_unlock_irqrestore",
"smp_store_release"
],
"Function Argument": [],
"Globals": [
"RINGBUF_MAX_RECORD_SZ",
... |
108 | linux | https://github.com/torvalds/linux | kernel/bpf/ringbuf.c | 4b81ccebaeee885ab1aa1438133f2991e3a2b6ea | bpf, ringbuf: Deny reserve of buffers larger than ringbuf
A BPF program might try to reserve a buffer larger than the ringbuf size.
If the consumer pointer is way ahead of the producer, that would be
successfully reserved, allowing the BPF program to read or write out of
the ringbuf allocated area.
Reported-by: Ryota... | false | 9fb6398392f4906d40f086e0e56559e4 | __bpf_ringbuf_reserve | static void *__bpf_ringbuf_reserve(struct bpf_ringbuf *rb, u64 size)
{
unsigned long cons_pos, prod_pos, new_prod_pos, flags;
u32 len, pg_off;
struct bpf_ringbuf_hdr *hdr;
if (unlikely(size > RINGBUF_MAX_RECORD_SZ))
return NULL;
len = round_up(size + BPF_RINGBUF_HDR_SZ, 8);
if (len > rb->mask + 1)
return NU... | [[318, "\tif (len > rb->mask + 1)\n"], [319, "\t\treturn NULL;\n"], [320, "\n"]] | [[318, "if (len > rb->mask + 1)"], [319, "return NULL;"], [320, "\n"]] | [
"CVE-2021-3489"
] | [
"CWE-787",
"CWE-119"
] | 108 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"bpf_ringbuf_rec_pg_off",
"smp_load_acquire",
"spin_trylock_irqsave",
"spin_lock_irqsave",
"spin_unlock_irqrestore",
"smp_store_release"
],
"Function Argument": [],
"Globals": [
"RINGBUF_MAX_RECORD_SZ",
... |
109 | linux | https://github.com/torvalds/linux | kernel/signal.c | 4ea77014af0d6205b05503d1c7aac6eace11d473 | kernel/signal.c: avoid undefined behaviour in kill_something_info
When running kill(72057458746458112, 0) in userspace I hit the following
issue.
UBSAN: Undefined behaviour in kernel/signal.c:1462:11
negation of -2147483648 cannot be represented in type 'int':
CPU: 226 PID: 9849 Comm: test Tainted: G B ... | true | 4f8db0b6c5103c034ea5d34e1bdfd8b2 | kill_something_info | static int kill_something_info(int sig, struct siginfo *info, pid_t pid)
{
int ret;
if (pid > 0) {
rcu_read_lock();
ret = kill_pid_info(sig, info, find_vpid(pid));
rcu_read_unlock();
return ret;
}
read_lock(&tasklist_lock);
if (pid != -1) {
ret = __kill_pgrp_info(sig, info,
pid ? find_vpid(-pid) : ... | [] | [] | [
"CVE-2018-10124"
] | [
"CWE-119"
] | 110 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"find_vpid",
"task_pgrp"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": []
} |
110 | linux | https://github.com/torvalds/linux | kernel/signal.c | 4ea77014af0d6205b05503d1c7aac6eace11d473 | kernel/signal.c: avoid undefined behaviour in kill_something_info
When running kill(72057458746458112, 0) in userspace I hit the following
issue.
UBSAN: Undefined behaviour in kernel/signal.c:1462:11
negation of -2147483648 cannot be represented in type 'int':
CPU: 226 PID: 9849 Comm: test Tainted: G B ... | false | c00e12a0d802de69646fbd9c2d914859 | kill_something_info | static int kill_something_info(int sig, struct siginfo *info, pid_t pid)
{
int ret;
if (pid > 0) {
rcu_read_lock();
ret = kill_pid_info(sig, info, find_vpid(pid));
rcu_read_unlock();
return ret;
}
/* -INT_MIN is undefined. Exclude this case to avoid a UBSAN warning */
if (pid == INT_MIN)
return -ESRCH... | [[1405, "\t/* -INT_MIN is undefined. Exclude this case to avoid a UBSAN warning */\n"], [1406, "\tif (pid == INT_MIN)\n"], [1407, "\t\treturn -ESRCH;\n"], [1408, "\n"]] | [[1405, "/* -INT_MIN is undefined. Exclude this case to avoid a UBSAN warning */"], [1406, "if (pid == INT_MIN)"], [1407, "return -ESRCH;"], [1408, "\n"]] | [
"CVE-2018-10124"
] | [
"CWE-119"
] | 110 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"find_vpid",
"task_pgrp"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": []
} |
111 | linux | https://github.com/torvalds/linux | drivers/hid/hid-logitech-dj.c | 51217e69697fba92a06e07e16f55c9a52d8e8945 | HID: logitech: fix bounds checking on LED report size
The check on report size for REPORT_TYPE_LEDS in logi_dj_ll_raw_request()
is wrong; the current check doesn't make any sense -- the report allocated
by HID core in hid_hw_raw_request() can be much larger than
DJREPORT_SHORT_LENGTH, and currently logi_dj_ll_raw_requ... | true | 32564061141872627bde92f19a397f4d | logi_dj_ll_raw_request | static int logi_dj_ll_raw_request(struct hid_device *hid,
unsigned char reportnum, __u8 *buf,
size_t count, unsigned char report_type,
int reqtype)
{
struct dj_device *djdev = hid->driver_data;
struct dj_receiver_dev *djrcv_dev = djdev->dj_receiver_dev;
u8 *out_buf;
int ret;
if (buf[0] != REPORT... | [[560, "\tif (count < DJREPORT_SHORT_LENGTH - 2)\n"]] | [[560, "if (count < DJREPORT_SHORT_LENGTH - 2)"]] | [
"CVE-2014-3183"
] | [
"CWE-119"
] | 112 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [
"count"
],
"Globals": [],
"Type Execution Declaration": [
"DJREPORT_SHORT_LENGTH"
]
} |
112 | linux | https://github.com/torvalds/linux | drivers/hid/hid-logitech-dj.c | 51217e69697fba92a06e07e16f55c9a52d8e8945 | HID: logitech: fix bounds checking on LED report size
The check on report size for REPORT_TYPE_LEDS in logi_dj_ll_raw_request()
is wrong; the current check doesn't make any sense -- the report allocated
by HID core in hid_hw_raw_request() can be much larger than
DJREPORT_SHORT_LENGTH, and currently logi_dj_ll_raw_requ... | false | 86d96bc7e344f6ad92242c0e3e8226fc | logi_dj_ll_raw_request | static int logi_dj_ll_raw_request(struct hid_device *hid,
unsigned char reportnum, __u8 *buf,
size_t count, unsigned char report_type,
int reqtype)
{
struct dj_device *djdev = hid->driver_data;
struct dj_receiver_dev *djrcv_dev = djdev->dj_receiver_dev;
u8 *out_buf;
int ret;
if (buf[0] != REPORT... | [[560, "\tif (count > DJREPORT_SHORT_LENGTH - 2)\n"]] | [[560, "if (count > DJREPORT_SHORT_LENGTH - 2)"]] | [
"CVE-2014-3183"
] | [
"CWE-119"
] | 112 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [
"count"
],
"Globals": [],
"Type Execution Declaration": [
"DJREPORT_SHORT_LENGTH"
]
} |
113 | linux | https://github.com/torvalds/linux | fs/smb/server/server.c | 536bb492d39bb6c080c92f31e8a55fe9934f452b | ksmbd: fix out of bounds in init_smb2_rsp_hdr()
If client send smb2 negotiate request and then send smb1 negotiate
request, init_smb2_rsp_hdr is called for smb1 negotiate request since
need_neg is set to false. This patch ignore smb1 packets after ->need_neg
is set to false.
Reported-by: zdi-disclosures@trendmicro.co... | true | 5e36469c5dc8e9495658a5889b519eac | queue_ksmbd_work | static int queue_ksmbd_work(struct ksmbd_conn *conn)
{
struct ksmbd_work *work;
work = ksmbd_alloc_work_struct();
if (!work) {
pr_err("allocation for work failed\n");
return -ENOMEM;
}
work->conn = conn;
work->request_buf = conn->request_buf;
conn->request_buf = NULL;
ksmbd_init_smb_server(work);
ksmbd... | [[300, "\tksmbd_init_smb_server(work);\n"]] | [[300, "ksmbd_init_smb_server(work);"]] | [
"CVE-2023-52441"
] | [
"CWE-119"
] | 114 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"ksmbd_init_smb_server"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": []
} |
114 | linux | https://github.com/torvalds/linux | fs/smb/server/server.c | 536bb492d39bb6c080c92f31e8a55fe9934f452b | ksmbd: fix out of bounds in init_smb2_rsp_hdr()
If client send smb2 negotiate request and then send smb1 negotiate
request, init_smb2_rsp_hdr is called for smb1 negotiate request since
need_neg is set to false. This patch ignore smb1 packets after ->need_neg
is set to false.
Reported-by: zdi-disclosures@trendmicro.co... | false | 284072c8f7cb7e656e097dbe3e1a7bf4 | queue_ksmbd_work | static int queue_ksmbd_work(struct ksmbd_conn *conn)
{
struct ksmbd_work *work;
int err;
work = ksmbd_alloc_work_struct();
if (!work) {
pr_err("allocation for work failed\n");
return -ENOMEM;
}
work->conn = conn;
work->request_buf = conn->request_buf;
conn->request_buf = NULL;
err = ksmbd_init_smb_serve... | [[289, "\tint err;\n"], [301, "\terr = ksmbd_init_smb_server(work);\n"], [302, "\tif (err) {\n"], [303, "\t\tksmbd_free_work_struct(work);\n"], [304, "\t\treturn 0;\n"], [305, "\t}\n"]] | [[289, "int err;"], [301, "err = ksmbd_init_smb_server(work);"], [302, "if (err)"], [303, "ksmbd_free_work_struct(work);"], [304, "return 0;"], [305, "\t}\n"]] | [
"CVE-2023-52441"
] | [
"CWE-119"
] | 114 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"ksmbd_init_smb_server"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": []
} |
115 | linux | https://github.com/torvalds/linux | fs/f2fs/namei.c | 53edb549565f55ccd0bdf43be3d66ce4c2d48b28 | f2fs: fix to avoid dirent corruption
As Al reported in link[1]:
f2fs_rename()
...
if (old_dir != new_dir && !whiteout)
f2fs_set_link(old_inode, old_dir_entry,
old_dir_page, new_dir);
else
f2fs_put_page(old_dir_page, 0);
You want correct inumber in the ".." link. And cross-directory
rename does move the s... | true | 1d9ec1a6693daa8c94133c49009c939a | f2fs_rename | static int f2fs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
struct dentry *old_dentry, struct inode *new_dir,
struct dentry *new_dentry, unsigned int flags)
{
struct f2fs_sb_info *sbi = F2FS_I_SB(old_dir);
struct inode *old_inode = d_inode(old_dentry);
struct inode *new_inode = d_inode(new_dentry);
... | [[1108, "\t\tif (old_dir != new_dir && !whiteout)\n"]] | [[1108, "if (old_dir != new_dir && !whiteout)"]] | [
"CVE-2023-52444"
] | [
"CWE-119"
] | 116 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"f2fs_set_link"
],
"Function Argument": [
"old_dir",
"new_dir",
"whiteout"
],
"Globals": [],
"Type Execution Declaration": []
} |
116 | linux | https://github.com/torvalds/linux | fs/f2fs/namei.c | 53edb549565f55ccd0bdf43be3d66ce4c2d48b28 | f2fs: fix to avoid dirent corruption
As Al reported in link[1]:
f2fs_rename()
...
if (old_dir != new_dir && !whiteout)
f2fs_set_link(old_inode, old_dir_entry,
old_dir_page, new_dir);
else
f2fs_put_page(old_dir_page, 0);
You want correct inumber in the ".." link. And cross-directory
rename does move the s... | false | fd1a3be0d0fe9fbe0ae442af6c95871e | f2fs_rename | static int f2fs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
struct dentry *old_dentry, struct inode *new_dir,
struct dentry *new_dentry, unsigned int flags)
{
struct f2fs_sb_info *sbi = F2FS_I_SB(old_dir);
struct inode *old_inode = d_inode(old_dentry);
struct inode *new_inode = d_inode(new_dentry);
... | [[1108, "\t\tif (old_dir != new_dir)\n"]] | [[1108, "if (old_dir != new_dir)"]] | [
"CVE-2023-52444"
] | [
"CWE-119"
] | 116 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"f2fs_set_link"
],
"Function Argument": [
"old_dir",
"new_dir",
"whiteout"
],
"Globals": [],
"Type Execution Declaration": []
} |
117 | linux | https://github.com/torvalds/linux | drivers/vhost/scsi.c | 59c816c1f24df0204e01851431d3bab3eb76719c | vhost/scsi: potential memory corruption
This code in vhost_scsi_make_tpg() is confusing because we limit "tpgt"
to UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16.
I looked at the context and it turns out that in
vhost_scsi_set_endpoint(), "tpg->tport_tpgt" is used as an offset into
the vs_tpg[] arr... | true | 8952913a9bbed95f41a05552655d2a83 | vhost_scsi_send_evt | static void
vhost_scsi_send_evt(struct vhost_scsi *vs,
struct vhost_scsi_tpg *tpg,
struct se_lun *lun,
u32 event,
u32 reason)
{
struct vhost_scsi_evt *evt;
evt = vhost_scsi_allocate_evt(vs, event, reason);
if (!evt)
return;
if (tpg && lun) {
/* TODO: share lun setup code with virtio-scsi.k... | [[1252, "\t\tevt->event.lun[1] = tpg->tport_tpgt & 0xFF;\n"]] | [[1252, "evt->event.lun[1] = tpg->tport_tpgt & 0xFF;"]] | [
"CVE-2015-4036"
] | [
"CWE-119"
] | 119 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": [
"struct vhost_scsi_tpg"
]
} |
118 | linux | https://github.com/torvalds/linux | drivers/vhost/scsi.c | 59c816c1f24df0204e01851431d3bab3eb76719c | vhost/scsi: potential memory corruption
This code in vhost_scsi_make_tpg() is confusing because we limit "tpgt"
to UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16.
I looked at the context and it turns out that in
vhost_scsi_set_endpoint(), "tpg->tport_tpgt" is used as an offset into
the vs_tpg[] arr... | true | 4b97a52f9ec3210008f4fa4c9154efcf | vhost_scsi_make_tpg | static struct se_portal_group *
vhost_scsi_make_tpg(struct se_wwn *wwn,
struct config_group *group,
const char *name)
{
struct vhost_scsi_tport *tport = container_of(wwn,
struct vhost_scsi_tport, tport_wwn);
struct vhost_scsi_tpg *tpg;
unsigned long tpgt;
int ret;
if (strstr(name, "tpgt_") != name)
... | [[2123, "\tunsigned long tpgt;\n"], [2128, "\tif (kstrtoul(name + 5, 10, &tpgt) || tpgt > UINT_MAX)\n"]] | [[2123, "unsigned long tpgt;"], [2128, "if (kstrtoul(name + 5, 10, &tpgt) || tpgt > UINT_MAX)"]] | [
"CVE-2015-4036"
] | [
"CWE-119"
] | 120 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [],
"Globals": [
"vhost_scsi_fabric_configfs",
"vhost_scsi_mutex",
"vhost_scsi_list"
],
"Type Execution Declaration": [
"struct vhost_scsi_tpg",
"VHOST_SCSI_MAX_TARGET"
]
} |
119 | linux | https://github.com/torvalds/linux | drivers/vhost/scsi.c | 59c816c1f24df0204e01851431d3bab3eb76719c | vhost/scsi: potential memory corruption
This code in vhost_scsi_make_tpg() is confusing because we limit "tpgt"
to UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16.
I looked at the context and it turns out that in
vhost_scsi_set_endpoint(), "tpg->tport_tpgt" is used as an offset into
the vs_tpg[] arr... | false | 872053bf5f47c0622561e5faf02ebcc5 | vhost_scsi_send_evt | static void
vhost_scsi_send_evt(struct vhost_scsi *vs,
struct vhost_scsi_tpg *tpg,
struct se_lun *lun,
u32 event,
u32 reason)
{
struct vhost_scsi_evt *evt;
evt = vhost_scsi_allocate_evt(vs, event, reason);
if (!evt)
return;
if (tpg && lun) {
/* TODO: share lun setup code with virtio-scsi.k... | [[1252, "\t\tevt->event.lun[1] = tpg->tport_tpgt;\n"]] | [[1252, "evt->event.lun[1] = tpg->tport_tpgt;"]] | [
"CVE-2015-4036"
] | [
"CWE-119"
] | 119 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": [
"struct vhost_scsi_tpg"
]
} |
120 | linux | https://github.com/torvalds/linux | drivers/vhost/scsi.c | 59c816c1f24df0204e01851431d3bab3eb76719c | vhost/scsi: potential memory corruption
This code in vhost_scsi_make_tpg() is confusing because we limit "tpgt"
to UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16.
I looked at the context and it turns out that in
vhost_scsi_set_endpoint(), "tpg->tport_tpgt" is used as an offset into
the vs_tpg[] arr... | false | f3593a1b10db4a52de4f9f5fdadfae1d | vhost_scsi_make_tpg | static struct se_portal_group *
vhost_scsi_make_tpg(struct se_wwn *wwn,
struct config_group *group,
const char *name)
{
struct vhost_scsi_tport *tport = container_of(wwn,
struct vhost_scsi_tport, tport_wwn);
struct vhost_scsi_tpg *tpg;
u16 tpgt;
int ret;
if (strstr(name, "tpgt_") != name)
return E... | [[2123, "\tu16 tpgt;\n"], [2128, "\tif (kstrtou16(name + 5, 10, &tpgt) || tpgt >= VHOST_SCSI_MAX_TARGET)\n"]] | [[2123, "u16 tpgt;"], [2128, "if (kstrtou16(name + 5, 10, &tpgt) || tpgt >= VHOST_SCSI_MAX_TARGET)"]] | [
"CVE-2015-4036"
] | [
"CWE-119"
] | 120 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [],
"Globals": [
"vhost_scsi_fabric_configfs",
"vhost_scsi_mutex",
"vhost_scsi_list"
],
"Type Execution Declaration": [
"struct vhost_scsi_tpg",
"VHOST_SCSI_MAX_TARGET"
]
} |
121 | linux | https://github.com/torvalds/linux | mm/mremap.c | 5bfea2d9b17f1034a68147a8b03b9789af5700f9 | mm: Fix mremap not considering huge pmd devmap
The original code in mm/mremap.c checks huge pmd by:
if (is_swap_pmd(*old_pmd) || pmd_trans_huge(*old_pmd)) {
However, a DAX mapped nvdimm is mapped as huge page (by default) but it
is not transparent huge page (_PAGE_PSE | PAGE_DEVMAP). This commit
changes the condi... | true | 5118191e87ea22a97097f197232d33e0 | move_page_tables | unsigned long move_page_tables(struct vm_area_struct *vma,
unsigned long old_addr, struct vm_area_struct *new_vma,
unsigned long new_addr, unsigned long len,
bool need_rmap_locks)
{
unsigned long extent, next, old_end;
struct mmu_notifier_range range;
pmd_t *old_pmd, *new_pmd;
old_end = old_addr + len;
flus... | [[269, "\t\tif (is_swap_pmd(*old_pmd) || pmd_trans_huge(*old_pmd)) {\n"]] | [[269, "if (is_swap_pmd(*old_pmd) || pmd_trans_huge(*old_pmd))"]] | [
"CVE-2020-10757"
] | [
"CWE-119"
] | 122 | {
"Execution Environment": [
"DAX enabled storage (devmap-enabled huge pages)"
],
"Explanation": null,
"External Function": [
"is_swap_pmd",
"pmd_trans_huge",
"pmd_devmap"
],
"Function Argument": [],
"Globals": [
"PMD_SIZE",
"PMD_MASK",
"HPAGE_PMD_SIZE"
],
"Type Execution D... |
122 | linux | https://github.com/torvalds/linux | mm/mremap.c | 5bfea2d9b17f1034a68147a8b03b9789af5700f9 | mm: Fix mremap not considering huge pmd devmap
The original code in mm/mremap.c checks huge pmd by:
if (is_swap_pmd(*old_pmd) || pmd_trans_huge(*old_pmd)) {
However, a DAX mapped nvdimm is mapped as huge page (by default) but it
is not transparent huge page (_PAGE_PSE | PAGE_DEVMAP). This commit
changes the condi... | false | 6049c34954196b8890f89c82e2b357db | move_page_tables | unsigned long move_page_tables(struct vm_area_struct *vma,
unsigned long old_addr, struct vm_area_struct *new_vma,
unsigned long new_addr, unsigned long len,
bool need_rmap_locks)
{
unsigned long extent, next, old_end;
struct mmu_notifier_range range;
pmd_t *old_pmd, *new_pmd;
old_end = old_addr + len;
flus... | [[269, "\t\tif (is_swap_pmd(*old_pmd) || pmd_trans_huge(*old_pmd) || pmd_devmap(*old_pmd)) {\n"]] | [[269, "if (is_swap_pmd(*old_pmd) || pmd_trans_huge(*old_pmd) || pmd_devmap(*old_pmd))"]] | [
"CVE-2020-10757"
] | [
"CWE-119"
] | 122 | {
"Execution Environment": [
"DAX enabled storage (devmap-enabled huge pages)"
],
"Explanation": null,
"External Function": [
"is_swap_pmd",
"pmd_trans_huge",
"pmd_devmap"
],
"Function Argument": [],
"Globals": [
"PMD_SIZE",
"PMD_MASK",
"HPAGE_PMD_SIZE"
],
"Type Execution D... |
123 | linux | https://github.com/torvalds/linux | fs/cifs/file.c | 5d81de8e8667da7135d3a32a964087c0faf5483f | cifs: ensure that uncached writes handle unmapped areas correctly
It's possible for userland to pass down an iovec via writev() that has a
bogus user pointer in it. If that happens and we're doing an uncached
write, then we can end up getting less bytes than we expect from the
call to iov_iter_copy_from_user. This is ... | true | 1dd1be60789caa0b5a33d5a2840d9231 | cifs_iovec_write | static ssize_t
cifs_iovec_write(struct file *file, const struct iovec *iov,
unsigned long nr_segs, loff_t *poffset)
{
unsigned long nr_pages, i;
size_t copied, len, cur_len;
ssize_t total_written = 0;
loff_t offset;
struct iov_iter it;
struct cifsFileInfo *open_file;
struct cifs_tcon *tcon;
struct cifs_sb_in... | [[2392, "\tsize_t copied, len, cur_len;\n"], [2447, "\t\t\tcopied = min_t(const size_t, cur_len, PAGE_SIZE);\n"], [2449, "\t\t\t\t\t\t\t 0, copied);\n"]] | [[2392, "size_t copied, len, cur_len;"], [2447, "copied = min_t(const size_t, cur_len, PAGE_SIZE);"], [2448, "copied = iov_iter_copy_from_user(wdata->pages[i], &it,\n\t\t\t\t\t\t\t 0, copied);"]] | [
"CVE-2014-0069"
] | [
"CWE-119"
] | 124 | {
"Execution Environment": [
"user-supplied iovec"
],
"Explanation": null,
"External Function": [
"iov_length",
"generic_write_checks",
"CIFS_SB",
"tlink_tcon",
"get_numpages",
"cifs_writedata_alloc",
"cifs_write_allocate_pages",
"iov_iter_init",
"iov_iter_copy_from_user"... |
124 | linux | https://github.com/torvalds/linux | fs/cifs/file.c | 5d81de8e8667da7135d3a32a964087c0faf5483f | cifs: ensure that uncached writes handle unmapped areas correctly
It's possible for userland to pass down an iovec via writev() that has a
bogus user pointer in it. If that happens and we're doing an uncached
write, then we can end up getting less bytes than we expect from the
call to iov_iter_copy_from_user. This is ... | false | bad6655619683b8743c0b742bf455589 | cifs_iovec_write | static ssize_t
cifs_iovec_write(struct file *file, const struct iovec *iov,
unsigned long nr_segs, loff_t *poffset)
{
unsigned long nr_pages, i;
size_t bytes, copied, len, cur_len;
ssize_t total_written = 0;
loff_t offset;
struct iov_iter it;
struct cifsFileInfo *open_file;
struct cifs_tcon *tcon;
struct cif... | [[2392, "\tsize_t bytes, copied, len, cur_len;\n"], [2447, "\t\t\tbytes = min_t(const size_t, cur_len, PAGE_SIZE);\n"], [2449, "\t\t\t\t\t\t\t 0, bytes);\n"], [2452, "\t\t\t/*\n"], [2453, "\t\t\t * If we didn't copy as much as we expected, then that\n"], [2454, "\t\t\t * may mean we trod into an unmapped area. Stop cop... | [[2392, "size_t bytes, copied, len, cur_len;"], [2447, "bytes = min_t(const size_t, cur_len, PAGE_SIZE);"], [2448, "copied = iov_iter_copy_from_user(wdata->pages[i], &it,\n\t\t\t\t\t\t\t 0, bytes);"], [2452, "/*\n\t\t\t * If we didn't copy as much as we expected, then that\n\t\t\t * may mean we trod into an unmapped ar... | [
"CVE-2014-0069"
] | [
"CWE-119"
] | 124 | {
"Execution Environment": [
"user-supplied iovec"
],
"Explanation": null,
"External Function": [
"iov_length",
"generic_write_checks",
"CIFS_SB",
"tlink_tcon",
"get_numpages",
"cifs_writedata_alloc",
"cifs_write_allocate_pages",
"iov_iter_init",
"iov_iter_copy_from_user"... |
125 | linux | https://github.com/torvalds/linux | drivers/media/usb/dvb-usb/dw2102.c | 606142af57dad981b78707234cfbd15f9f7b7125 | [media] dw2102: don't do DMA on stack
On Kernel 4.9, WARNINGs about doing DMA on stack are hit at
the dw2102 driver: one in su3000_power_ctrl() and the other in tt_s2_4600_frontend_attach().
Both were due to the use of buffers on the stack as parameters to
dvb_usb_generic_rw() and the resulting attempt to do DMA with... | true | 06e83fe1f71cdbd3460b6576c4caf3c3 | su3000_i2c_transfer | static int su3000_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
int num)
{
struct dvb_usb_device *d = i2c_get_adapdata(adap);
u8 obuf[0x40], ibuf[0x40];
if (!d)
return -ENODEV;
if (mutex_lock_interruptible(&d->i2c_mutex) < 0)
return -EAGAIN;
switch (num) {
case 1:
switch (msg[0].add... | [[664, "\tu8 obuf[0x40], ibuf[0x40];\n"], [675, "\t\t\tobuf[0] = msg[0].buf[0] + 0x36;\n"], [676, "\t\t\tobuf[1] = 3;\n"], [677, "\t\t\tobuf[2] = 0;\n"], [678, "\t\t\tif (dvb_usb_generic_rw(d, obuf, 3, ibuf, 0, 0) < 0)\n"], [682, "\t\t\tobuf[0] = 0x10;\n"], [683, "\t\t\tif (dvb_usb_generic_rw(d, obuf, 1, ibuf, 2, 0) < ... | [[664, "u8 obuf[0x40], ibuf[0x40];"], [675, "obuf[0] = msg[0].buf[0] + 0x36;"], [676, "obuf[1] = 3;"], [677, "obuf[2] = 0;"], [678, "if (dvb_usb_generic_rw(d, obuf, 3, ibuf, 0, 0) < 0)"], [682, "obuf[0] = 0x10;"], [683, "if (dvb_usb_generic_rw(d, obuf, 1, ibuf, 2, 0) < 0)"], [685, "msg[0].buf[1] = ibuf[0];"], [686, "ms... | [
"CVE-2017-8062"
] | [
"CWE-119"
] | 128 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"i2c_get_adapdata",
"dvb_usb_generic_rw"
],
"Function Argument": [
"struct i2c_adapter *adap",
"struct i2c_msg msg[]",
"int num"
],
"Globals": [
"SU3000_STREAM_CTRL",
"DW2102_RC_QUERY"
],
"Type Execu... |
126 | linux | https://github.com/torvalds/linux | drivers/media/usb/dvb-usb/dw2102.c | 606142af57dad981b78707234cfbd15f9f7b7125 | [media] dw2102: don't do DMA on stack
On Kernel 4.9, WARNINGs about doing DMA on stack are hit at
the dw2102 driver: one in su3000_power_ctrl() and the other in tt_s2_4600_frontend_attach().
Both were due to the use of buffers on the stack as parameters to
dvb_usb_generic_rw() and the resulting attempt to do DMA with... | true | a9203500d916004c17e50f2bfa2eb36b | su3000_power_ctrl | static int su3000_power_ctrl(struct dvb_usb_device *d, int i)
{
struct dw2102_state *state = (struct dw2102_state *)d->priv;
u8 obuf[] = {0xde, 0};
info("%s: %d, initialized %d", __func__, i, state->initialized);
if (i && !state->initialized) {
state->initialized = 1;
/* reset board */
return dvb_usb_generi... | [[847, "\tu8 obuf[] = {0xde, 0};\n"], [854, "\t\treturn dvb_usb_generic_rw(d, obuf, 2, NULL, 0, 0);\n"], [857, "\treturn 0;\n"]] | [[847, "u8 obuf[] = {0xde, 0};"], [854, "return dvb_usb_generic_rw(d, obuf, 2, NULL, 0, 0);"], [857, "return 0;"]] | [
"CVE-2017-8062"
] | [
"CWE-119"
] | 129 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"dvb_usb_generic_rw"
],
"Function Argument": [
"d"
],
"Globals": [],
"Type Execution Declaration": [
"struct dvb_usb_device",
"struct dw2102_state"
]
} |
127 | linux | https://github.com/torvalds/linux | drivers/media/usb/dvb-usb/dw2102.c | 606142af57dad981b78707234cfbd15f9f7b7125 | [media] dw2102: don't do DMA on stack
On Kernel 4.9, WARNINGs about doing DMA on stack are hit at
the dw2102 driver: one in su3000_power_ctrl() and the other in tt_s2_4600_frontend_attach().
Both were due to the use of buffers on the stack as parameters to
dvb_usb_generic_rw() and the resulting attempt to do DMA with... | true | 0087dc85f15020c5064b055fd3f8285d | tt_s2_4600_frontend_attach | static int tt_s2_4600_frontend_attach(struct dvb_usb_adapter *adap)
{
struct dvb_usb_device *d = adap->dev;
struct dw2102_state *state = d->priv;
u8 obuf[3] = { 0xe, 0x80, 0 };
u8 ibuf[] = { 0 };
struct i2c_adapter *i2c_adapter;
struct i2c_client *client;
struct i2c_board_info board_info;
struct m88ds3103_platf... | [[1442, "\tu8 obuf[3] = { 0xe, 0x80, 0 };\n"], [1443, "\tu8 ibuf[] = { 0 };\n"], [1450, "\tif (dvb_usb_generic_rw(d, obuf, 3, ibuf, 1, 0) < 0)\n"], [1453, "\tobuf[0] = 0xe;\n"], [1454, "\tobuf[1] = 0x02;\n"], [1455, "\tobuf[2] = 1;\n"], [1457, "\tif (dvb_usb_generic_rw(d, obuf, 3, ibuf, 1, 0) < 0)\n"], [1461, "\tobuf[0... | [[1442, "u8 obuf[3] = { 0xe, 0x80, 0 };"], [1443, "u8 ibuf[] = { 0 };"], [1450, "if (dvb_usb_generic_rw(d, obuf, 3, ibuf, 1, 0) < 0)"], [1453, "obuf[0] = 0xe;"], [1454, "obuf[1] = 0x02;"], [1455, "obuf[2] = 1;"], [1457, "if (dvb_usb_generic_rw(d, obuf, 3, ibuf, 1, 0) < 0)"], [1461, "obuf[0] = 0xe;"], [1462, "obuf[1] = ... | [
"CVE-2017-8062"
] | [
"CWE-119"
] | 130 | {
"Execution Environment": [
"CONFIG_VMAP_STACK"
],
"Explanation": null,
"External Function": [
"dvb_usb_generic_rw"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": [
"struct dw2102_state"
]
} |
128 | linux | https://github.com/torvalds/linux | drivers/media/usb/dvb-usb/dw2102.c | 606142af57dad981b78707234cfbd15f9f7b7125 | [media] dw2102: don't do DMA on stack
On Kernel 4.9, WARNINGs about doing DMA on stack are hit at
the dw2102 driver: one in su3000_power_ctrl() and the other in tt_s2_4600_frontend_attach().
Both were due to the use of buffers on the stack as parameters to
dvb_usb_generic_rw() and the resulting attempt to do DMA with... | false | 61f203e8e048fa6d65519c9f4f8c001a | su3000_i2c_transfer | static int su3000_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
int num)
{
struct dvb_usb_device *d = i2c_get_adapdata(adap);
struct dw2102_state *state;
if (!d)
return -ENODEV;
state = d->priv;
if (mutex_lock_interruptible(&d->i2c_mutex) < 0)
return -EAGAIN;
if (mutex_lock_interrupt... | [[665, "\tstruct dw2102_state *state;\n"], [669, "\n"], [670, "\tstate = d->priv;\n"], [671, "\n"], [674, "\tif (mutex_lock_interruptible(&d->data_mutex) < 0) {\n"], [675, "\t\tmutex_unlock(&d->i2c_mutex);\n"], [676, "\t\treturn -EAGAIN;\n"], [677, "\t}\n"], [683, "\t\t\tstate->data[0] = msg[0].buf[0] + 0x36;\n"], [684... | [[665, "struct dw2102_state *state;"], [669, "\n"], [670, "state = d->priv;"], [671, "\n"], [674, "if (mutex_lock_interruptible(&d->data_mutex) < 0)"], [675, "mutex_unlock(&d->i2c_mutex);"], [676, "return -EAGAIN;"], [677, "\t}\n"], [683, "state->data[0] = msg[0].buf[0] + 0x36;"], [684, "state->data[1] = 3;"], [685, "s... | [
"CVE-2017-8062"
] | [
"CWE-119"
] | 128 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"i2c_get_adapdata",
"dvb_usb_generic_rw"
],
"Function Argument": [
"struct i2c_adapter *adap",
"struct i2c_msg msg[]",
"int num"
],
"Globals": [
"SU3000_STREAM_CTRL",
"DW2102_RC_QUERY"
],
"Type Execu... |
129 | linux | https://github.com/torvalds/linux | drivers/media/usb/dvb-usb/dw2102.c | 606142af57dad981b78707234cfbd15f9f7b7125 | [media] dw2102: don't do DMA on stack
On Kernel 4.9, WARNINGs about doing DMA on stack are hit at
the dw2102 driver: one in su3000_power_ctrl() and the other in tt_s2_4600_frontend_attach().
Both were due to the use of buffers on the stack as parameters to
dvb_usb_generic_rw() and the resulting attempt to do DMA with... | false | b0be1dc36e1fe66b5cb855cf8490946e | su3000_power_ctrl | static int su3000_power_ctrl(struct dvb_usb_device *d, int i)
{
struct dw2102_state *state = (struct dw2102_state *)d->priv;
int ret = 0;
info("%s: %d, initialized %d", __func__, i, state->initialized);
if (i && !state->initialized) {
mutex_lock(&d->data_mutex);
state->data[0] = 0xde;
state->data[1] = 0;
... | [[858, "\tint ret = 0;\n"], [863, "\t\tmutex_lock(&d->data_mutex);\n"], [864, "\n"], [865, "\t\tstate->data[0] = 0xde;\n"], [866, "\t\tstate->data[1] = 0;\n"], [867, "\n"], [870, "\t\tret = dvb_usb_generic_rw(d, state->data, 2, NULL, 0, 0);\n"], [871, "\t\tmutex_unlock(&d->data_mutex);\n"], [874, "\treturn ret;\n"]] | [[858, "int ret = 0;"], [863, "mutex_lock(&d->data_mutex);"], [864, "\n"], [865, "state->data[0] = 0xde;"], [866, "state->data[1] = 0;"], [867, "\n"], [870, "ret = dvb_usb_generic_rw(d, state->data, 2, NULL, 0, 0);"], [871, "mutex_unlock(&d->data_mutex);"], [874, "return ret;"]] | [
"CVE-2017-8062"
] | [
"CWE-119"
] | 129 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"dvb_usb_generic_rw"
],
"Function Argument": [
"d"
],
"Globals": [],
"Type Execution Declaration": [
"struct dvb_usb_device",
"struct dw2102_state"
]
} |
130 | linux | https://github.com/torvalds/linux | drivers/media/usb/dvb-usb/dw2102.c | 606142af57dad981b78707234cfbd15f9f7b7125 | [media] dw2102: don't do DMA on stack
On Kernel 4.9, WARNINGs about doing DMA on stack are hit at
the dw2102 driver: one in su3000_power_ctrl() and the other in tt_s2_4600_frontend_attach().
Both were due to the use of buffers on the stack as parameters to
dvb_usb_generic_rw() and the resulting attempt to do DMA with... | false | 7863aba5ee3d396e428e4525c5619823 | tt_s2_4600_frontend_attach | static int tt_s2_4600_frontend_attach(struct dvb_usb_adapter *adap)
{
struct dvb_usb_device *d = adap->dev;
struct dw2102_state *state = d->priv;
struct i2c_adapter *i2c_adapter;
struct i2c_client *client;
struct i2c_board_info board_info;
struct m88ds3103_platform_data m88ds3103_pdata = {};
struct ts2020_config... | [[1488, "\tmutex_lock(&d->data_mutex);\n"], [1489, "\n"], [1490, "\tstate->data[0] = 0xe;\n"], [1491, "\tstate->data[1] = 0x80;\n"], [1492, "\tstate->data[2] = 0x0;\n"], [1493, "\n"], [1494, "\tif (dvb_usb_generic_rw(d, state->data, 3, state->data, 1, 0) < 0)\n"], [1497, "\tstate->data[0] = 0xe;\n"], [1498, "\tstate->d... | [[1488, "mutex_lock(&d->data_mutex);"], [1489, "\n"], [1490, "state->data[0] = 0xe;"], [1491, "state->data[1] = 0x80;"], [1492, "state->data[2] = 0x0;"], [1493, "\n"], [1494, "if (dvb_usb_generic_rw(d, state->data, 3, state->data, 1, 0) < 0)"], [1497, "state->data[0] = 0xe;"], [1498, "state->data[1] = 0x02;"], [1499, "... | [
"CVE-2017-8062"
] | [
"CWE-119"
] | 130 | {
"Execution Environment": [
"CONFIG_VMAP_STACK"
],
"Explanation": null,
"External Function": [
"dvb_usb_generic_rw"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": [
"struct dw2102_state"
]
} |
131 | linux | https://github.com/torvalds/linux | kernel/bpf/hashtab.c | 6787d916c2cf9850c97a0a3f73e08c43e7d973b1 | bpf: Fix hashtab overflow check on 32-bit arches
The hashtab code relies on roundup_pow_of_two() to compute the number of
hash buckets, and contains an overflow check by checking if the
resulting value is 0. However, on 32-bit arches, the roundup code itself
can overflow by doing a 32-bit left-shift of an unsigned lon... | true | 6a371d175e5ab42605635e33ad44143e | htab_map_alloc | static struct bpf_map *htab_map_alloc(union bpf_attr *attr)
{
bool percpu = (attr->map_type == BPF_MAP_TYPE_PERCPU_HASH ||
attr->map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH);
bool lru = (attr->map_type == BPF_MAP_TYPE_LRU_HASH ||
attr->map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH);
/* percpu_lru means each c... | [[502, "\t/* hash table size must be power of 2 */\n"], [512, "\terr = -E2BIG;\n"], [513, "\t/* prevent zero size kmalloc and check for u32 overflow */\n"], [514, "\tif (htab->n_buckets == 0 ||\n"], [515, "\t htab->n_buckets > U32_MAX / sizeof(struct bucket))\n"]] | [[502, "/* hash table size must be power of 2 */"], [512, "err = -E2BIG;"], [513, "/* prevent zero size kmalloc and check for u32 overflow */"], [514, "if (htab->n_buckets == 0 ||\n\t htab->n_buckets > U32_MAX / sizeof(struct bucket))"]] | [
"CVE-2024-26884"
] | [
"CWE-190",
"CWE-119"
] | 132 | {
"Execution Environment": [
"Architecture Bitness (32-bit vs 64-bit)"
],
"Explanation": null,
"External Function": [
"roundup_pow_of_two"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": []
} |
132 | linux | https://github.com/torvalds/linux | kernel/bpf/hashtab.c | 6787d916c2cf9850c97a0a3f73e08c43e7d973b1 | bpf: Fix hashtab overflow check on 32-bit arches
The hashtab code relies on roundup_pow_of_two() to compute the number of
hash buckets, and contains an overflow check by checking if the
resulting value is 0. However, on 32-bit arches, the roundup code itself
can overflow by doing a 32-bit left-shift of an unsigned lon... | false | 884a1fce89250eb22ddca854e3835f57 | htab_map_alloc | static struct bpf_map *htab_map_alloc(union bpf_attr *attr)
{
bool percpu = (attr->map_type == BPF_MAP_TYPE_PERCPU_HASH ||
attr->map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH);
bool lru = (attr->map_type == BPF_MAP_TYPE_LRU_HASH ||
attr->map_type == BPF_MAP_TYPE_LRU_PERCPU_HASH);
/* percpu_lru means each c... | [[502, "\t/* hash table size must be power of 2; roundup_pow_of_two() can overflow\n"], [503, "\t * into UB on 32-bit arches, so check that first\n"], [504, "\t */\n"], [505, "\terr = -E2BIG;\n"], [506, "\tif (htab->map.max_entries > 1UL << 31)\n"], [507, "\t\tgoto free_htab;\n"], [508, "\n"], [518, "\t/* check for u32... | [[502, "/* hash table size must be power of 2; roundup_pow_of_two() can overflow\n\t * into UB on 32-bit arches, so check that first\n\t */"], [505, "err = -E2BIG;"], [506, "if (htab->map.max_entries > 1UL << 31)"], [507, "goto free_htab;"], [508, "\n"], [518, "/* check for u32 overflow */"], [519, "if (htab->n_buckets... | [
"CVE-2024-26884"
] | [
"CWE-190",
"CWE-119"
] | 132 | {
"Execution Environment": [
"Architecture Bitness (32-bit vs 64-bit)"
],
"Explanation": null,
"External Function": [
"roundup_pow_of_two"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": []
} |
133 | linux | https://github.com/torvalds/linux | drivers/media/usb/dvb-usb/dvb-usb-firmware.c | 67b0503db9c29b04eadfeede6bebbfe5ddad94ef | [media] dvb-usb-firmware: don't do DMA on stack
The buffer allocation for the firmware data was changed in
commit 43fab9793c1f ("[media] dvb-usb: don't use stack for firmware load")
but the same applies for the reset value.
Fixes: 43fab9793c1f ("[media] dvb-usb: don't use stack for firmware load")
Cc: stable@vger.ker... | true | 209e667be59e4bb3a4f2da52f51496b8 | usb_cypress_load_firmware | int usb_cypress_load_firmware(struct usb_device *udev, const struct firmware *fw, int type)
{
struct hexline *hx;
u8 reset;
int ret,pos=0;
hx = kmalloc(sizeof(*hx), GFP_KERNEL);
if (!hx)
return -ENOMEM;
/* stop the CPU */
reset = 1;
if ((ret = usb_cypress_writemem(udev,cypress[type].cpu_cs_register,&reset,1... | [[39, "\tu8 reset;\n"], [40, "\tint ret,pos=0;\n"], [42, "\thx = kmalloc(sizeof(*hx), GFP_KERNEL);\n"], [43, "\tif (!hx)\n"], [47, "\treset = 1;\n"], [48, "\tif ((ret = usb_cypress_writemem(udev,cypress[type].cpu_cs_register,&reset,1)) != 1)\n"], [64, "\t\tkfree(hx);\n"], [70, "\t\treset = 0;\n"], [71, "\t\tif (ret || ... | [[39, "u8 reset;"], [40, "int ret,pos=0;"], [42, "hx = kmalloc(sizeof(*hx), GFP_KERNEL);"], [43, "if (!hx)"], [47, "reset = 1;"], [48, "if ((ret = usb_cypress_writemem(udev,cypress[type].cpu_cs_register,&reset,1)) != 1)"], [64, "kfree(hx);"], [70, "reset = 0;"], [71, "if (ret || usb_cypress_writemem(udev,cypress[type].... | [
"CVE-2017-8061"
] | [
"CWE-119"
] | 134 | {
"Execution Environment": [
"CONFIG_VMAP_STACK option and DMA implementation"
],
"Explanation": null,
"External Function": [
"usb_cypress_writemem",
"dvb_usb_get_hexline"
],
"Function Argument": [
"udev",
"fw",
"type"
],
"Globals": [
"cypress"
],
"Type Execution Declarat... |
134 | linux | https://github.com/torvalds/linux | drivers/media/usb/dvb-usb/dvb-usb-firmware.c | 67b0503db9c29b04eadfeede6bebbfe5ddad94ef | [media] dvb-usb-firmware: don't do DMA on stack
The buffer allocation for the firmware data was changed in
commit 43fab9793c1f ("[media] dvb-usb: don't use stack for firmware load")
but the same applies for the reset value.
Fixes: 43fab9793c1f ("[media] dvb-usb: don't use stack for firmware load")
Cc: stable@vger.ker... | false | d11ce8e26e65ad3347cd20f401b677f2 | usb_cypress_load_firmware | int usb_cypress_load_firmware(struct usb_device *udev, const struct firmware *fw, int type)
{
struct hexline *hx;
u8 *buf;
int ret, pos = 0;
u16 cpu_cs_register = cypress[type].cpu_cs_register;
buf = kmalloc(sizeof(*hx), GFP_KERNEL);
if (!buf)
return -ENOMEM;
hx = (struct hexline *)buf;
/* stop the CPU */
... | [[39, "\tu8 *buf;\n"], [40, "\tint ret, pos = 0;\n"], [41, "\tu16 cpu_cs_register = cypress[type].cpu_cs_register;\n"], [43, "\tbuf = kmalloc(sizeof(*hx), GFP_KERNEL);\n"], [44, "\tif (!buf)\n"], [46, "\thx = (struct hexline *)buf;\n"], [49, "\tbuf[0] = 1;\n"], [50, "\tif (usb_cypress_writemem(udev, cpu_cs_register, bu... | [[39, "u8 *buf;"], [40, "int ret, pos = 0;"], [41, "u16 cpu_cs_register = cypress[type].cpu_cs_register;"], [43, "buf = kmalloc(sizeof(*hx), GFP_KERNEL);"], [44, "if (!buf)"], [46, "hx = (struct hexline *)buf;"], [49, "buf[0] = 1;"], [50, "if (usb_cypress_writemem(udev, cpu_cs_register, buf, 1) != 1)"], [66, "kfree(buf... | [
"CVE-2017-8061"
] | [
"CWE-119"
] | 134 | {
"Execution Environment": [
"CONFIG_VMAP_STACK option and DMA implementation"
],
"Explanation": null,
"External Function": [
"usb_cypress_writemem",
"dvb_usb_get_hexline"
],
"Function Argument": [
"udev",
"fw",
"type"
],
"Globals": [
"cypress"
],
"Type Execution Declarat... |
135 | linux | https://github.com/torvalds/linux | net/core/devlink.c | 6b4db2e528f650c7fb712961aac36455468d5902 | devlink: Fix use-after-free after a failed reload
After a failed devlink reload, devlink parameters are still registered,
which means user space can set and get their values. In the case of the
mlxsw "acl_region_rehash_interval" parameter, these operations will
trigger a use-after-free [1].
Fix this by rejecting set ... | true | 332fe4e8e419ce46548f66d64159f2e2 | devlink_param_get | static int devlink_param_get(struct devlink *devlink,
const struct devlink_param *param,
struct devlink_param_gset_ctx *ctx)
{
if (!param->get)
return -EOPNOTSUPP;
return param->get(devlink, param->id, ctx);
}
| [[5150, "\tif (!param->get)\n"]] | [[5150, "if (!param->get)"]] | [
"CVE-2022-3625"
] | [
"CWE-416",
"CWE-119"
] | 137 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [
"devlink"
],
"Globals": [],
"Type Execution Declaration": []
} |
136 | linux | https://github.com/torvalds/linux | net/core/devlink.c | 6b4db2e528f650c7fb712961aac36455468d5902 | devlink: Fix use-after-free after a failed reload
After a failed devlink reload, devlink parameters are still registered,
which means user space can set and get their values. In the case of the
mlxsw "acl_region_rehash_interval" parameter, these operations will
trigger a use-after-free [1].
Fix this by rejecting set ... | true | 2c9ab9a21f796fca871271041f486d11 | devlink_param_set | static int devlink_param_set(struct devlink *devlink,
const struct devlink_param *param,
struct devlink_param_gset_ctx *ctx)
{
if (!param->set)
return -EOPNOTSUPP;
return param->set(devlink, param->id, ctx);
}
| [[5159, "\tif (!param->set)\n"]] | [[5159, "if (!param->set)"]] | [
"CVE-2022-3625"
] | [
"CWE-416",
"CWE-119"
] | 138 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [
"devlink",
"param"
],
"Globals": [],
"Type Execution Declaration": []
} |
137 | linux | https://github.com/torvalds/linux | net/core/devlink.c | 6b4db2e528f650c7fb712961aac36455468d5902 | devlink: Fix use-after-free after a failed reload
After a failed devlink reload, devlink parameters are still registered,
which means user space can set and get their values. In the case of the
mlxsw "acl_region_rehash_interval" parameter, these operations will
trigger a use-after-free [1].
Fix this by rejecting set ... | false | 4f12478cc986ec9b1bc853d70f853a27 | devlink_param_get | static int devlink_param_get(struct devlink *devlink,
const struct devlink_param *param,
struct devlink_param_gset_ctx *ctx)
{
if (!param->get || devlink->reload_failed)
return -EOPNOTSUPP;
return param->get(devlink, param->id, ctx);
}
| [[5150, "\tif (!param->get || devlink->reload_failed)\n"]] | [[5150, "if (!param->get || devlink->reload_failed)"]] | [
"CVE-2022-3625"
] | [
"CWE-416",
"CWE-119"
] | 137 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [
"devlink"
],
"Globals": [],
"Type Execution Declaration": []
} |
138 | linux | https://github.com/torvalds/linux | net/core/devlink.c | 6b4db2e528f650c7fb712961aac36455468d5902 | devlink: Fix use-after-free after a failed reload
After a failed devlink reload, devlink parameters are still registered,
which means user space can set and get their values. In the case of the
mlxsw "acl_region_rehash_interval" parameter, these operations will
trigger a use-after-free [1].
Fix this by rejecting set ... | false | 3fc87086b1b6f0ac87a240c57fec1784 | devlink_param_set | static int devlink_param_set(struct devlink *devlink,
const struct devlink_param *param,
struct devlink_param_gset_ctx *ctx)
{
if (!param->set || devlink->reload_failed)
return -EOPNOTSUPP;
return param->set(devlink, param->id, ctx);
}
| [[5159, "\tif (!param->set || devlink->reload_failed)\n"]] | [[5159, "if (!param->set || devlink->reload_failed)"]] | [
"CVE-2022-3625"
] | [
"CWE-416",
"CWE-119"
] | 138 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [
"devlink",
"param"
],
"Globals": [],
"Type Execution Declaration": []
} |
139 | linux | https://github.com/torvalds/linux | net/sunrpc/xdr.c | 6d1c0f3d28f98ea2736128ed3e46821496dc3a8c | sunrpc: Avoid a KASAN slab-out-of-bounds bug in xdr_set_page_base()
This seems to happen fairly easily during READ_PLUS testing on NFS v4.2.
I found that we could end up accessing xdr->buf->pages[pgnr] with a pgnr
greater than the number of pages in the array. So let's just return
early if we're setting base to a poin... | true | a12922cd568461ba8d12592f0335bbd7 | xdr_set_page_base | static unsigned int xdr_set_page_base(struct xdr_stream *xdr,
unsigned int base, unsigned int len)
{
unsigned int pgnr;
unsigned int maxlen;
unsigned int pgoff;
unsigned int pgend;
void *kaddr;
maxlen = xdr->buf->page_len;
if (base >= maxlen) {
base = maxlen;
maxlen = 0;
} else
maxlen -= base;
... | [[1233, "\tif (base >= maxlen) {\n"], [1234, "\t\tbase = maxlen;\n"], [1235, "\t\tmaxlen = 0;\n"], [1236, "\t} else\n"]] | [[1233, "if (base >= maxlen)"], [1234, "base = maxlen;"], [1235, "maxlen = 0;"], [1236, "else"]] | [
"CVE-2021-38201"
] | [
"CWE-119"
] | 140 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"page_address"
],
"Function Argument": [],
"Globals": [
"PAGE_SHIFT",
"PAGE_SIZE",
"PAGE_MASK"
],
"Type Execution Declaration": [
"struct xdr_stream",
"struct xdr_buf"
]
} |
140 | linux | https://github.com/torvalds/linux | net/sunrpc/xdr.c | 6d1c0f3d28f98ea2736128ed3e46821496dc3a8c | sunrpc: Avoid a KASAN slab-out-of-bounds bug in xdr_set_page_base()
This seems to happen fairly easily during READ_PLUS testing on NFS v4.2.
I found that we could end up accessing xdr->buf->pages[pgnr] with a pgnr
greater than the number of pages in the array. So let's just return
early if we're setting base to a poin... | false | ab296642237db4cbcbef1c1df0e7217a | xdr_set_page_base | static unsigned int xdr_set_page_base(struct xdr_stream *xdr,
unsigned int base, unsigned int len)
{
unsigned int pgnr;
unsigned int maxlen;
unsigned int pgoff;
unsigned int pgend;
void *kaddr;
maxlen = xdr->buf->page_len;
if (base >= maxlen)
return 0;
else
maxlen -= base;
if (len > maxlen)
le... | [[1233, "\tif (base >= maxlen)\n"], [1234, "\t\treturn 0;\n"], [1235, "\telse\n"]] | [[1233, "if (base >= maxlen)"], [1234, "return 0;"], [1235, "else"]] | [
"CVE-2021-38201"
] | [
"CWE-119"
] | 140 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"page_address"
],
"Function Argument": [],
"Globals": [
"PAGE_SHIFT",
"PAGE_SIZE",
"PAGE_MASK"
],
"Type Execution Declaration": [
"struct xdr_stream",
"struct xdr_buf"
]
} |
141 | linux | https://github.com/torvalds/linux | fs/ext4/inline.c | 6e8ab72a812396996035a37e5ca4b3b99b5d214b | ext4: clear i_data in ext4_inode_info when removing inline data
When converting from an inode from storing the data in-line to a data
block, ext4_destroy_inline_data_nolock() was only clearing the on-disk
copy of the i_blocks[] array. It was not clearing copy of the
i_blocks[] in ext4_inode_info, in i_data[], which i... | true | cdb269dc3d1a2ffefe2ed0a07990a779 | ext4_destroy_inline_data_nolock | static int ext4_destroy_inline_data_nolock(handle_t *handle,
struct inode *inode)
{
struct ext4_inode_info *ei = EXT4_I(inode);
struct ext4_xattr_ibody_find is = {
.s = { .not_found = 0, },
};
struct ext4_xattr_info i = {
.name_index = EXT4_XATTR_INDEX_SYSTEM,
.name = EXT4_XATTR_SYSTEM_DATA,
.value ... | [] | [] | [
"CVE-2018-10881"
] | [
"CWE-787",
"CWE-119"
] | 142 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"EXT4_I"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": [
"struct ext4_inode_info"
]
} |
142 | linux | https://github.com/torvalds/linux | fs/ext4/inline.c | 6e8ab72a812396996035a37e5ca4b3b99b5d214b | ext4: clear i_data in ext4_inode_info when removing inline data
When converting from an inode from storing the data in-line to a data
block, ext4_destroy_inline_data_nolock() was only clearing the on-disk
copy of the i_blocks[] array. It was not clearing copy of the
i_blocks[] in ext4_inode_info, in i_data[], which i... | false | 86de1673852bc1c061e524a7ae3c3311 | ext4_destroy_inline_data_nolock | static int ext4_destroy_inline_data_nolock(handle_t *handle,
struct inode *inode)
{
struct ext4_inode_info *ei = EXT4_I(inode);
struct ext4_xattr_ibody_find is = {
.s = { .not_found = 0, },
};
struct ext4_xattr_info i = {
.name_index = EXT4_XATTR_INDEX_SYSTEM,
.name = EXT4_XATTR_SYSTEM_DATA,
.value ... | [[440, "\tmemset(ei->i_data, 0, EXT4_MIN_INLINE_DATA_SIZE);\n"]] | [[440, "memset(ei->i_data, 0, EXT4_MIN_INLINE_DATA_SIZE);"]] | [
"CVE-2018-10881"
] | [
"CWE-787",
"CWE-119"
] | 142 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"EXT4_I"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": [
"struct ext4_inode_info"
]
} |
143 | linux | https://github.com/torvalds/linux | drivers/s390/net/qeth_core_main.c | 6fb392b1a63ae36c31f62bc3fc8630b49d602b62 | qeth: avoid buffer overflow in snmp ioctl
Check user-defined length in snmp ioctl request and allow request
only if it fits into a qeth command buffer.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c... | true | 40e16e018ba1fa3b071bc5049ddd788d | qeth_snmp_command | int qeth_snmp_command(struct qeth_card *card, char __user *udata)
{
struct qeth_cmd_buffer *iob;
struct qeth_ipa_cmd *cmd;
struct qeth_snmp_ureq *ureq;
int req_len;
struct qeth_arp_query_info qinfo = {0, };
int rc = 0;
QETH_CARD_TEXT(card, 3, "snmpcmd");
if (card->info.guestlan)
return -EOPNOTSUPP;
if ((!... | [[4454, "\tint req_len;\n"]] | [[4454, "int req_len;"]] | [
"CVE-2013-6381"
] | [
"CWE-119"
] | 144 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"qeth_get_adapter_cmd"
],
"Function Argument": [],
"Globals": [
"QETH_BUFSIZE",
"IPA_PDU_HEADER_SIZE"
],
"Type Execution Declaration": [
"struct qeth_cmd_buffer",
"struct qeth_ipa_cmd",
"struct qeth_snmp_u... |
144 | linux | https://github.com/torvalds/linux | drivers/s390/net/qeth_core_main.c | 6fb392b1a63ae36c31f62bc3fc8630b49d602b62 | qeth: avoid buffer overflow in snmp ioctl
Check user-defined length in snmp ioctl request and allow request
only if it fits into a qeth command buffer.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c... | false | b313cf255a9b9121e93bcec626bd6feb | qeth_snmp_command | int qeth_snmp_command(struct qeth_card *card, char __user *udata)
{
struct qeth_cmd_buffer *iob;
struct qeth_ipa_cmd *cmd;
struct qeth_snmp_ureq *ureq;
unsigned int req_len;
struct qeth_arp_query_info qinfo = {0, };
int rc = 0;
QETH_CARD_TEXT(card, 3, "snmpcmd");
if (card->info.guestlan)
return -EOPNOTSUPP;... | [[4454, "\tunsigned int req_len;\n"], [4470, "\tif (req_len > (QETH_BUFSIZE - IPA_PDU_HEADER_SIZE -\n"], [4471, "\t\t sizeof(struct qeth_ipacmd_hdr) -\n"], [4472, "\t\t sizeof(struct qeth_ipacmd_setadpparms_hdr)))\n"], [4473, "\t\treturn -EINVAL;\n"]] | [[4454, "unsigned int req_len;"], [4470, "if (req_len > (QETH_BUFSIZE - IPA_PDU_HEADER_SIZE -\n\t\t sizeof(struct qeth_ipacmd_hdr) -\n\t\t sizeof(struct qeth_ipacmd_setadpparms_hdr)))"], [4473, "return -EINVAL;"]] | [
"CVE-2013-6381"
] | [
"CWE-119"
] | 144 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"qeth_get_adapter_cmd"
],
"Function Argument": [],
"Globals": [
"QETH_BUFSIZE",
"IPA_PDU_HEADER_SIZE"
],
"Type Execution Declaration": [
"struct qeth_cmd_buffer",
"struct qeth_ipa_cmd",
"struct qeth_snmp_u... |
145 | linux | https://github.com/torvalds/linux | drivers/net/ethernet/broadcom/tg3.c | 715230a44310a8cf66fbfb5a46f9a62a9b2de424 | tg3: fix length overflow in VPD firmware parsing
Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version
when present") introduced VPD parsing that contained a potential length
overflow.
Limit the hardware's reported firmware string length (max 255 bytes) to
stay inside the driver's firmware string ... | true | 3f652924448347f2ca2c05c54b590cba | tg3_read_vpd | static void tg3_read_vpd(struct tg3 *tp)
{
u8 *vpd_data;
unsigned int block_end, rosize, len;
u32 vpdlen;
int j, i = 0;
vpd_data = (u8 *)tg3_vpd_readblock(tp, &vpdlen);
if (!vpd_data)
goto out_no_vpd;
i = pci_vpd_find_tag(vpd_data, 0, vpdlen, PCI_VPD_LRDT_RO_DATA);
if (i < 0)
goto out_not_found;
rosize ... | [[14607, "\t\tmemcpy(tp->fw_ver, &vpd_data[j], len);\n"], [14608, "\t\tstrncat(tp->fw_ver, \" bc \", vpdlen - len - 1);\n"]] | [[14607, "memcpy(tp->fw_ver, &vpd_data[j], len);"], [14608, "strncat(tp->fw_ver, \" bc \", vpdlen - len - 1);"]] | [
"CVE-2013-1929"
] | [
"CWE-119"
] | 146 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"tg3_vpd_readblock",
"pci_vpd_find_tag",
"pci_vpd_lrdt_size",
"pci_vpd_find_info_keyword",
"pci_vpd_info_field_size"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": [
"struct tg3"
... |
146 | linux | https://github.com/torvalds/linux | drivers/net/ethernet/broadcom/tg3.c | 715230a44310a8cf66fbfb5a46f9a62a9b2de424 | tg3: fix length overflow in VPD firmware parsing
Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version
when present") introduced VPD parsing that contained a potential length
overflow.
Limit the hardware's reported firmware string length (max 255 bytes) to
stay inside the driver's firmware string ... | false | b974faab5296fb7fe72ceea76d3a7b2f | tg3_read_vpd | static void tg3_read_vpd(struct tg3 *tp)
{
u8 *vpd_data;
unsigned int block_end, rosize, len;
u32 vpdlen;
int j, i = 0;
vpd_data = (u8 *)tg3_vpd_readblock(tp, &vpdlen);
if (!vpd_data)
goto out_no_vpd;
i = pci_vpd_find_tag(vpd_data, 0, vpdlen, PCI_VPD_LRDT_RO_DATA);
if (i < 0)
goto out_not_found;
rosize ... | [[14607, "\t\tif (len >= sizeof(tp->fw_ver))\n"], [14608, "\t\t\tlen = sizeof(tp->fw_ver) - 1;\n"], [14609, "\t\tmemset(tp->fw_ver, 0, sizeof(tp->fw_ver));\n"], [14610, "\t\tsnprintf(tp->fw_ver, sizeof(tp->fw_ver), \"%.*s bc \", len,\n"], [14611, "\t\t\t &vpd_data[j]);\n"]] | [[14607, "if (len >= sizeof(tp->fw_ver))"], [14608, "len = sizeof(tp->fw_ver) - 1;"], [14609, "memset(tp->fw_ver, 0, sizeof(tp->fw_ver));"], [14610, "snprintf(tp->fw_ver, sizeof(tp->fw_ver), \"%.*s bc \", len,\n\t\t\t &vpd_data[j]);"]] | [
"CVE-2013-1929"
] | [
"CWE-119"
] | 146 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"tg3_vpd_readblock",
"pci_vpd_find_tag",
"pci_vpd_lrdt_size",
"pci_vpd_find_info_keyword",
"pci_vpd_info_field_size"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": [
"struct tg3"
... |
147 | linux | https://github.com/torvalds/linux | drivers/uio/uio.c | 7314e613d5ff9f0934f7a0f74ed7973b903315d1 | Fix a few incorrectly checked [io_]remap_pfn_range() calls
Nico Golde reports a few straggling uses of [io_]remap_pfn_range() that
really should use the vm_iomap_memory() helper. This trivially converts
two of them to the helper, and comments about why the third one really
needs to continue to use remap_pfn_range(), ... | true | 1cd3f84d9893308d39113bccb22bfbe4 | uio_mmap_physical | static int uio_mmap_physical(struct vm_area_struct *vma)
{
struct uio_device *idev = vma->vm_private_data;
int mi = uio_find_mem_index(vma);
if (mi < 0)
return -EINVAL;
vma->vm_ops = &uio_physical_vm_ops;
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
return remap_pfn_range(vma,
vma->vm_s... | [[648, "\tvma->vm_ops = &uio_physical_vm_ops;\n"], [654, "\t\t\t idev->info->mem[mi].addr >> PAGE_SHIFT,\n"]] | [[648, "vma->vm_ops = &uio_physical_vm_ops;"], [652, "return remap_pfn_range(vma,\n\t\t\t vma->vm_start,\n\t\t\t idev->info->mem[mi].addr >> PAGE_SHIFT,\n\t\t\t vma->vm_end - vma->vm_start,\n\t\t\t vma->vm_page_prot);"]] | [
"CVE-2013-6763"
] | [
"CWE-119"
] | 148 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"uio_find_mem_index",
"remap_pfn_range"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": []
} |
148 | linux | https://github.com/torvalds/linux | drivers/uio/uio.c | 7314e613d5ff9f0934f7a0f74ed7973b903315d1 | Fix a few incorrectly checked [io_]remap_pfn_range() calls
Nico Golde reports a few straggling uses of [io_]remap_pfn_range() that
really should use the vm_iomap_memory() helper. This trivially converts
two of them to the helper, and comments about why the third one really
needs to continue to use remap_pfn_range(), ... | false | 6827723f1e868926409cf222eeb7a0ef | uio_mmap_physical | static int uio_mmap_physical(struct vm_area_struct *vma)
{
struct uio_device *idev = vma->vm_private_data;
int mi = uio_find_mem_index(vma);
struct uio_mem *mem;
if (mi < 0)
return -EINVAL;
mem = idev->info->mem + mi;
if (vma->vm_end - vma->vm_start > mem->size)
return -EINVAL;
vma->vm_ops = &uio_physical_... | [[645, "\tstruct uio_mem *mem;\n"], [648, "\tmem = idev->info->mem + mi;\n"], [650, "\tif (vma->vm_end - vma->vm_start > mem->size)\n"], [651, "\t\treturn -EINVAL;\n"], [653, "\tvma->vm_ops = &uio_physical_vm_ops;\n"], [656, "\t/*\n"], [657, "\t * We cannot use the vm_iomap_memory() helper here,\n"], [658, "\t * becaus... | [[645, "struct uio_mem *mem;"], [648, "mem = idev->info->mem + mi;"], [650, "if (vma->vm_end - vma->vm_start > mem->size)"], [651, "return -EINVAL;"], [653, "vma->vm_ops = &uio_physical_vm_ops;"], [656, "/*\n\t * We cannot use the vm_iomap_memory() helper here,\n\t * because vma->vm_pgoff is the map index we looked\n\t... | [
"CVE-2013-6763"
] | [
"CWE-119"
] | 148 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"uio_find_mem_index",
"remap_pfn_range"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": []
} |
149 | linux | https://github.com/torvalds/linux | drivers/video/au1100fb.c | 7314e613d5ff9f0934f7a0f74ed7973b903315d1 | Fix a few incorrectly checked [io_]remap_pfn_range() calls
Nico Golde reports a few straggling uses of [io_]remap_pfn_range() that
really should use the vm_iomap_memory() helper. This trivially converts
two of them to the helper, and comments about why the third one really
needs to continue to use remap_pfn_range(), ... | true | 0d39dc791b0b1bad856afd9b65a2f8f7 | au1100fb_fb_mmap | int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma)
{
struct au1100fb_device *fbdev;
unsigned int len;
unsigned long start=0, off;
fbdev = to_au1100fb_device(fbi);
if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) {
return -EINVAL;
}
start = fbdev->fb_phys & PAGE_MASK;
len = PAGE_ALIGN((start & ~... | [[364, "\tunsigned int len;\n"], [365, "\tunsigned long start=0, off;\n"], [369, "\tif (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) {\n"], [370, "\t\treturn -EINVAL;\n"], [371, "\t}\n"], [372, "\n"], [373, "\tstart = fbdev->fb_phys & PAGE_MASK;\n"], [374, "\tlen = PAGE_ALIGN((start & ~PAGE_MASK) + fbdev->fb_len);\n"], [375, ... | [[364, "unsigned int len;"], [365, "unsigned long start=0, off;"], [369, "if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT))"], [370, "return -EINVAL;"], [371, "\t}\n"], [372, "\n"], [373, "start = fbdev->fb_phys & PAGE_MASK;"], [374, "len = PAGE_ALIGN((start & ~PAGE_MASK) + fbdev->fb_len);"], [375, "\n"], [376, "off = vma->vm_... | [
"CVE-2013-6763"
] | [
"CWE-119"
] | 150 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"to_au1100fb_device",
"io_remap_pfn_range",
"pgprot_noncached",
"pgprot_val",
"PAGE_ALIGN"
],
"Function Argument": [
"fbi",
"vma"
],
"Globals": [
"PAGE_SHIFT",
"PAGE_MASK"
],
"Type Execution ... |
150 | linux | https://github.com/torvalds/linux | drivers/video/au1100fb.c | 7314e613d5ff9f0934f7a0f74ed7973b903315d1 | Fix a few incorrectly checked [io_]remap_pfn_range() calls
Nico Golde reports a few straggling uses of [io_]remap_pfn_range() that
really should use the vm_iomap_memory() helper. This trivially converts
two of them to the helper, and comments about why the third one really
needs to continue to use remap_pfn_range(), ... | false | f1b642c3123d68a181c1c68fe534d935 | au1100fb_fb_mmap | int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma)
{
struct au1100fb_device *fbdev;
fbdev = to_au1100fb_device(fbi);
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
pgprot_val(vma->vm_page_prot) |= (6 << 9); //CCA=6
return vm_iomap_memory(vma, fbdev->fb_phys, fbdev->fb_len);
}
| [[370, "\treturn vm_iomap_memory(vma, fbdev->fb_phys, fbdev->fb_len);\n"]] | [[370, "return vm_iomap_memory(vma, fbdev->fb_phys, fbdev->fb_len);"]] | [
"CVE-2013-6763"
] | [
"CWE-119"
] | 150 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"to_au1100fb_device",
"io_remap_pfn_range",
"pgprot_noncached",
"pgprot_val",
"PAGE_ALIGN"
],
"Function Argument": [
"fbi",
"vma"
],
"Globals": [
"PAGE_SHIFT",
"PAGE_MASK"
],
"Type Execution ... |
151 | linux | https://github.com/torvalds/linux | drivers/video/au1200fb.c | 7314e613d5ff9f0934f7a0f74ed7973b903315d1 | Fix a few incorrectly checked [io_]remap_pfn_range() calls
Nico Golde reports a few straggling uses of [io_]remap_pfn_range() that
really should use the vm_iomap_memory() helper. This trivially converts
two of them to the helper, and comments about why the third one really
needs to continue to use remap_pfn_range(), ... | true | 11885058e88799f0f2f15e02ef322a31 | au1200fb_fb_mmap | static int au1200fb_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
{
unsigned int len;
unsigned long start=0, off;
struct au1200fb_device *fbdev = info->par;
if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) {
return -EINVAL;
}
start = fbdev->fb_phys & PAGE_MASK;
len = PAGE_ALIGN((start & ~PAGE_MASK) + f... | [[1236, "\n"], [1238, "\tunsigned int len;\n"], [1239, "\tunsigned long start=0, off;\n"], [1242, "\tif (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) {\n"], [1243, "\t\treturn -EINVAL;\n"], [1244, "\t}\n"], [1245, "\n"], [1246, "\tstart = fbdev->fb_phys & PAGE_MASK;\n"], [1247, "\tlen = PAGE_ALIGN((start & ~PAGE_MASK) + fbdev... | [[1235, "static int au1200fb_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)"], [1238, "unsigned int len;"], [1239, "unsigned long start=0, off;"], [1242, "if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT))"], [1243, "return -EINVAL;"], [1244, "\t}\n"], [1245, "\n"], [1246, "start = fbdev->fb_phys & PAGE_MASK;"], [124... | [
"CVE-2013-6763"
] | [
"CWE-119"
] | 152 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"io_remap_pfn_range",
"pgprot_noncached",
"pgprot_val",
"PAGE_ALIGN"
],
"Function Argument": [
"info",
"vma"
],
"Globals": [
"PAGE_SHIFT",
"PAGE_MASK",
"_CACHE_MASK"
],
"Type Execution Declar... |
152 | linux | https://github.com/torvalds/linux | drivers/video/au1200fb.c | 7314e613d5ff9f0934f7a0f74ed7973b903315d1 | Fix a few incorrectly checked [io_]remap_pfn_range() calls
Nico Golde reports a few straggling uses of [io_]remap_pfn_range() that
really should use the vm_iomap_memory() helper. This trivially converts
two of them to the helper, and comments about why the third one really
needs to continue to use remap_pfn_range(), ... | false | a0ab6933235e8b35a3921d614eaeab93 | au1200fb_fb_mmap | static int au1200fb_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
{
struct au1200fb_device *fbdev = info->par;
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
pgprot_val(vma->vm_page_prot) |= _CACHE_MASK; /* CCA=7 */
return vm_iomap_memory(vma, fbdev->fb_phys, fbdev->fb_len);
}
| [[1242, "\treturn vm_iomap_memory(vma, fbdev->fb_phys, fbdev->fb_len);\n"]] | [[1242, "return vm_iomap_memory(vma, fbdev->fb_phys, fbdev->fb_len);"]] | [
"CVE-2013-6763"
] | [
"CWE-119"
] | 152 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"io_remap_pfn_range",
"pgprot_noncached",
"pgprot_val",
"PAGE_ALIGN"
],
"Function Argument": [
"info",
"vma"
],
"Globals": [
"PAGE_SHIFT",
"PAGE_MASK",
"_CACHE_MASK"
],
"Type Execution Declar... |
153 | linux | https://github.com/torvalds/linux | fs/fuse/file.c | 7572777eef78ebdee1ecb7c258c0ef94d35bad16 | fuse: verify ioctl retries
Verify that the total length of the iovec returned in FUSE_IOCTL_RETRY
doesn't overflow iov_length().
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: Tejun Heo <tj@kernel.org>
CC: <stable@kernel.org> [2.6.31+] | true | 0fa709ef76c884aa69affed959da292b | fuse_do_ioctl | long fuse_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg,
unsigned int flags)
{
struct fuse_file *ff = file->private_data;
struct fuse_conn *fc = ff->fc;
struct fuse_ioctl_in inarg = {
.fh = ff->fh,
.cmd = cmd,
.arg = arg,
.flags = flags
};
struct fuse_ioctl_out outarg;
struct fuse_r... | [] | [] | [
"CVE-2010-4650"
] | [
"CWE-119"
] | 154 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"fuse_verify_ioctl_iov",
"iov_length"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": []
} |
154 | linux | https://github.com/torvalds/linux | fs/fuse/file.c | 7572777eef78ebdee1ecb7c258c0ef94d35bad16 | fuse: verify ioctl retries
Verify that the total length of the iovec returned in FUSE_IOCTL_RETRY
doesn't overflow iov_length().
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: Tejun Heo <tj@kernel.org>
CC: <stable@kernel.org> [2.6.31+] | false | fafcdd6dd05a7aab4c38ee2af0d72d4b | fuse_do_ioctl | long fuse_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg,
unsigned int flags)
{
struct fuse_file *ff = file->private_data;
struct fuse_conn *fc = ff->fc;
struct fuse_ioctl_in inarg = {
.fh = ff->fh,
.cmd = cmd,
.arg = arg,
.flags = flags
};
struct fuse_ioctl_out outarg;
struct fuse_r... | [[1875, "\t\terr = fuse_verify_ioctl_iov(in_iov, in_iovs);\n"], [1876, "\t\tif (err)\n"], [1877, "\t\t\tgoto out;\n"], [1878, "\n"], [1879, "\t\terr = fuse_verify_ioctl_iov(out_iov, out_iovs);\n"], [1880, "\t\tif (err)\n"], [1881, "\t\t\tgoto out;\n"], [1882, "\n"]] | [[1875, "err = fuse_verify_ioctl_iov(in_iov, in_iovs);"], [1876, "if (err)"], [1877, "goto out;"], [1878, "\n"], [1879, "err = fuse_verify_ioctl_iov(out_iov, out_iovs);"], [1880, "if (err)"], [1881, "goto out;"], [1882, "\n"]] | [
"CVE-2010-4650"
] | [
"CWE-119"
] | 154 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"fuse_verify_ioctl_iov",
"iov_length"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": []
} |
155 | linux | https://github.com/torvalds/linux | kernel/cred.c | 79549c6dfda0603dba9a70a53467ce62d9335c33 | cred: copy_process() should clear child->replacement_session_keyring
keyctl_session_to_parent(task) sets ->replacement_session_keyring,
it should be processed and cleared by key_replace_session_keyring().
However, this task can fork before it notices TIF_NOTIFY_RESUME and
the new child gets the bogus ->replacement_se... | true | 5cedb647df7d30d2af969db293e225cc | copy_creds | int copy_creds(struct task_struct *p, unsigned long clone_flags)
{
// #ifdef CONFIG_KEYS
struct thread_group_cred *tgcred;
#endif
struct cred *new;
int ret;
if (
// #ifdef CONFIG_KEYS
!p->cred->thread_keyring &&
#endif
clone_flags & CLONE_THREAD
) {
p->real_cred = get_cred(p->cred);
get_cred(p->cred);... | [] | [] | [
"CVE-2012-2745"
] | [
"CWE-119"
] | 156 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [
"p"
],
"Globals": [],
"Type Execution Declaration": [
"struct task_struct"
]
} |
156 | linux | https://github.com/torvalds/linux | kernel/cred.c | 79549c6dfda0603dba9a70a53467ce62d9335c33 | cred: copy_process() should clear child->replacement_session_keyring
keyctl_session_to_parent(task) sets ->replacement_session_keyring,
it should be processed and cleared by key_replace_session_keyring().
However, this task can fork before it notices TIF_NOTIFY_RESUME and
the new child gets the bogus ->replacement_se... | false | 41ad5876391204a4f5f5997b66a46c0e | copy_creds | int copy_creds(struct task_struct *p, unsigned long clone_flags)
{
// #ifdef CONFIG_KEYS
struct thread_group_cred *tgcred;
#endif
struct cred *new;
int ret;
p->replacement_session_keyring = NULL;
if (
// #ifdef CONFIG_KEYS
!p->cred->thread_keyring &&
#endif
clone_flags & CLONE_THREAD
) {
p->real_cred ... | [[389, "\tp->replacement_session_keyring = NULL;\n"], [390, "\n"]] | [[389, "p->replacement_session_keyring = NULL;"], [390, "\n"]] | [
"CVE-2012-2745"
] | [
"CWE-119"
] | 156 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [
"p"
],
"Globals": [],
"Type Execution Declaration": [
"struct task_struct"
]
} |
157 | linux | https://github.com/torvalds/linux | kernel/bpf/stackmap.c | 7a4b21250bf79eef26543d35bd390448646c536b | bpf: Fix stackmap overflow check on 32-bit arches
The stackmap code relies on roundup_pow_of_two() to compute the number
of hash buckets, and contains an overflow check by checking if the
resulting value is 0. However, on 32-bit arches, the roundup code itself
can overflow by doing a 32-bit left-shift of an unsigned l... | true | 2b9efb680d0a8a6c8cc2acf94db8f845 | stack_map_alloc | static struct bpf_map *stack_map_alloc(union bpf_attr *attr)
{
u32 value_size = attr->value_size;
struct bpf_stack_map *smap;
u64 cost, n_buckets;
int err;
if (attr->map_flags & ~STACK_CREATE_FLAG_MASK)
return ERR_PTR(-EINVAL);
/* check sanity of attributes */
if (attr->max_entries == 0 || attr->key_size != ... | [[94, "\t/* hash table size must be power of 2 */\n"], [95, "\tn_buckets = roundup_pow_of_two(attr->max_entries);\n"], [96, "\tif (!n_buckets)\n"]] | [[94, "/* hash table size must be power of 2 */"], [95, "n_buckets = roundup_pow_of_two(attr->max_entries);"], [96, "if (!n_buckets)"]] | [
"CVE-2024-26883"
] | [
"CWE-119"
] | 158 | {
"Execution Environment": [
"32-bit architectures"
],
"Explanation": null,
"External Function": [
"roundup_pow_of_two"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": []
} |
158 | linux | https://github.com/torvalds/linux | kernel/bpf/stackmap.c | 7a4b21250bf79eef26543d35bd390448646c536b | bpf: Fix stackmap overflow check on 32-bit arches
The stackmap code relies on roundup_pow_of_two() to compute the number
of hash buckets, and contains an overflow check by checking if the
resulting value is 0. However, on 32-bit arches, the roundup code itself
can overflow by doing a 32-bit left-shift of an unsigned l... | false | 65f05842ad5489facb8096fb48df33f1 | stack_map_alloc | static struct bpf_map *stack_map_alloc(union bpf_attr *attr)
{
u32 value_size = attr->value_size;
struct bpf_stack_map *smap;
u64 cost, n_buckets;
int err;
if (attr->map_flags & ~STACK_CREATE_FLAG_MASK)
return ERR_PTR(-EINVAL);
/* check sanity of attributes */
if (attr->max_entries == 0 || attr->key_size != ... | [[94, "\t/* hash table size must be power of 2; roundup_pow_of_two() can overflow\n"], [95, "\t * into UB on 32-bit arches, so check that first\n"], [96, "\t */\n"], [97, "\tif (attr->max_entries > 1UL << 31)\n"], [100, "\tn_buckets = roundup_pow_of_two(attr->max_entries);\n"], [101, "\n"]] | [[94, "/* hash table size must be power of 2; roundup_pow_of_two() can overflow\n\t * into UB on 32-bit arches, so check that first\n\t */"], [97, "if (attr->max_entries > 1UL << 31)"], [100, "n_buckets = roundup_pow_of_two(attr->max_entries);"], [101, "\n"]] | [
"CVE-2024-26883"
] | [
"CWE-119"
] | 158 | {
"Execution Environment": [
"32-bit architectures"
],
"Explanation": null,
"External Function": [
"roundup_pow_of_two"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": []
} |
159 | linux | https://github.com/torvalds/linux | kernel/futex.c | 7ada876a8703f23befbb20a7465a702ee39b1704 | futex: Fix errors in nested key ref-counting
futex_wait() is leaking key references due to futex_wait_setup()
acquiring an additional reference via the queue_lock() routine. The
nested key ref-counting has been masking bugs and complicating code
analysis. queue_lock() is only called with a previously ref-counted
key, ... | true | 0e346b38a376967ca52b8801017b22d5 | queue_lock | static inline struct futex_hash_bucket *queue_lock(struct futex_q *q)
{
struct futex_hash_bucket *hb;
get_futex_key_refs(&q->key);
hb = hash_futex(&q->key);
q->lock_ptr = &hb->lock;
spin_lock(&hb->lock);
return hb;
}
| [[1366, "\tget_futex_key_refs(&q->key);\n"]] | [[1366, "get_futex_key_refs(&q->key);"]] | [
"CVE-2014-0205"
] | [
"CWE-119"
] | null | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"get_futex_key_refs",
"hash_futex"
],
"Function Argument": [
"q"
],
"Globals": [],
"Type Execution Declaration": [
"struct futex_q",
"struct futex_hash_bucket"
]
} |
160 | linux | https://github.com/torvalds/linux | kernel/futex.c | 7ada876a8703f23befbb20a7465a702ee39b1704 | futex: Fix errors in nested key ref-counting
futex_wait() is leaking key references due to futex_wait_setup()
acquiring an additional reference via the queue_lock() routine. The
nested key ref-counting has been masking bugs and complicating code
analysis. queue_lock() is only called with a previously ref-counted
key, ... | true | 7076620a4062f1cb978c6f8d5ceb6c5d | unqueue_me_pi | static void unqueue_me_pi(struct futex_q *q)
{
WARN_ON(plist_node_empty(&q->list));
plist_del(&q->list, &q->list.plist);
BUG_ON(!q->pi_state);
free_pi_state(q->pi_state);
q->pi_state = NULL;
spin_unlock(q->lock_ptr);
drop_futex_key_refs(&q->key);
}
| [[1483, "\n"], [1484, "\tdrop_futex_key_refs(&q->key);\n"]] | [[1483, "\n"], [1484, "drop_futex_key_refs(&q->key);"]] | [
"CVE-2014-0205"
] | [
"CWE-119"
] | null | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"drop_futex_key_refs"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": [
"struct futex_q"
]
} |
161 | linux | https://github.com/torvalds/linux | kernel/futex.c | 7ada876a8703f23befbb20a7465a702ee39b1704 | futex: Fix errors in nested key ref-counting
futex_wait() is leaking key references due to futex_wait_setup()
acquiring an additional reference via the queue_lock() routine. The
nested key ref-counting has been masking bugs and complicating code
analysis. queue_lock() is only called with a previously ref-counted
key, ... | true | b657f93662281af7da9d472a35ea3ed2 | futex_wait | static int futex_wait(u32 __user *uaddr, int fshared,
u32 val, ktime_t *abs_time, u32 bitset, int clockrt)
{
struct hrtimer_sleeper timeout, *to = NULL;
struct restart_block *restart;
struct futex_hash_bucket *hb;
struct futex_q q;
int ret;
if (!bitset)
return -EINVAL;
q.pi_state = NULL;
q.bitset = ... | [[1815, "\t/* Prepare to wait on uaddr. */\n"], [1826, "\t\tgoto out_put_key;\n"], [1829, "\t\tgoto out_put_key;\n"], [1835, "\tif (!signal_pending(current)) {\n"], [1836, "\t\tput_futex_key(fshared, &q.key);\n"], [1838, "\t}\n"], [1842, "\t\tgoto out_put_key;\n"], [1859, "out_put_key:\n"], [1860, "\tput_futex_key(fsha... | [[1815, "/* Prepare to wait on uaddr. */"], [1826, "goto out_put_key;"], [1829, "goto out_put_key;"], [1835, "if (!signal_pending(current))"], [1836, "put_futex_key(fshared, &q.key);"], [1838, "\t}\n"], [1842, "goto out_put_key;"], [1859, "out_put_key:"], [1860, "put_futex_key(fshared, &q.key);"]] | [
"CVE-2014-0205"
] | [
"CWE-119"
] | 163 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"futex_wait_setup",
"futex_wait_queue_me",
"unqueue_me",
"put_futex_key"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": []
} |
162 | linux | https://github.com/torvalds/linux | kernel/futex.c | 7ada876a8703f23befbb20a7465a702ee39b1704 | futex: Fix errors in nested key ref-counting
futex_wait() is leaking key references due to futex_wait_setup()
acquiring an additional reference via the queue_lock() routine. The
nested key ref-counting has been masking bugs and complicating code
analysis. queue_lock() is only called with a previously ref-counted
key, ... | true | 446dcecdd80891f8ef64bd22484b18de | futex_wait_requeue_pi | static int futex_wait_requeue_pi(u32 __user *uaddr, int fshared,
u32 val, ktime_t *abs_time, u32 bitset,
int clockrt, u32 __user *uaddr2)
{
struct hrtimer_sleeper timeout, *to = NULL;
struct rt_mutex_waiter rt_waiter;
struct rt_mutex *pi_mutex = NULL;
struct futex_hash_bucket *hb;
union futex_key key2;
... | [[2239, "\t/* Prepare to wait on uaddr. */\n"], [2257, "\t * race with the atomic proxy lock acquition by the requeue code.\n"]] | [[2239, "/* Prepare to wait on uaddr. */"], [2253, "/*\n\t * In order for us to be here, we know our q.key == key2, and since\n\t * we took the hb->lock above, we also know that futex_requeue() has\n\t * completed and we no longer have to concern ourselves with a wakeup\n\t * race with the atomic proxy lock acquition b... | [
"CVE-2014-0205"
] | [
"CWE-119"
] | 164 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"futex_wait_setup",
"futex_requeue"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": []
} |
163 | linux | https://github.com/torvalds/linux | kernel/futex.c | 7ada876a8703f23befbb20a7465a702ee39b1704 | futex: Fix errors in nested key ref-counting
futex_wait() is leaking key references due to futex_wait_setup()
acquiring an additional reference via the queue_lock() routine. The
nested key ref-counting has been masking bugs and complicating code
analysis. queue_lock() is only called with a previously ref-counted
key, ... | false | 3bea5772845b3f54f62a11b531d3bbf6 | futex_wait | static int futex_wait(u32 __user *uaddr, int fshared,
u32 val, ktime_t *abs_time, u32 bitset, int clockrt)
{
struct hrtimer_sleeper timeout, *to = NULL;
struct restart_block *restart;
struct futex_hash_bucket *hb;
struct futex_q q;
int ret;
if (!bitset)
return -EINVAL;
q.pi_state = NULL;
q.bitset = ... | [[1811, "\t/*\n"], [1812, "\t * Prepare to wait on uaddr. On success, holds hb lock and increments\n"], [1813, "\t * q.key refs.\n"], [1814, "\t */\n"], [1824, "\t/* unqueue_me() drops q.key ref */\n"], [1826, "\t\tgoto out;\n"], [1829, "\t\tgoto out;\n"], [1835, "\tif (!signal_pending(current))\n"], [1840, "\t\tgoto o... | [[1811, "/*\n\t * Prepare to wait on uaddr. On success, holds hb lock and increments\n\t * q.key refs.\n\t */"], [1824, "/* unqueue_me() drops q.key ref */"], [1826, "goto out;"], [1829, "goto out;"], [1835, "if (!signal_pending(current))"], [1840, "goto out;"]] | [
"CVE-2014-0205"
] | [
"CWE-119"
] | 163 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"futex_wait_setup",
"futex_wait_queue_me",
"unqueue_me",
"put_futex_key"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": []
} |
164 | linux | https://github.com/torvalds/linux | kernel/futex.c | 7ada876a8703f23befbb20a7465a702ee39b1704 | futex: Fix errors in nested key ref-counting
futex_wait() is leaking key references due to futex_wait_setup()
acquiring an additional reference via the queue_lock() routine. The
nested key ref-counting has been masking bugs and complicating code
analysis. queue_lock() is only called with a previously ref-counted
key, ... | false | 4e86e00b0df45a8cb512f26c96124454 | futex_wait_requeue_pi | static int futex_wait_requeue_pi(u32 __user *uaddr, int fshared,
u32 val, ktime_t *abs_time, u32 bitset,
int clockrt, u32 __user *uaddr2)
{
struct hrtimer_sleeper timeout, *to = NULL;
struct rt_mutex_waiter rt_waiter;
struct rt_mutex *pi_mutex = NULL;
struct futex_hash_bucket *hb;
union futex_key key2;
... | [[2235, "\t/*\n"], [2236, "\t * Prepare to wait on uaddr. On success, increments q.key (key1) ref\n"], [2237, "\t * count.\n"], [2238, "\t */\n"], [2256, "\t * race with the atomic proxy lock acquisition by the requeue code. The\n"], [2257, "\t * futex_requeue dropped our key1 reference and incremented our key2\n"], [2... | [[2235, "/*\n\t * Prepare to wait on uaddr. On success, increments q.key (key1) ref\n\t * count.\n\t */"], [2252, "/*\n\t * In order for us to be here, we know our q.key == key2, and since\n\t * we took the hb->lock above, we also know that futex_requeue() has\n\t * completed and we no longer have to concern ourselves ... | [
"CVE-2014-0205"
] | [
"CWE-119"
] | 164 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"futex_wait_setup",
"futex_requeue"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": []
} |
165 | linux | https://github.com/torvalds/linux | drivers/scsi/arcmsr/arcmsr_hba.c | 7bc2b55a5c030685b399bb65b6baa9ccc3d1f167 | scsi: arcmsr: Buffer overflow in arcmsr_iop_message_xfer()
We need to put an upper bound on "user_len" so the memcpy() doesn't
overflow.
Cc: <stable@vger.kernel.org>
Reported-by: Marco Grassi <marco.gra@gmail.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Sig... | true | bb846053cbc0bdd5ec923855552abf23 | arcmsr_iop_message_xfer | static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb,
struct scsi_cmnd *cmd)
{
char *buffer;
unsigned short use_sg;
int retvalue = 0, transfer_len = 0;
unsigned long flags;
struct CMD_MESSAGE_FIELD *pcmdmessagefld;
uint32_t controlcode = (uint32_t)cmd->cmnd[5] << 24 |
(uint32_t)cmd->cmnd[6] << 1... | [[2391, "\t\tint32_t user_len, cnt2end;\n"]] | [[2391, "int32_t user_len, cnt2end;"]] | [
"CVE-2016-7425"
] | [
"CWE-119"
] | 166 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [
"acb",
"cmd"
],
"Globals": [
"ARCMSR_API_DATA_BUFLEN"
],
"Type Execution Declaration": [
"struct AdapterControlBlock",
"struct scsi_cmnd",
"struct CMD_MESSAGE_FIELD"
]
} |
166 | linux | https://github.com/torvalds/linux | drivers/scsi/arcmsr/arcmsr_hba.c | 7bc2b55a5c030685b399bb65b6baa9ccc3d1f167 | scsi: arcmsr: Buffer overflow in arcmsr_iop_message_xfer()
We need to put an upper bound on "user_len" so the memcpy() doesn't
overflow.
Cc: <stable@vger.kernel.org>
Reported-by: Marco Grassi <marco.gra@gmail.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Sig... | false | c2d13d8d516db20f224cb07ab0819848 | arcmsr_iop_message_xfer | static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb,
struct scsi_cmnd *cmd)
{
char *buffer;
unsigned short use_sg;
int retvalue = 0, transfer_len = 0;
unsigned long flags;
struct CMD_MESSAGE_FIELD *pcmdmessagefld;
uint32_t controlcode = (uint32_t)cmd->cmnd[5] << 24 |
(uint32_t)cmd->cmnd[6] << 1... | [[2391, "\t\tuint32_t user_len;\n"], [2392, "\t\tint32_t cnt2end;\n"], [2401, "\t\tif (user_len > ARCMSR_API_DATA_BUFLEN) {\n"], [2402, "\t\t\tretvalue = ARCMSR_MESSAGE_FAIL;\n"], [2403, "\t\t\tkfree(ver_addr);\n"], [2404, "\t\t\tgoto message_out;\n"], [2405, "\t\t}\n"]] | [[2391, "uint32_t user_len;"], [2392, "int32_t cnt2end;"], [2401, "if (user_len > ARCMSR_API_DATA_BUFLEN)"], [2402, "retvalue = ARCMSR_MESSAGE_FAIL;"], [2403, "kfree(ver_addr);"], [2404, "goto message_out;"], [2405, "\t\t}\n"]] | [
"CVE-2016-7425"
] | [
"CWE-119"
] | 166 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [
"acb",
"cmd"
],
"Globals": [
"ARCMSR_API_DATA_BUFLEN"
],
"Type Execution Declaration": [
"struct AdapterControlBlock",
"struct scsi_cmnd",
"struct CMD_MESSAGE_FIELD"
]
} |
167 | linux | https://github.com/torvalds/linux | fs/nfs/nfs4proc.c | 7d3e91a89b7adbc2831334def9e494dd9892f9af | NFSv4: Check for buffer length in __nfs4_get_acl_uncached
Commit 1f1ea6c "NFSv4: Fix buffer overflow checking in
__nfs4_get_acl_uncached" accidently dropped the checking for too small
result buffer length.
If someone uses getxattr on "system.nfs4_acl" on an NFSv4 mount
supporting ACLs, the ACL has not been cached and... | true | 8bafca1e0289a4f2bd72bbd154c0af29 | __nfs4_get_acl_uncached | static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t buflen)
{
struct page *pages[NFS4ACL_MAXPAGES] = {NULL, };
struct nfs_getaclargs args = {
.fh = NFS_FH(inode),
.acl_pages = pages,
.acl_len = buflen,
};
struct nfs_getaclres res = {
.acl_len = buflen,
};
struct rpc_message msg =... | [[3940, "\tif (buf)\n"]] | [[3940, "if (buf)"]] | [
"CVE-2013-4591"
] | [
"CWE-119"
] | 168 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"nfs4_call_sync",
"_copy_from_pages",
"NFS_SERVER"
],
"Function Argument": [
"buf",
"buflen",
"inode"
],
"Globals": [
"NFS4ACL_MAXPAGES",
"NFS_FH",
"nfs4_procedures",
"NFSPROC4_CLNT_GETACL",
... |
168 | linux | https://github.com/torvalds/linux | fs/nfs/nfs4proc.c | 7d3e91a89b7adbc2831334def9e494dd9892f9af | NFSv4: Check for buffer length in __nfs4_get_acl_uncached
Commit 1f1ea6c "NFSv4: Fix buffer overflow checking in
__nfs4_get_acl_uncached" accidently dropped the checking for too small
result buffer length.
If someone uses getxattr on "system.nfs4_acl" on an NFSv4 mount
supporting ACLs, the ACL has not been cached and... | false | cda4bd7037cf4caf3b4a5d8364d4ec7b | __nfs4_get_acl_uncached | static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t buflen)
{
struct page *pages[NFS4ACL_MAXPAGES] = {NULL, };
struct nfs_getaclargs args = {
.fh = NFS_FH(inode),
.acl_pages = pages,
.acl_len = buflen,
};
struct nfs_getaclres res = {
.acl_len = buflen,
};
struct rpc_message msg =... | [[3940, "\tif (buf) {\n"], [3941, "\t\tif (res.acl_len > buflen) {\n"], [3942, "\t\t\tret = -ERANGE;\n"], [3943, "\t\t\tgoto out_free;\n"], [3944, "\t\t}\n"], [3946, "\t}\n"]] | [[3940, "if (buf)"], [3941, "if (res.acl_len > buflen)"], [3942, "ret = -ERANGE;"], [3943, "goto out_free;"], [3944, "\t\t}\n"], [3946, "\t}\n"]] | [
"CVE-2013-4591"
] | [
"CWE-119"
] | 168 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"nfs4_call_sync",
"_copy_from_pages",
"NFS_SERVER"
],
"Function Argument": [
"buf",
"buflen",
"inode"
],
"Globals": [
"NFS4ACL_MAXPAGES",
"NFS_FH",
"nfs4_procedures",
"NFSPROC4_CLNT_GETACL",
... |
169 | linux | https://github.com/torvalds/linux | fs/proc/base.c | 7f7ccc2ccc2e70c6054685f5e3522efa81556830 | proc: do not access cmdline nor environ from file-backed areas
proc_pid_cmdline_read() and environ_read() directly access the target
process' VM to retrieve the command line and environment. If this
process remaps these areas onto a file via mmap(), the requesting
process may experience various issues such as extra de... | true | 764e4ce5b0d7440515fd09a5984c10d0 | proc_pid_cmdline_read | static ssize_t proc_pid_cmdline_read(struct file *file, char __user *buf,
size_t _count, loff_t *pos)
{
struct task_struct *tsk;
struct mm_struct *mm;
char *page;
unsigned long count = _count;
unsigned long arg_start, arg_end, env_start, env_end;
unsigned long len1, len2, len;
unsigned long p;
char c;
... | [[264, "\trv = access_remote_vm(mm, arg_end - 1, &c, 1, 0);\n"], [282, "\t\t\tnr_read = access_remote_vm(mm, p, page, _count, 0);\n"], [328, "\t\t\t\tnr_read = access_remote_vm(mm, p, page, _count, 0);\n"]] | [[264, "rv = access_remote_vm(mm, arg_end - 1, &c, 1, 0);"], [282, "nr_read = access_remote_vm(mm, p, page, _count, 0);"], [328, "nr_read = access_remote_vm(mm, p, page, _count, 0);"]] | [
"CVE-2018-1120"
] | [
"CWE-119"
] | 171 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"access_remote_vm"
],
"Function Argument": [],
"Globals": [
"FOLL_ANON"
],
"Type Execution Declaration": [
"struct mm_struct"
]
} |
170 | linux | https://github.com/torvalds/linux | fs/proc/base.c | 7f7ccc2ccc2e70c6054685f5e3522efa81556830 | proc: do not access cmdline nor environ from file-backed areas
proc_pid_cmdline_read() and environ_read() directly access the target
process' VM to retrieve the command line and environment. If this
process remaps these areas onto a file via mmap(), the requesting
process may experience various issues such as extra de... | true | 6f13c3e6dd0cb52042d1c9cc40ac54e7 | environ_read | static ssize_t environ_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
char *page;
unsigned long src = *ppos;
int ret = 0;
struct mm_struct *mm = file->private_data;
unsigned long env_start, env_end;
/* Ensure the process spawned far enough to have an environment. */
if (!mm || !mm->e... | [[949, "\t\tretval = access_remote_vm(mm, (env_start + src), page, this_len, 0);\n"]] | [[949, "retval = access_remote_vm(mm, (env_start + src), page, this_len, 0);"]] | [
"CVE-2018-1120"
] | [
"CWE-119"
] | 172 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"access_remote_vm",
"mmget_not_zero",
"mmput"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": [
"struct mm_struct"
]
} |
171 | linux | https://github.com/torvalds/linux | fs/proc/base.c | 7f7ccc2ccc2e70c6054685f5e3522efa81556830 | proc: do not access cmdline nor environ from file-backed areas
proc_pid_cmdline_read() and environ_read() directly access the target
process' VM to retrieve the command line and environment. If this
process remaps these areas onto a file via mmap(), the requesting
process may experience various issues such as extra de... | false | 2274861c1f2ca396e45ad263e451f2d3 | proc_pid_cmdline_read | static ssize_t proc_pid_cmdline_read(struct file *file, char __user *buf,
size_t _count, loff_t *pos)
{
struct task_struct *tsk;
struct mm_struct *mm;
char *page;
unsigned long count = _count;
unsigned long arg_start, arg_end, env_start, env_end;
unsigned long len1, len2, len;
unsigned long p;
char c;
... | [[264, "\trv = access_remote_vm(mm, arg_end - 1, &c, 1, FOLL_ANON);\n"], [282, "\t\t\tnr_read = access_remote_vm(mm, p, page, _count, FOLL_ANON);\n"], [328, "\t\t\t\tnr_read = access_remote_vm(mm, p, page, _count, FOLL_ANON);\n"]] | [[264, "rv = access_remote_vm(mm, arg_end - 1, &c, 1, FOLL_ANON);"], [282, "nr_read = access_remote_vm(mm, p, page, _count, FOLL_ANON);"], [328, "nr_read = access_remote_vm(mm, p, page, _count, FOLL_ANON);"]] | [
"CVE-2018-1120"
] | [
"CWE-119"
] | 171 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"access_remote_vm"
],
"Function Argument": [],
"Globals": [
"FOLL_ANON"
],
"Type Execution Declaration": [
"struct mm_struct"
]
} |
172 | linux | https://github.com/torvalds/linux | fs/proc/base.c | 7f7ccc2ccc2e70c6054685f5e3522efa81556830 | proc: do not access cmdline nor environ from file-backed areas
proc_pid_cmdline_read() and environ_read() directly access the target
process' VM to retrieve the command line and environment. If this
process remaps these areas onto a file via mmap(), the requesting
process may experience various issues such as extra de... | false | 05626aaf22698ff8a45bc691a2911579 | environ_read | static ssize_t environ_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
char *page;
unsigned long src = *ppos;
int ret = 0;
struct mm_struct *mm = file->private_data;
unsigned long env_start, env_end;
/* Ensure the process spawned far enough to have an environment. */
if (!mm || !mm->e... | [[949, "\t\tretval = access_remote_vm(mm, (env_start + src), page, this_len, FOLL_ANON);\n"]] | [[949, "retval = access_remote_vm(mm, (env_start + src), page, this_len, FOLL_ANON);"]] | [
"CVE-2018-1120"
] | [
"CWE-119"
] | 172 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"access_remote_vm",
"mmget_not_zero",
"mmput"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": [
"struct mm_struct"
]
} |
173 | linux | https://github.com/torvalds/linux | mm/gup.c | 7f7ccc2ccc2e70c6054685f5e3522efa81556830 | proc: do not access cmdline nor environ from file-backed areas
proc_pid_cmdline_read() and environ_read() directly access the target
process' VM to retrieve the command line and environment. If this
process remaps these areas onto a file via mmap(), the requesting
process may experience various issues such as extra de... | true | e6f012844c34936082f9b6d4a6664b04 | check_vma_flags | static int check_vma_flags(struct vm_area_struct *vma, unsigned long gup_flags)
{
vm_flags_t vm_flags = vma->vm_flags;
int write = (gup_flags & FOLL_WRITE);
int foreign = (gup_flags & FOLL_REMOTE);
if (vm_flags & (VM_IO | VM_PFNMAP))
return -EFAULT;
if (write) {
if (!(vm_flags & VM_WRITE)) {
if (!(gup_fla... | [] | [] | [
"CVE-2018-1120"
] | [
"CWE-119"
] | 174 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"vma_is_anonymous"
],
"Function Argument": [
"struct vm_area_struct *vma",
"unsigned long gup_flags"
],
"Globals": [
"FOLL_ANON"
],
"Type Execution Declaration": [
"struct vm_area_struct"
]
} |
174 | linux | https://github.com/torvalds/linux | mm/gup.c | 7f7ccc2ccc2e70c6054685f5e3522efa81556830 | proc: do not access cmdline nor environ from file-backed areas
proc_pid_cmdline_read() and environ_read() directly access the target
process' VM to retrieve the command line and environment. If this
process remaps these areas onto a file via mmap(), the requesting
process may experience various issues such as extra de... | false | 6d5e7c7002589c136cd6a52014015428 | check_vma_flags | static int check_vma_flags(struct vm_area_struct *vma, unsigned long gup_flags)
{
vm_flags_t vm_flags = vma->vm_flags;
int write = (gup_flags & FOLL_WRITE);
int foreign = (gup_flags & FOLL_REMOTE);
if (vm_flags & (VM_IO | VM_PFNMAP))
return -EFAULT;
if (gup_flags & FOLL_ANON && !vma_is_anonymous(vma))
return... | [[547, "\tif (gup_flags & FOLL_ANON && !vma_is_anonymous(vma))\n"], [548, "\t\treturn -EFAULT;\n"], [549, "\n"]] | [[547, "if (gup_flags & FOLL_ANON && !vma_is_anonymous(vma))"], [548, "return -EFAULT;"], [549, "\n"]] | [
"CVE-2018-1120"
] | [
"CWE-119"
] | 174 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"vma_is_anonymous"
],
"Function Argument": [
"struct vm_area_struct *vma",
"unsigned long gup_flags"
],
"Globals": [
"FOLL_ANON"
],
"Type Execution Declaration": [
"struct vm_area_struct"
]
} |
175 | linux | https://github.com/torvalds/linux | net/core/sock.c | 82981930125abfd39d7c8378a9cfdf5e1be2002b | net: cleanups in sock_setsockopt()
Use min_t()/max_t() macros, reformat two comments, use !!test_bit() to
match !!sock_flag()
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | true | 83f87045cee3eaa7801393d7f119b59c | sock_setsockopt | int sock_setsockopt(struct socket *sock, int level, int optname,
char __user *optval, unsigned int optlen)
{
struct sock *sk = sock->sk;
int val;
int valbool;
struct linger ling;
int ret = 0;
/*
* Options without arguments
*/
if (optname == SO_BINDTODEVICE)
return sock_bindtodevice(sk, optval, optl... | [[580, "\t\t about it this is right. Otherwise apps have to\n"], [581, "\t\t play 'guess the biggest size' games. RCVBUF/SNDBUF\n"], [582, "\t\t are treated in BSD as hints */\n"], [583, "\n"], [584, "\t\tif (val > sysctl_wmem_max)\n"], [585, "\t\t\tval = sysctl_wmem_max;\n"], [588, "\t\tif ((val * 2) < SOCK_MIN_... | [[578, "case SO_SNDBUF:\n\t\t/* Don't error on this BSD doesn't and if you think\n\t\t about it this is right. Otherwise apps have to\n\t\t play 'guess the biggest size' games. RCVBUF/SNDBUF\n\t\t are treated in BSD as hints */\n\n\t\tif (val > sysctl_wmem_max)\n\t\t\tval = sysctl_wmem_max;\nset_sndbuf:\n\t\tsk->... | [
"CVE-2012-6704"
] | [
"CWE-119"
] | 176 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [],
"Globals": [
"sysctl_wmem_max",
"sysctl_rmem_max",
"SOCK_MIN_SNDBUF",
"SOCK_MIN_RCVBUF"
],
"Type Execution Declaration": []
} |
176 | linux | https://github.com/torvalds/linux | net/core/sock.c | 82981930125abfd39d7c8378a9cfdf5e1be2002b | net: cleanups in sock_setsockopt()
Use min_t()/max_t() macros, reformat two comments, use !!test_bit() to
match !!sock_flag()
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | false | 0b936c147f9b643a4d5631b40ff4c522 | sock_setsockopt | int sock_setsockopt(struct socket *sock, int level, int optname,
char __user *optval, unsigned int optlen)
{
struct sock *sk = sock->sk;
int val;
int valbool;
struct linger ling;
int ret = 0;
/*
* Options without arguments
*/
if (optname == SO_BINDTODEVICE)
return sock_bindtodevice(sk, optval, optl... | [[580, "\t\t * about it this is right. Otherwise apps have to\n"], [581, "\t\t * play 'guess the biggest size' games. RCVBUF/SNDBUF\n"], [582, "\t\t * are treated in BSD as hints\n"], [583, "\t\t */\n"], [584, "\t\tval = min_t(u32, val, sysctl_wmem_max);\n"], [587, "\t\tsk->sk_sndbuf = max_t(u32, val * 2, SOCK_MIN_SNDB... | [[579, "/* Don't error on this BSD doesn't and if you think\n\t\t * about it this is right. Otherwise apps have to\n\t\t * play 'guess the biggest size' games. RCVBUF/SNDBUF\n\t\t * are treated in BSD as hints\n\t\t */"], [584, "val = min_t(u32, val, sysctl_wmem_max);"], [587, "sk->sk_sndbuf = max_t(u32, val * 2, SOCK_... | [
"CVE-2012-6704"
] | [
"CWE-119"
] | 176 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [],
"Globals": [
"sysctl_wmem_max",
"sysctl_rmem_max",
"SOCK_MIN_SNDBUF",
"SOCK_MIN_RCVBUF"
],
"Type Execution Declaration": []
} |
177 | linux | https://github.com/torvalds/linux | drivers/hid/hid-picolcd_core.c | 844817e47eef14141cf59b8d5ac08dd11c0a9189 | HID: picolcd: sanity check report size in raw_event() callback
The report passed to us from transport driver could potentially be
arbitrarily large, therefore we better sanity-check it so that raw_data
that we hold in picolcd_pending structure are always kept within proper
bounds.
Cc: stable@vger.kernel.org
Reported-... | true | 0c02819885038a57c3db7c03fca3cd8a | picolcd_raw_event | static int picolcd_raw_event(struct hid_device *hdev,
struct hid_report *report, u8 *raw_data, int size)
{
struct picolcd_data *data = hid_get_drvdata(hdev);
unsigned long flags;
int ret = 0;
if (!data)
return 1;
if (report->id == REPORT_KEY_STATE) {
if (data->input_keys)
ret = picolcd_raw_keypad(data, ... | [] | [] | [
"CVE-2014-3186"
] | [
"CWE-119"
] | 178 | {
"Execution Environment": [
"report received from transport driver/physical device"
],
"Explanation": null,
"External Function": [
"hid_get_drvdata"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": [
"struct picolcd_pending",
"struct picolcd_data"
]
} |
178 | linux | https://github.com/torvalds/linux | drivers/hid/hid-picolcd_core.c | 844817e47eef14141cf59b8d5ac08dd11c0a9189 | HID: picolcd: sanity check report size in raw_event() callback
The report passed to us from transport driver could potentially be
arbitrarily large, therefore we better sanity-check it so that raw_data
that we hold in picolcd_pending structure are always kept within proper
bounds.
Cc: stable@vger.kernel.org
Reported-... | false | ea2ff4f307e665efbcde8e21a5013e51 | picolcd_raw_event | static int picolcd_raw_event(struct hid_device *hdev,
struct hid_report *report, u8 *raw_data, int size)
{
struct picolcd_data *data = hid_get_drvdata(hdev);
unsigned long flags;
int ret = 0;
if (!data)
return 1;
if (size > 64) {
hid_warn(hdev, "invalid size value (%d) for picolcd raw event\n",
size);
... | [[353, "\tif (size > 64) {\n"], [354, "\t\thid_warn(hdev, \"invalid size value (%d) for picolcd raw event\\n\",\n"], [355, "\t\t\t\tsize);\n"], [356, "\t\treturn 0;\n"], [357, "\t}\n"], [358, "\n"]] | [[353, "if (size > 64)"], [354, "hid_warn(hdev, \"invalid size value (%d) for picolcd raw event\\n\",\n\t\t\t\tsize);"], [356, "return 0;"], [357, "\t}\n"], [358, "\n"]] | [
"CVE-2014-3186"
] | [
"CWE-119"
] | 178 | {
"Execution Environment": [
"report received from transport driver/physical device"
],
"Explanation": null,
"External Function": [
"hid_get_drvdata"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": [
"struct picolcd_pending",
"struct picolcd_data"
]
} |
179 | linux | https://github.com/torvalds/linux | net/key/af_key.c | 85dfb745ee40232876663ae206cba35f24ab2a40 | af_key: initialize satype in key_notify_policy_flush()
This field was left uninitialized. Some user daemons perform check against this
field.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> | true | d40745e343ad37922542b6274e55e7b0 | key_notify_policy_flush | static int key_notify_policy_flush(const struct km_event *c)
{
struct sk_buff *skb_out;
struct sadb_msg *hdr;
skb_out = alloc_skb(sizeof(struct sadb_msg) + 16, GFP_ATOMIC);
if (!skb_out)
return -ENOBUFS;
hdr = (struct sadb_msg *) skb_put(skb_out, sizeof(struct sadb_msg));
hdr->sadb_msg_type = SADB_X_SPDFLUSH;
... | [] | [] | [
"CVE-2013-2237"
] | [
"CWE-119"
] | 180 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [],
"Globals": [
"SADB_X_SPDFLUSH",
"SADB_SATYPE_UNSPEC",
"PF_KEY_V2",
"BROADCAST_ALL"
],
"Type Execution Declaration": [
"struct sadb_msg"
]
} |
180 | linux | https://github.com/torvalds/linux | net/key/af_key.c | 85dfb745ee40232876663ae206cba35f24ab2a40 | af_key: initialize satype in key_notify_policy_flush()
This field was left uninitialized. Some user daemons perform check against this
field.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> | false | 2017cf3728707146058b022eddbecd5a | key_notify_policy_flush | static int key_notify_policy_flush(const struct km_event *c)
{
struct sk_buff *skb_out;
struct sadb_msg *hdr;
skb_out = alloc_skb(sizeof(struct sadb_msg) + 16, GFP_ATOMIC);
if (!skb_out)
return -ENOBUFS;
hdr = (struct sadb_msg *) skb_put(skb_out, sizeof(struct sadb_msg));
hdr->sadb_msg_type = SADB_X_SPDFLUSH;
... | [[2697, "\thdr->sadb_msg_satype = SADB_SATYPE_UNSPEC;\n"]] | [[2697, "hdr->sadb_msg_satype = SADB_SATYPE_UNSPEC;"]] | [
"CVE-2013-2237"
] | [
"CWE-119"
] | 180 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [],
"Globals": [
"SADB_X_SPDFLUSH",
"SADB_SATYPE_UNSPEC",
"PF_KEY_V2",
"BROADCAST_ALL"
],
"Type Execution Declaration": [
"struct sadb_msg"
]
} |
181 | linux | https://github.com/torvalds/linux | net/sctp/protocol.c | 8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4 | sctp: fix race on protocol/netns initialization
Consider sctp module is unloaded and is being requested because an user
is creating a sctp socket.
During initialization, sctp will add the new protocol type and then
initialize pernet subsys:
status = sctp_v4_protosw_init();
if (status)
... | true | 48ae8a2d30a17863e601e4d7849218ce | sctp_init | static __init int sctp_init(void)
{
int i;
int status = -EINVAL;
unsigned long goal;
unsigned long limit;
int max_share;
int order;
sock_skb_cb_check_size(sizeof(struct sctp_ulpevent));
/* Allocate bind_bucket and chunk caches. */
status = -ENOBUFS;
sctp_bucket_cachep = kmem_cache_create("sctp_bind_bucket",... | [[1465, "\tstatus = sctp_v4_protosw_init();\n"], [1474, "\tstatus = register_pernet_subsys(&sctp_net_ops);\n"], [1476, "\t\tgoto err_register_pernet_subsys;\n"], [1492, "\tunregister_pernet_subsys(&sctp_net_ops);\n"], [1493, "err_register_pernet_subsys:\n"]] | [[1465, "status = sctp_v4_protosw_init();"], [1474, "status = register_pernet_subsys(&sctp_net_ops);"], [1476, "goto err_register_pernet_subsys;"], [1492, "unregister_pernet_subsys(&sctp_net_ops);"], [1493, "err_register_pernet_subsys:"]] | [
"CVE-2015-5283"
] | [
"CWE-119"
] | 182 | {
"Execution Environment": [
"userspace SCTP socket creation",
"RCU-walk of inetsw table"
],
"Explanation": null,
"External Function": [
"register_pernet_subsys",
"sctp_v4_protosw_init",
"sctp_v6_protosw_init"
],
"Function Argument": [],
"Globals": [
"sctp_net_ops"
],
"Type Exe... |
182 | linux | https://github.com/torvalds/linux | net/sctp/protocol.c | 8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4 | sctp: fix race on protocol/netns initialization
Consider sctp module is unloaded and is being requested because an user
is creating a sctp socket.
During initialization, sctp will add the new protocol type and then
initialize pernet subsys:
status = sctp_v4_protosw_init();
if (status)
... | false | a5f8f35b664a42da94d79382e995d568 | sctp_init | static __init int sctp_init(void)
{
int i;
int status = -EINVAL;
unsigned long goal;
unsigned long limit;
int max_share;
int order;
sock_skb_cb_check_size(sizeof(struct sctp_ulpevent));
/* Allocate bind_bucket and chunk caches. */
status = -ENOBUFS;
sctp_bucket_cachep = kmem_cache_create("sctp_bind_bucket",... | [[1476, "\tstatus = register_pernet_subsys(&sctp_defaults_ops);\n"], [1477, "\tif (status)\n"], [1478, "\t\tgoto err_register_defaults;\n"], [1480, "\tstatus = sctp_v4_protosw_init();\n"], [1488, "\tstatus = register_pernet_subsys(&sctp_ctrlsock_ops);\n"], [1490, "\t\tgoto err_register_ctrlsock;\n"], [1506, "\tunregist... | [[1476, "status = register_pernet_subsys(&sctp_defaults_ops);"], [1477, "if (status)"], [1478, "goto err_register_defaults;"], [1480, "status = sctp_v4_protosw_init();"], [1488, "status = register_pernet_subsys(&sctp_ctrlsock_ops);"], [1490, "goto err_register_ctrlsock;"], [1506, "unregister_pernet_subsys(&sctp_ctrlsoc... | [
"CVE-2015-5283"
] | [
"CWE-119"
] | 182 | {
"Execution Environment": [
"userspace SCTP socket creation",
"RCU-walk of inetsw table"
],
"Explanation": null,
"External Function": [
"register_pernet_subsys",
"sctp_v4_protosw_init",
"sctp_v6_protosw_init"
],
"Function Argument": [],
"Globals": [
"sctp_net_ops"
],
"Type Exe... |
183 | linux | https://github.com/torvalds/linux | drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 8f44c9a41386729fea410e688959ddaa9d51be7c | brcmfmac: fix possible buffer overflow in brcmf_cfg80211_mgmt_tx()
The lower level nl80211 code in cfg80211 ensures that "len" is between
25 and NL80211_ATTR_FRAME (2304). We subtract DOT11_MGMT_HDR_LEN (24) from
"len" so thats's max of 2280. However, the action_frame->data[] buffer is
only BRCMF_FIL_ACTION_FRAME_SI... | true | d2d8c703c187b0ef35454dcb43fd62b7 | brcmf_cfg80211_mgmt_tx | static int
brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
struct cfg80211_mgmt_tx_params *params, u64 *cookie)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct ieee80211_channel *chan = params->chan;
const u8 *buf = params->buf;
size_t len = params->len;
const struct... | [] | [] | [
"CVE-2017-7541"
] | [
"CWE-119"
] | 184 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [],
"Globals": [
"BRCMF_FIL_ACTION_FRAME_SIZE",
"DOT11_MGMT_HDR_LEN"
],
"Type Execution Declaration": [
"struct brcmf_fil_action_frame_le",
"struct brcmf_fil_af_params_le"
]
} |
184 | linux | https://github.com/torvalds/linux | drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 8f44c9a41386729fea410e688959ddaa9d51be7c | brcmfmac: fix possible buffer overflow in brcmf_cfg80211_mgmt_tx()
The lower level nl80211 code in cfg80211 ensures that "len" is between
25 and NL80211_ATTR_FRAME (2304). We subtract DOT11_MGMT_HDR_LEN (24) from
"len" so thats's max of 2280. However, the action_frame->data[] buffer is
only BRCMF_FIL_ACTION_FRAME_SI... | false | 18bf1e86637dadf4e51ab0d3628fa3e9 | brcmf_cfg80211_mgmt_tx | static int
brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
struct cfg80211_mgmt_tx_params *params, u64 *cookie)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct ieee80211_channel *chan = params->chan;
const u8 *buf = params->buf;
size_t len = params->len;
const struct... | [[4937, "\t\tif (len > BRCMF_FIL_ACTION_FRAME_SIZE + DOT11_MGMT_HDR_LEN) {\n"], [4938, "\t\t\tbrcmf_err(\"invalid action frame length\\n\");\n"], [4939, "\t\t\terr = -EINVAL;\n"], [4940, "\t\t\tgoto exit;\n"], [4941, "\t\t}\n"]] | [[4937, "if (len > BRCMF_FIL_ACTION_FRAME_SIZE + DOT11_MGMT_HDR_LEN)"], [4938, "brcmf_err(\"invalid action frame length\\n\");"], [4939, "err = -EINVAL;"], [4940, "goto exit;"], [4941, "\t\t}\n"]] | [
"CVE-2017-7541"
] | [
"CWE-119"
] | 184 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [],
"Globals": [
"BRCMF_FIL_ACTION_FRAME_SIZE",
"DOT11_MGMT_HDR_LEN"
],
"Type Execution Declaration": [
"struct brcmf_fil_action_frame_le",
"struct brcmf_fil_af_params_le"
]
} |
185 | linux | https://github.com/torvalds/linux | net/packet/af_packet.c | 8f8d28e4d6d815a391285e121c3a53a0b6cb9e7b | net/packet: fix overflow in check for tp_frame_nr
When calculating rb->frames_per_block * req->tp_block_nr the result
can overflow.
Add a check that tp_block_size * tp_block_nr <= UINT_MAX.
Since frames_per_block <= tp_block_size, the expression would
never overflow.
Signed-off-by: Andrey Konovalov <andreyknvl@goog... | false | 30d99e079186810d503bfb2873ec70f9 | packet_set_ring | static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
int closing, int tx_ring)
{
struct pgv *pg_vec = NULL;
struct packet_sock *po = pkt_sk(sk);
int was_running, order = 0;
struct packet_ring_buffer *rb;
struct sk_buff_head *rb_queue;
__be16 num;
int err = -EINVAL;
/* Added to avoid minimal... | [[4208, "\t\tif (unlikely(req->tp_block_size > UINT_MAX / req->tp_block_nr))\n"], [4209, "\t\t\tgoto out;\n"]] | [[4208, "if (unlikely(req->tp_block_size > UINT_MAX / req->tp_block_nr))"], [4209, "goto out;"]] | [
"CVE-2017-7308"
] | [
"CWE-787"
] | null | {
"Execution Environment": null,
"Explanation": null,
"External Function": null,
"Function Argument": null,
"Globals": null,
"Type Execution Declaration": null
} |
186 | linux | https://github.com/torvalds/linux | drivers/usb/chipidea/host.c | 929473ea05db455ad88cdc081f2adc556b8dc48f | usb: chipidea: Allow disabling streaming not only in udc mode
When running a scp transfer using a USB/Ethernet adapter the following crash
happens:
$ scp test.tar.gz fabio@192.168.1.100:/home/fabio
fabio@192.168.1.100's password:
test.tar.gz 0% 0 0.0KB/s --:-- ETA
-------... | true | 52136107fe2a3b688543b5dbc803c9f6 | host_start | static int host_start(struct ci13xxx *ci)
{
struct usb_hcd *hcd;
struct ehci_hcd *ehci;
int ret;
if (usb_disabled())
return -ENODEV;
hcd = usb_create_hcd(&ci_ehci_hc_driver, ci->dev, dev_name(ci->dev));
if (!hcd)
return -ENOMEM;
dev_set_drvdata(ci->dev, ci);
hcd->rsrc_start = ci->hw_bank.phys;
hcd->rsrc... | [] | [] | [
"CVE-2013-2058"
] | [
"CWE-119"
] | 187 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"hw_write"
],
"Function Argument": [],
"Globals": [
"CI13XXX_DISABLE_STREAMING",
"OP_USBMODE",
"USBMODE_CI_SDIS"
],
"Type Execution Declaration": []
} |
187 | linux | https://github.com/torvalds/linux | drivers/usb/chipidea/host.c | 929473ea05db455ad88cdc081f2adc556b8dc48f | usb: chipidea: Allow disabling streaming not only in udc mode
When running a scp transfer using a USB/Ethernet adapter the following crash
happens:
$ scp test.tar.gz fabio@192.168.1.100:/home/fabio
fabio@192.168.1.100's password:
test.tar.gz 0% 0 0.0KB/s --:-- ETA
-------... | false | 06bf6f28d04a42faaedae0c9fba7a116 | host_start | static int host_start(struct ci13xxx *ci)
{
struct usb_hcd *hcd;
struct ehci_hcd *ehci;
int ret;
if (usb_disabled())
return -ENODEV;
hcd = usb_create_hcd(&ci_ehci_hc_driver, ci->dev, dev_name(ci->dev));
if (!hcd)
return -ENOMEM;
dev_set_drvdata(ci->dev, ci);
hcd->rsrc_start = ci->hw_bank.phys;
hcd->rsrc... | [[73, "\tif (ci->platdata->flags & CI13XXX_DISABLE_STREAMING)\n"], [74, "\t\thw_write(ci, OP_USBMODE, USBMODE_CI_SDIS, USBMODE_CI_SDIS);\n"], [75, "\n"]] | [[73, "if (ci->platdata->flags & CI13XXX_DISABLE_STREAMING)"], [74, "hw_write(ci, OP_USBMODE, USBMODE_CI_SDIS, USBMODE_CI_SDIS);"], [75, "\n"]] | [
"CVE-2013-2058"
] | [
"CWE-119"
] | 187 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"hw_write"
],
"Function Argument": [],
"Globals": [
"CI13XXX_DISABLE_STREAMING",
"OP_USBMODE",
"USBMODE_CI_SDIS"
],
"Type Execution Declaration": []
} |
188 | linux | https://github.com/torvalds/linux | drivers/hid/usbhid/hiddev.c | 93a2001bdfd5376c3dc2158653034c20392d15c5 | HID: hiddev: validate num_values for HIDIOCGUSAGES, HIDIOCSUSAGES commands
This patch validates the num_values parameter from userland during the
HIDIOCGUSAGES and HIDIOCSUSAGES commands. Previously, if the report id was set
to HID_REPORT_ID_UNKNOWN, we would fail to validate the num_values parameter
leading to a heap... | true | 43b29c296a217d0aa2b6233b31f0a8f5 | hiddev_ioctl_usage | static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd, void __user *user_arg)
{
struct hid_device *hid = hiddev->hid;
struct hiddev_report_info rinfo;
struct hiddev_usage_ref_multi *uref_multi = NULL;
struct hiddev_usage_ref *uref;
struct hid_report *report;
struct hid_field *field;
int ... | [[519, "\n"], [520, "\t\t\telse if ((cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) &&\n"], [521, "\t\t\t\t (uref_multi->num_values > HID_MAX_MULTI_USAGES ||\n"], [522, "\t\t\t\t uref->usage_index + uref_multi->num_values > field->report_count))\n"], [523, "\t\t\t\tgoto inval;\n"]] | [[517, "if (uref->usage_index >= field->report_count)"], [520, "if ((cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) &&\n\t\t\t\t (uref_multi->num_values > HID_MAX_MULTI_USAGES ||\n\t\t\t\t uref->usage_index + uref_multi->num_values > field->report_count))"], [520, "else if ((cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES... | [
"CVE-2016-5829"
] | [
"CWE-119"
] | 189 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"hiddev_lookup_report",
"hiddev_lookup_usage"
],
"Function Argument": [
"hiddev",
"cmd",
"user_arg"
],
"Globals": [
"HIDIOCGUSAGES",
"HIDIOCSUSAGES",
"HID_MAX_MULTI_USAGES",
"HID_REPORT_ID_UNKNOW... |
189 | linux | https://github.com/torvalds/linux | drivers/hid/usbhid/hiddev.c | 93a2001bdfd5376c3dc2158653034c20392d15c5 | HID: hiddev: validate num_values for HIDIOCGUSAGES, HIDIOCSUSAGES commands
This patch validates the num_values parameter from userland during the
HIDIOCGUSAGES and HIDIOCSUSAGES commands. Previously, if the report id was set
to HID_REPORT_ID_UNKNOWN, we would fail to validate the num_values parameter
leading to a heap... | false | ea1d51ada79e1ff2e306736bde69f603 | hiddev_ioctl_usage | static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd, void __user *user_arg)
{
struct hid_device *hid = hiddev->hid;
struct hiddev_report_info rinfo;
struct hiddev_usage_ref_multi *uref_multi = NULL;
struct hiddev_usage_ref *uref;
struct hid_report *report;
struct hid_field *field;
int ... | [[521, "\t\tif ((cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) &&\n"], [522, "\t\t (uref_multi->num_values > HID_MAX_MULTI_USAGES ||\n"], [523, "\t\t uref->usage_index + uref_multi->num_values > field->report_count))\n"], [524, "\t\t\tgoto inval;\n"], [525, "\n"]] | [[493, "default:\n\t\tif (cmd != HIDIOCGUSAGE &&\n\t\t cmd != HIDIOCGUSAGES &&\n\t\t uref->report_type == HID_REPORT_TYPE_INPUT)\n\t\t\tgoto inval;\n\n\t\tif (uref->report_id == HID_REPORT_ID_UNKNOWN) {\n\t\t\tfield = hiddev_lookup_usage(hid, uref);\n\t\t\tif (field == NULL)\n\t\t\t\tgoto inval;\n\t\t} else {\n\t... | [
"CVE-2016-5829"
] | [
"CWE-119"
] | 189 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"hiddev_lookup_report",
"hiddev_lookup_usage"
],
"Function Argument": [
"hiddev",
"cmd",
"user_arg"
],
"Globals": [
"HIDIOCGUSAGES",
"HIDIOCSUSAGES",
"HID_MAX_MULTI_USAGES",
"HID_REPORT_ID_UNKNOW... |
190 | linux | https://github.com/torvalds/linux | tools/lib/bpf/btf_dump.c | 93c660ca40b5d2f7c1b1626e955a8e9fa30e0749 | libbpf: Fix use-after-free in btf_dump_name_dups
ASAN reports an use-after-free in btf_dump_name_dups:
ERROR: AddressSanitizer: heap-use-after-free on address 0xffff927006db at pc 0xaaaab5dfb618 bp 0xffffdd89b890 sp 0xffffdd89b928
READ of size 2 at 0xffff927006db thread T0
#0 0xaaaab5dfb614 in __interceptor_strcm... | true | b284aee0fbb2851c2f5526956432c4b6 | btf_dump_name_dups | static size_t btf_dump_name_dups(struct btf_dump *d, struct hashmap *name_map,
const char *orig_name)
{
size_t dup_cnt = 0;
hashmap__find(name_map, orig_name, (void **)&dup_cnt);
dup_cnt++;
hashmap__set(name_map, orig_name, (void *)dup_cnt, NULL, NULL);
return dup_cnt;
}
| [[1531, "\thashmap__set(name_map, orig_name, (void *)dup_cnt, NULL, NULL);\n"]] | [[1531, "hashmap__set(name_map, orig_name, (void *)dup_cnt, NULL, NULL);"]] | [
"CVE-2022-3534"
] | [
"CWE-416",
"CWE-119"
] | 191 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"hashmap__find",
"hashmap__set"
],
"Function Argument": [
"name_map",
"orig_name"
],
"Globals": [],
"Type Execution Declaration": []
} |
191 | linux | https://github.com/torvalds/linux | tools/lib/bpf/btf_dump.c | 93c660ca40b5d2f7c1b1626e955a8e9fa30e0749 | libbpf: Fix use-after-free in btf_dump_name_dups
ASAN reports an use-after-free in btf_dump_name_dups:
ERROR: AddressSanitizer: heap-use-after-free on address 0xffff927006db at pc 0xaaaab5dfb618 bp 0xffffdd89b890 sp 0xffffdd89b928
READ of size 2 at 0xffff927006db thread T0
#0 0xaaaab5dfb614 in __interceptor_strcm... | false | 4f402f2bea17fdfc4ce5f49f2e0b0182 | btf_dump_name_dups | static size_t btf_dump_name_dups(struct btf_dump *d, struct hashmap *name_map,
const char *orig_name)
{
char *old_name, *new_name;
size_t dup_cnt = 0;
int err;
new_name = strdup(orig_name);
if (!new_name)
return 1;
hashmap__find(name_map, orig_name, (void **)&dup_cnt);
dup_cnt++;
err = hashmap__set(na... | [[1538, "\tchar *old_name, *new_name;\n"], [1540, "\tint err;\n"], [1541, "\n"], [1542, "\tnew_name = strdup(orig_name);\n"], [1543, "\tif (!new_name)\n"], [1544, "\t\treturn 1;\n"], [1548, "\n"], [1549, "\terr = hashmap__set(name_map, new_name, (void *)dup_cnt,\n"], [1550, "\t\t\t (const void **)&old_name, NULL);\n"... | [[1538, "char *old_name, *new_name;"], [1540, "int err;"], [1541, "\n"], [1542, "new_name = strdup(orig_name);"], [1543, "if (!new_name)"], [1544, "return 1;"], [1548, "\n"], [1549, "err = hashmap__set(name_map, new_name, (void *)dup_cnt,\n\t\t\t (const void **)&old_name, NULL);"], [1551, "if (err)"], [1552, "free(ne... | [
"CVE-2022-3534"
] | [
"CWE-416",
"CWE-119"
] | 191 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"hashmap__find",
"hashmap__set"
],
"Function Argument": [
"name_map",
"orig_name"
],
"Globals": [],
"Type Execution Declaration": []
} |
192 | linux | https://github.com/torvalds/linux | fs/cifs/cifssmb.c | 9438fabb73eb48055b58b89fc51e0bc4db22fabd | cifs: fix possible memory corruption in CIFSFindNext
The name_len variable in CIFSFindNext is a signed int that gets set to
the resume_name_len in the cifs_search_info. The resume_name_len however
is unsigned and for some infolevels is populated directly from a 32 bit
value sent by the server.
If the server sends a v... | true | 532283b80810e03faa127713cbb08dd9 | CIFSFindNext | int CIFSFindNext(const int xid, struct cifs_tcon *tcon,
__u16 searchHandle, struct cifs_search_info *psrch_inf)
{
TRANSACTION2_FNEXT_REQ *pSMB = NULL;
TRANSACTION2_FNEXT_RSP *pSMBr = NULL;
T2_FNEXT_RSP_PARMS *parms;
char *response_data;
int rc = 0;
int bytes_returned, name_len;
__u16 params, byte_count;
cFY... | [[4082, "\tint bytes_returned, name_len;\n"]] | [[4082, "int bytes_returned, name_len;"]] | [
"CVE-2011-3191"
] | [
"CWE-119"
] | 193 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [
"struct cifs_search_info *psrch_inf"
],
"Globals": [],
"Type Execution Declaration": [
"struct cifs_search_info"
]
} |
193 | linux | https://github.com/torvalds/linux | fs/cifs/cifssmb.c | 9438fabb73eb48055b58b89fc51e0bc4db22fabd | cifs: fix possible memory corruption in CIFSFindNext
The name_len variable in CIFSFindNext is a signed int that gets set to
the resume_name_len in the cifs_search_info. The resume_name_len however
is unsigned and for some infolevels is populated directly from a 32 bit
value sent by the server.
If the server sends a v... | false | 7a3af641b20511e5f8c1d3bffc284d3b | CIFSFindNext | int CIFSFindNext(const int xid, struct cifs_tcon *tcon,
__u16 searchHandle, struct cifs_search_info *psrch_inf)
{
TRANSACTION2_FNEXT_REQ *pSMB = NULL;
TRANSACTION2_FNEXT_RSP *pSMBr = NULL;
T2_FNEXT_RSP_PARMS *parms;
char *response_data;
int rc = 0;
int bytes_returned;
unsigned int name_len;
__u16 params, byt... | [[4082, "\tint bytes_returned;\n"], [4083, "\tunsigned int name_len;\n"]] | [[4082, "int bytes_returned;"], [4083, "unsigned int name_len;"]] | [
"CVE-2011-3191"
] | [
"CWE-119"
] | 193 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [
"struct cifs_search_info *psrch_inf"
],
"Globals": [],
"Type Execution Declaration": [
"struct cifs_search_info"
]
} |
194 | linux | https://github.com/torvalds/linux | kernel/bpf/verifier.c | 95a762e2c8c942780948091f8f2a4f32fce1ac6f | bpf: fix incorrect sign extension in check_alu_op()
Distinguish between
BPF_ALU64|BPF_MOV|BPF_K (load 32-bit immediate, sign-extended to 64-bit)
and BPF_ALU|BPF_MOV|BPF_K (load 32-bit immediate, zero-padded to 64-bit);
only perform sign extension in the first case.
Starting with v4.14, this is exploitable by unprivil... | true | 0da32a31573aa5750819e94f773b7a6e | check_alu_op | static int check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn)
{
struct bpf_reg_state *regs = cur_regs(env);
u8 opcode = BPF_OP(insn->code);
int err;
if (opcode == BPF_END || opcode == BPF_NEG) {
if (opcode == BPF_NEG) {
if (BPF_SRC(insn->code) != 0 ||
insn->src_reg != BPF_REG_0 ||
... | [[2411, "\t\t\t__mark_reg_known(regs + insn->dst_reg, insn->imm);\n"]] | [[2411, "__mark_reg_known(regs + insn->dst_reg, insn->imm);"]] | [
"CVE-2017-16995"
] | [
"CWE-119"
] | 195 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"BPF_CLASS"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": []
} |
195 | linux | https://github.com/torvalds/linux | kernel/bpf/verifier.c | 95a762e2c8c942780948091f8f2a4f32fce1ac6f | bpf: fix incorrect sign extension in check_alu_op()
Distinguish between
BPF_ALU64|BPF_MOV|BPF_K (load 32-bit immediate, sign-extended to 64-bit)
and BPF_ALU|BPF_MOV|BPF_K (load 32-bit immediate, zero-padded to 64-bit);
only perform sign extension in the first case.
Starting with v4.14, this is exploitable by unprivil... | false | 52a4071e8cbda179c3bc923ca5412051 | check_alu_op | static int check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn)
{
struct bpf_reg_state *regs = cur_regs(env);
u8 opcode = BPF_OP(insn->code);
int err;
if (opcode == BPF_END || opcode == BPF_NEG) {
if (opcode == BPF_NEG) {
if (BPF_SRC(insn->code) != 0 ||
insn->src_reg != BPF_REG_0 ||
... | [[2411, "\t\t\tif (BPF_CLASS(insn->code) == BPF_ALU64) {\n"], [2412, "\t\t\t\t__mark_reg_known(regs + insn->dst_reg,\n"], [2413, "\t\t\t\t\t\t insn->imm);\n"], [2414, "\t\t\t} else {\n"], [2415, "\t\t\t\t__mark_reg_known(regs + insn->dst_reg,\n"], [2416, "\t\t\t\t\t\t (u32)insn->imm);\n"], [2417, "\t\t\t}\n"]] | [[2411, "if (BPF_CLASS(insn->code) == BPF_ALU64)"], [2412, "__mark_reg_known(regs + insn->dst_reg,\n\t\t\t\t\t\t insn->imm);"], [2414, "else"], [2415, "__mark_reg_known(regs + insn->dst_reg,\n\t\t\t\t\t\t (u32)insn->imm);"], [2417, "\t\t\t}\n"]] | [
"CVE-2017-16995"
] | [
"CWE-119"
] | 195 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [
"BPF_CLASS"
],
"Function Argument": [],
"Globals": [],
"Type Execution Declaration": []
} |
196 | linux | https://github.com/torvalds/linux | drivers/staging/ozwpan/ozusbsvc1.c | 9a59029bc218b48eff8b5d4dde5662fd79d3e1a8 | ozwpan: unchecked signed subtraction leads to DoS
The subtraction here was using a signed integer and did not have any
bounds checking at all. This commit adds proper bounds checking, made
easy by use of an unsigned integer. This way, a single packet won't be
able to remotely trigger a massive loop, locking up the sys... | true | 389cdc961f883f69a6874c82f5359a83 | oz_usb_handle_ep_data | static void oz_usb_handle_ep_data(struct oz_usb_ctx *usb_ctx,
struct oz_usb_hdr *usb_hdr, int len)
{
struct oz_data *data_hdr = (struct oz_data *)usb_hdr;
switch (data_hdr->format) {
case OZ_DATA_F_MULTIPLE_FIXED: {
struct oz_multiple_fixed *body =
(struct oz_multiple_fixed *)data_hdr;
u8 *data = body->d... | [[329, "\t\t\tint n;\n"], [330, "\t\t\tif (!body->unit_size)\n"], [332, "\t\t\tn = (len - sizeof(struct oz_multiple_fixed)+1)\n"]] | [[329, "int n;"], [330, "if (!body->unit_size)"], [332, "n = (len - sizeof(struct oz_multiple_fixed)+1)\n\t\t\t\t/ body->unit_size;"]] | [
"CVE-2015-4002"
] | [
"CWE-119"
] | 197 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [
"len"
],
"Globals": [],
"Type Execution Declaration": [
"struct oz_multiple_fixed"
]
} |
197 | linux | https://github.com/torvalds/linux | drivers/staging/ozwpan/ozusbsvc1.c | 9a59029bc218b48eff8b5d4dde5662fd79d3e1a8 | ozwpan: unchecked signed subtraction leads to DoS
The subtraction here was using a signed integer and did not have any
bounds checking at all. This commit adds proper bounds checking, made
easy by use of an unsigned integer. This way, a single packet won't be
able to remotely trigger a massive loop, locking up the sys... | false | 8bf2ecb010506fd1d5a02cfc0ec05129 | oz_usb_handle_ep_data | static void oz_usb_handle_ep_data(struct oz_usb_ctx *usb_ctx,
struct oz_usb_hdr *usb_hdr, int len)
{
struct oz_data *data_hdr = (struct oz_data *)usb_hdr;
switch (data_hdr->format) {
case OZ_DATA_F_MULTIPLE_FIXED: {
struct oz_multiple_fixed *body =
(struct oz_multiple_fixed *)data_hdr;
u8 *data = body->d... | [[329, "\t\t\tunsigned int n;\n"], [330, "\t\t\tif (!body->unit_size ||\n"], [331, "\t\t\t\tlen < sizeof(struct oz_multiple_fixed) - 1)\n"], [333, "\t\t\tn = (len - (sizeof(struct oz_multiple_fixed) - 1))\n"]] | [[329, "unsigned int n;"], [330, "if (!body->unit_size ||\n\t\t\t\tlen < sizeof(struct oz_multiple_fixed) - 1)"], [333, "n = (len - (sizeof(struct oz_multiple_fixed) - 1))\n\t\t\t\t/ body->unit_size;"]] | [
"CVE-2015-4002"
] | [
"CWE-119"
] | 197 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [
"len"
],
"Globals": [],
"Type Execution Declaration": [
"struct oz_multiple_fixed"
]
} |
198 | linux | https://github.com/torvalds/linux | drivers/cdrom/cdrom.c | 9de4ee40547fd315d4a0ed1dd15a2fa3559ad707 | cdrom: information leak in cdrom_ioctl_media_changed()
This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned
long. The way the check is written now, if one of the high 32 bits is
set then we could read outside the info->slots[] array.
This bug is pretty old and it predates git.
Reviewed-by: Christ... | true | bafe0aa3eccb2d5849ea95d30fb18a9e | cdrom_ioctl_media_changed | static int cdrom_ioctl_media_changed(struct cdrom_device_info *cdi,
unsigned long arg)
{
struct cdrom_changer_info *info;
int ret;
cd_dbg(CD_DO_IOCTL, "entering CDROM_MEDIA_CHANGED\n");
if (!CDROM_CAN(CDC_MEDIA_CHANGED))
return -ENOSYS;
/* cannot select disc or select current disc */
if (!CDROM_CAN(CDC_SEL... | [[2374, "\tif ((unsigned int)arg >= cdi->capacity)\n"]] | [[2374, "if ((unsigned int)arg >= cdi->capacity)"]] | [
"CVE-2018-10940"
] | [
"CWE-119"
] | 199 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [
"cdi",
"arg"
],
"Globals": [],
"Type Execution Declaration": []
} |
199 | linux | https://github.com/torvalds/linux | drivers/cdrom/cdrom.c | 9de4ee40547fd315d4a0ed1dd15a2fa3559ad707 | cdrom: information leak in cdrom_ioctl_media_changed()
This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned
long. The way the check is written now, if one of the high 32 bits is
set then we could read outside the info->slots[] array.
This bug is pretty old and it predates git.
Reviewed-by: Christ... | false | 46b436348116d2c8172f180bf7acba72 | cdrom_ioctl_media_changed | static int cdrom_ioctl_media_changed(struct cdrom_device_info *cdi,
unsigned long arg)
{
struct cdrom_changer_info *info;
int ret;
cd_dbg(CD_DO_IOCTL, "entering CDROM_MEDIA_CHANGED\n");
if (!CDROM_CAN(CDC_MEDIA_CHANGED))
return -ENOSYS;
/* cannot select disc or select current disc */
if (!CDROM_CAN(CDC_SEL... | [[2374, "\tif (arg >= cdi->capacity)\n"]] | [[2374, "if (arg >= cdi->capacity)"]] | [
"CVE-2018-10940"
] | [
"CWE-119"
] | 199 | {
"Execution Environment": [],
"Explanation": null,
"External Function": [],
"Function Argument": [
"cdi",
"arg"
],
"Globals": [],
"Type Execution Declaration": []
} |
Subsets and Splits
GitHub Repo File Analysis
Identifies the most common file types and their counts in GitHub repositories, providing insights into the predominant programming languages used.
Top 200 CWE-863
Retrieves 200 samples from the dataset where the CWE list includes CWE-863, providing basic filtering of specific security vulnerabilities.