cve_id stringlengths 13 16 | repo stringclasses 12
values | repo_url stringclasses 10
values | file_path stringlengths 7 62 | function_name stringlengths 4 52 | pa stringlengths 50 341k | pb stringlengths 33 341k | px stringlengths 50 338k | py stringlengths 33 338k | pa_sliced stringlengths 31 44.3k | pb_sliced stringlengths 31 44.6k | px_sliced stringlengths 51 45.8k | py_sliced stringlengths 33 46.9k | patch_sliced stringlengths 0 46.8k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CVE-2020-0444 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/auditfilter.c | audit_data_to_entry | static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data, size_t datasz) {
int err = 0;
struct audit_entry *entry;
void *bufp;
size_t remain = datasz - sizeof(struct audit_rule_data);
int i;
char *str;
struct audit_fsnotify_mark *audit_mark;
entry = audit_to_entry_comm... | static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data, size_t datasz) {
int err = 0;
struct audit_entry *entry;
void *bufp;
size_t remain = datasz - sizeof(struct audit_rule_data);
int i;
char *str;
struct audit_fsnotify_mark *audit_mark;
entry = audit_to_entry_comm... | static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data, size_t datasz) {
int err = 0;
struct audit_entry *entry;
void *bufp;
size_t remain = datasz - sizeof(struct audit_rule_data);
int i;
char *str;
struct audit_fsnotify_mark *audit_mark;
entry = audit_to_entry_comm... | static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data, size_t datasz) {
int err = 0;
struct audit_entry *entry;
void *bufp;
size_t remain = datasz - sizeof(struct audit_rule_data);
int i;
char *str;
struct audit_fsnotify_mark *audit_mark;
entry = audit_to_entry_comm... | static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data, size_t datasz) {
size_t remain = datasz - sizeof(struct audit_rule_data);
entry = audit_to_entry_common(data);
if (IS_ERR(entry)) {
goto exit_nofree;
}
bufp = data->buf;
for (i = 0; i < data->field_count; i++) {... | static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data, size_t datasz) {
size_t remain = datasz - sizeof(struct audit_rule_data);
entry = audit_to_entry_common(data);
if (IS_ERR(entry)) {
goto exit_nofree;
}
bufp = data->buf;
for (i = 0; i < data->field_count; i++) {... | static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data, size_t datasz) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
size_t remain = datasz - sizeof(struct audit_rule_data);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
entry = audit_to_entry_common(data);
if (IS_ERR(entry)) {... | static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data, size_t datasz) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
size_t remain = datasz - sizeof(struct audit_rule_data);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
entry = audit_to_entry_common(data);
if (IS_ERR(entry)) {... | static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data, size_t datasz) {
size_t remain = datasz - sizeof(struct audit_rule_data);
entry = audit_to_entry_common(data);
if (IS_ERR(entry)) {
goto exit_nofree;
}
bufp = data->buf;
for (i = 0; i < data->field_count... |
CVE-2020-0465 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/hid/hid-input.c | hidinput_configure_usage | static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_field *field, struct hid_usage *usage) {
struct input_dev *input = hidinput->input;
struct hid_device *device = input_get_drvdata(input);
int max = 0, code;
unsigned long *bit = NULL;
field->hidinput = hidinput;
if (fiel... | static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_field *field, struct hid_usage *usage) {
struct input_dev *input = hidinput->input;
struct hid_device *device = input_get_drvdata(input);
int max = 0, code;
unsigned long *bit = NULL;
field->hidinput = hidinput;
if (fiel... | static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_field *field, struct hid_usage *usage) {
struct input_dev *input = hidinput->input;
struct hid_device *device = input_get_drvdata(input);
int max = 0, code;
unsigned long *bit = NULL;
field->hidinput = hidinput;
if (fiel... | static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_field *field, struct hid_usage *usage) {
struct input_dev *input = hidinput->input;
struct hid_device *device = input_get_drvdata(input);
int max = 0, code;
unsigned long *bit = NULL;
field->hidinput = hidinput;
if (fiel... | static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_field *field, struct hid_usage *usage) {
struct input_dev *input = hidinput->input;
struct hid_device *device = input_get_drvdata(input);
unsigned long *bit = NULL;
if (device->driver->input_mapping) {
if (ret > 0) {
... | static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_field *field, struct hid_usage *usage) {
struct input_dev *input = hidinput->input;
struct hid_device *device = input_get_drvdata(input);
unsigned long *bit = NULL;
if (device->driver->input_mapping) {
if (ret > 0) {
... | static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_field *field, struct hid_usage *usage) {
struct input_dev *input = hidinput->input;
struct hid_device *device = input_get_drvdata(input);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned long *bit = NULL;
/* PLACEHOLDE... | static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_field *field, struct hid_usage *usage) {
struct input_dev *input = hidinput->input;
struct hid_device *device = input_get_drvdata(input);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned long *bit = NULL;
/* PLACEHOLDE... | static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_field *field, struct hid_usage *usage) {
struct input_dev *input = hidinput->input;
struct hid_device *device = input_get_drvdata(input);
unsigned long *bit = NULL;
if (device->driver->input_mapping) {
if (ret > 0)... |
CVE-2020-0465 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/hid/hid-multitouch.c | mt_touch_input_mapping | static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, unsigned long **bit, int *max, struct mt_application *app) {
struct mt_device *td = hid_get_drvdata(hdev);
struct mt_class *cls = &td->mtclass;
int code;
struct hid_usage *p... | static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, unsigned long **bit, int *max, struct mt_application *app) {
struct mt_device *td = hid_get_drvdata(hdev);
struct mt_class *cls = &td->mtclass;
int code;
struct hid_usage *p... | static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, unsigned long **bit, int *max) {
struct mt_device *td = hid_get_drvdata(hdev);
struct mt_class *cls = &td->mtclass;
int code;
struct hid_usage *prev_usage = NULL;
if (fi... | static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, unsigned long **bit, int *max) {
struct mt_device *td = hid_get_drvdata(hdev);
struct mt_class *cls = &td->mtclass;
int code;
struct hid_usage *prev_usage = NULL;
if (fi... | static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, unsigned long **bit, int *max, struct mt_application *app) {
switch (usage->hid & HID_USAGE_PAGE) {
case HID_UP_BUTTON:
hid_map_usage(hi, usage, bit, max, EV_KEY, code);
... | static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, unsigned long **bit, int *max, struct mt_application *app) {
switch (usage->hid & HID_USAGE_PAGE) {
case HID_UP_BUTTON:
hid_map_usage(hi, usage, bit, max, EV_KEY, code);
... | static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, unsigned long **bit, int *max) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (usage->hid & HID_USAGE_PAGE) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case HID_... | static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, unsigned long **bit, int *max) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (usage->hid & HID_USAGE_PAGE) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case HID_... | static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, unsigned long **bit, int *max, struct mt_application *app) {
switch (usage->hid & HID_USAGE_PAGE) {
case HID_UP_BUTTON:
hid_map_usage(hi, usage, bit, max, EV_KEY, code);... |
CVE-2020-0465 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | include/linux/hid.h | hid_map_usage | static inline void hid_map_usage(struct hid_input *hidinput, struct hid_usage *usage, unsigned long **bit, int *max, __u8 type, __u16 c) {
struct input_dev *input = hidinput->input;
usage->type = type;
usage->code = c;
switch (type) {
case EV_ABS:
*bit = input->absbit;
*max = ABS_MAX... | static inline void hid_map_usage(struct hid_input *hidinput, struct hid_usage *usage, unsigned long **bit, int *max, __u8 type, unsigned int c) {
struct input_dev *input = hidinput->input;
unsigned long *bmap = NULL;
unsigned int limit = 0;
switch (type) {
case EV_ABS:
bmap = input->absbit;
... | static inline void hid_map_usage(struct hid_input *hidinput, struct hid_usage *usage, unsigned long **bit, int *max, __u8 type, __u16 c) {
struct input_dev *input = hidinput->input;
usage->type = type;
usage->code = c;
switch (type) {
case EV_ABS:
*bit = input->absbit;
*max = ABS_MAX... | static inline void hid_map_usage(struct hid_input *hidinput, struct hid_usage *usage, unsigned long **bit, int *max, __u8 type, unsigned int c) {
struct input_dev *input = hidinput->input;
unsigned long *bmap = NULL;
unsigned int limit = 0;
switch (type) {
case EV_ABS:
bmap = input->absbit;
... | static inline void hid_map_usage(struct hid_input *hidinput, struct hid_usage *usage, unsigned long **bit, int *max, __u8 type, __u16 c) {
struct input_dev *input = hidinput->input;
usage->type = type;
usage->code = c;
switch (type) {
case EV_ABS:
*bit = input->absbit;
*max = ABS_MAX... | static inline void hid_map_usage(struct hid_input *hidinput, struct hid_usage *usage, unsigned long **bit, int *max, __u8 type, unsigned int c) {
struct input_dev *input = hidinput->input;
unsigned long *bmap = NULL;
unsigned int limit = 0;
switch (type) {
case EV_ABS:
bmap = input->absbit;
... | static inline void hid_map_usage(struct hid_input *hidinput, struct hid_usage *usage, unsigned long **bit, int *max, __u8 type, __u16 c) {
struct input_dev *input = hidinput->input;
usage->type = type;
usage->code = c;
switch (type) {
case EV_ABS:
*bit = input->absbit;
*max = ABS_MAX... | static inline void hid_map_usage(struct hid_input *hidinput, struct hid_usage *usage, unsigned long **bit, int *max, __u8 type, unsigned int c) {
struct input_dev *input = hidinput->input;
unsigned long *bmap = NULL;
unsigned int limit = 0;
switch (type) {
case EV_ABS:
bmap = input->absbit;
... | -static inline void hid_map_usage(struct hid_input *hidinput, struct hid_usage *usage, unsigned long **bit, int *max, __u8 type, __u16 c) {
+static inline void hid_map_usage(struct hid_input *hidinput, struct hid_usage *usage, unsigned long **bit, int *max, __u8 type, unsigned int c) {
struct input_dev *input = hi... |
CVE-2020-0465 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | include/linux/hid.h | hid_map_usage_clear | static inline void hid_map_usage_clear(struct hid_input *hidinput, struct hid_usage *usage, unsigned long **bit, int *max, __u8 type, __u16 c) {
hid_map_usage(hidinput, usage, bit, max, type, c);
clear_bit(c, *bit);
} | static inline void hid_map_usage_clear(struct hid_input *hidinput, struct hid_usage *usage, unsigned long **bit, int *max, __u8 type, __u16 c) {
hid_map_usage(hidinput, usage, bit, max, type, c);
if (*bit) {
clear_bit(usage->code, *bit);
}
} | static inline void hid_map_usage_clear(struct hid_input *hidinput, struct hid_usage *usage, unsigned long **bit, int *max, __u8 type, __u16 c) {
hid_map_usage(hidinput, usage, bit, max, type, c);
clear_bit(c, *bit);
} | static inline void hid_map_usage_clear(struct hid_input *hidinput, struct hid_usage *usage, unsigned long **bit, int *max, __u8 type, __u16 c) {
hid_map_usage(hidinput, usage, bit, max, type, c);
if (*bit) {
clear_bit(usage->code, *bit);
}
} | static inline void hid_map_usage_clear(struct hid_input *hidinput, struct hid_usage *usage, unsigned long **bit, int *max, __u8 type, __u16 c) {
hid_map_usage(hidinput, usage, bit, max, type, c);
clear_bit(c, *bit);
}
| static inline void hid_map_usage_clear(struct hid_input *hidinput, struct hid_usage *usage, unsigned long **bit, int *max, __u8 type, __u16 c) {
hid_map_usage(hidinput, usage, bit, max, type, c);
if (*bit) {
clear_bit(usage->code, *bit);
}
}
| static inline void hid_map_usage_clear(struct hid_input *hidinput, struct hid_usage *usage, unsigned long **bit, int *max, __u8 type, __u16 c) {
hid_map_usage(hidinput, usage, bit, max, type, c);
clear_bit(c, *bit);
}
| static inline void hid_map_usage_clear(struct hid_input *hidinput, struct hid_usage *usage, unsigned long **bit, int *max, __u8 type, __u16 c) {
hid_map_usage(hidinput, usage, bit, max, type, c);
if (*bit) {
clear_bit(usage->code, *bit);
}
} | static inline void hid_map_usage_clear(struct hid_input *hidinput, struct hid_usage *usage, unsigned long **bit, int *max, __u8 type, __u16 c) {
hid_map_usage(hidinput, usage, bit, max, type, c);
- clear_bit(c, *bit);
+ if (*bit) {
+ clear_bit(usage->code, *bit);
+ }
} |
CVE-2020-0543 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kernel/cpu/common.c | cpu_matches | static bool cpu_matches(unsigned long which) {
const struct x86_cpu_id *m = x86_match_cpu(cpu_vuln_whitelist);
return m && !!(m->driver_data & which);
} | static bool cpu_matches(const struct x86_cpu_id *table, unsigned long which) {
const struct x86_cpu_id *m = x86_match_cpu(table);
return m && !!(m->driver_data & which);
} | static bool cpu_matches(unsigned long which) {
const struct x86_cpu_id *m = x86_match_cpu(cpu_vuln_whitelist);
return m && !!(m->driver_data & which);
} | static bool cpu_matches(const struct x86_cpu_id *table, unsigned long which) {
const struct x86_cpu_id *m = x86_match_cpu(table);
return m && !!(m->driver_data & which);
} | static bool cpu_matches(unsigned long which) {
const struct x86_cpu_id *m = x86_match_cpu(cpu_vuln_whitelist);
return m && !!(m->driver_data & which);
}
| static bool cpu_matches(const struct x86_cpu_id *table, unsigned long which) {
const struct x86_cpu_id *m = x86_match_cpu(table);
return m && !!(m->driver_data & which);
}
| static bool cpu_matches(unsigned long which) {
const struct x86_cpu_id *m = x86_match_cpu(cpu_vuln_whitelist);
return m && !!(m->driver_data & which);
}
| static bool cpu_matches(const struct x86_cpu_id *table, unsigned long which) {
const struct x86_cpu_id *m = x86_match_cpu(table);
return m && !!(m->driver_data & which);
} | -static bool cpu_matches(unsigned long which) {
- const struct x86_cpu_id *m = x86_match_cpu(cpu_vuln_whitelist);
+static bool cpu_matches(const struct x86_cpu_id *table, unsigned long which) {
+ const struct x86_cpu_id *m = x86_match_cpu(table);
return m && !!(m->driver_data & which);
} |
CVE-2020-0543 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kernel/cpu/common.c | cpu_set_bug_bits | static void cpu_set_bug_bits(struct cpuinfo_x86 *c) {
u64 ia32_cap = x86_read_arch_cap_msr();
if (!cpu_matches(NO_ITLB_MULTIHIT) && !(ia32_cap & ARCH_CAP_PSCHANGE_MC_NO)) {
setup_force_cpu_bug(X86_BUG_ITLB_MULTIHIT);
}
if (cpu_matches(NO_SPECULATION)) {
return;
}
setup_force_cpu_... | static void cpu_set_bug_bits(struct cpuinfo_x86 *c) {
u64 ia32_cap = x86_read_arch_cap_msr();
if (!cpu_matches(cpu_vuln_whitelist, NO_ITLB_MULTIHIT) && !(ia32_cap & ARCH_CAP_PSCHANGE_MC_NO)) {
setup_force_cpu_bug(X86_BUG_ITLB_MULTIHIT);
}
if (cpu_matches(cpu_vuln_whitelist, NO_SPECULATION)) {
... | static void cpu_set_bug_bits(struct cpuinfo_x86 *c) {
u64 ia32_cap = x86_read_arch_cap_msr();
if (!cpu_matches(NO_ITLB_MULTIHIT) && !(ia32_cap & ARCH_CAP_PSCHANGE_MC_NO)) {
setup_force_cpu_bug(X86_BUG_ITLB_MULTIHIT);
}
if (cpu_matches(NO_SPECULATION)) {
return;
}
setup_force_cpu_... | static void cpu_set_bug_bits(struct cpuinfo_x86 *c) {
u64 ia32_cap = x86_read_arch_cap_msr();
if (!cpu_matches(cpu_vuln_whitelist, NO_ITLB_MULTIHIT) && !(ia32_cap & ARCH_CAP_PSCHANGE_MC_NO)) {
setup_force_cpu_bug(X86_BUG_ITLB_MULTIHIT);
}
if (cpu_matches(cpu_vuln_whitelist, NO_SPECULATION)) {
... | static void cpu_set_bug_bits(struct cpuinfo_x86 *c) {
u64 ia32_cap = x86_read_arch_cap_msr();
if (!cpu_matches(NO_ITLB_MULTIHIT) && !(ia32_cap & ARCH_CAP_PSCHANGE_MC_NO)) {
setup_force_cpu_bug(X86_BUG_ITLB_MULTIHIT);
}
if (cpu_matches(NO_SPECULATION)) {
return;
}
setup_force_cpu_... | static void cpu_set_bug_bits(struct cpuinfo_x86 *c) {
u64 ia32_cap = x86_read_arch_cap_msr();
if (!cpu_matches(cpu_vuln_whitelist, NO_ITLB_MULTIHIT) && !(ia32_cap & ARCH_CAP_PSCHANGE_MC_NO)) {
setup_force_cpu_bug(X86_BUG_ITLB_MULTIHIT);
}
if (cpu_matches(cpu_vuln_whitelist, NO_SPECULATION)) {
... | static void cpu_set_bug_bits(struct cpuinfo_x86 *c) {
u64 ia32_cap = x86_read_arch_cap_msr();
if (!cpu_matches(NO_ITLB_MULTIHIT) && !(ia32_cap & ARCH_CAP_PSCHANGE_MC_NO)) {
setup_force_cpu_bug(X86_BUG_ITLB_MULTIHIT);
}
if (cpu_matches(NO_SPECULATION)) {
return;
}
setup_force_cpu_... | static void cpu_set_bug_bits(struct cpuinfo_x86 *c) {
u64 ia32_cap = x86_read_arch_cap_msr();
if (!cpu_matches(cpu_vuln_whitelist, NO_ITLB_MULTIHIT) && !(ia32_cap & ARCH_CAP_PSCHANGE_MC_NO)) {
setup_force_cpu_bug(X86_BUG_ITLB_MULTIHIT);
}
if (cpu_matches(cpu_vuln_whitelist, NO_SPECULATION)) {
... | static void cpu_set_bug_bits(struct cpuinfo_x86 *c) {
u64 ia32_cap = x86_read_arch_cap_msr();
- if (!cpu_matches(NO_ITLB_MULTIHIT) && !(ia32_cap & ARCH_CAP_PSCHANGE_MC_NO)) {
+ if (!cpu_matches(cpu_vuln_whitelist, NO_ITLB_MULTIHIT) && !(ia32_cap & ARCH_CAP_PSCHANGE_MC_NO)) {
setup_force_cpu_bug(X86... |
CVE-2020-10135 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | include/net/bluetooth/hci_core.h | hci_encrypt_cfm | static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status, __u8 encrypt) {
struct hci_cb *cb;
if (conn->sec_level == BT_SECURITY_SDP) {
conn->sec_level = BT_SECURITY_LOW;
}
if (conn->pending_sec_level > conn->sec_level) {
conn->sec_level = conn->pending_sec_level;
}
m... | static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status) {
struct hci_cb *cb;
__u8 encrypt;
if (conn->state == BT_CONFIG) {
if (status) {
conn->state = BT_CONNECTED;
}
hci_connect_cfm(conn, status);
hci_conn_drop(conn);
return;
}
if (... | static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status, __u8 encrypt) {
struct hci_cb *cb;
if (conn->sec_level == BT_SECURITY_SDP) {
conn->sec_level = BT_SECURITY_LOW;
}
if (conn->pending_sec_level > conn->sec_level) {
conn->sec_level = conn->pending_sec_level;
}
m... | static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status) {
struct hci_cb *cb;
__u8 encrypt;
if (conn->state == BT_CONFIG) {
if (status) {
conn->state = BT_CONNECTED;
}
hci_connect_cfm(conn, status);
hci_conn_drop(conn);
return;
}
if (... | static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status, __u8 encrypt) {
struct hci_cb *cb;
list_for_each_entry(cb, &hci_cb_list, list) {
if (cb->security_cfm) {
cb->security_cfm(conn, status, encrypt);
}
}
if (conn->security_cfm_cb) {
conn->security_cfm... | static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status) {
struct hci_cb *cb;
__u8 encrypt;
if (conn->state == BT_CONFIG) {
if (status) {
conn->state = BT_CONNECTED;
}
hci_connect_cfm(conn, status);
hci_conn_drop(conn);
return;
}
if (... | static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status, __u8 encrypt) {
struct hci_cb *cb;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
list_for_each_entry(cb, &hci_cb_list, list) {
if (cb->security_cfm) {
cb->security_cfm(conn, status, encrypt);
}
}
/* PL... | static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status) {
struct hci_cb *cb;
__u8 encrypt;
if (conn->state == BT_CONFIG) {
if (status) {
conn->state = BT_CONNECTED;
}
hci_connect_cfm(conn, status);
hci_conn_drop(conn);
return;
}
if (... | -static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status, __u8 encrypt) {
+static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status) {
struct hci_cb *cb;
+ __u8 encrypt;
+ if (conn->state == BT_CONFIG) {
+ if (status) {
+ conn->state = BT_CONNECTED;
+ }
+ ... |
CVE-2020-10135 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/hci_event.c | hci_auth_complete_evt | static void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) {
struct hci_ev_auth_complete *ev = (void *) skb->data;
struct hci_conn *conn;
BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle));
... | static void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) {
struct hci_ev_auth_complete *ev = (void *) skb->data;
struct hci_conn *conn;
BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle));
... | static void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) {
struct hci_ev_auth_complete *ev = (void *) skb->data;
struct hci_conn *conn;
BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle));
... | static void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) {
struct hci_ev_auth_complete *ev = (void *) skb->data;
struct hci_conn *conn;
BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle));
... | static void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) {
struct hci_ev_auth_complete *ev = (void *) skb->data;
BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle));
if (!conn) {
goto... | static void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) {
struct hci_ev_auth_complete *ev = (void *) skb->data;
BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle));
if (!conn) {
goto... | static void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) {
struct hci_ev_auth_complete *ev = (void *) skb->data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_handle(hdev, __le16_... | static void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) {
struct hci_ev_auth_complete *ev = (void *) skb->data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_handle(hdev, __le16_... | static void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) {
struct hci_ev_auth_complete *ev = (void *) skb->data;
BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle));
if (!conn) {
... |
CVE-2020-10135 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/hci_event.c | hci_encrypt_change_evt | static void hci_encrypt_change_evt(struct hci_dev *hdev, struct sk_buff *skb) {
struct hci_ev_encrypt_change *ev = (void *) skb->data;
struct hci_conn *conn;
BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle));
... | static void hci_encrypt_change_evt(struct hci_dev *hdev, struct sk_buff *skb) {
struct hci_ev_encrypt_change *ev = (void *) skb->data;
struct hci_conn *conn;
BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle));
... | static void hci_encrypt_change_evt(struct hci_dev *hdev, struct sk_buff *skb) {
struct hci_ev_encrypt_change *ev = (void *) skb->data;
struct hci_conn *conn;
BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle));
... | static void hci_encrypt_change_evt(struct hci_dev *hdev, struct sk_buff *skb) {
struct hci_ev_encrypt_change *ev = (void *) skb->data;
struct hci_conn *conn;
BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle));
... | static void hci_encrypt_change_evt(struct hci_dev *hdev, struct sk_buff *skb) {
struct hci_ev_encrypt_change *ev = (void *) skb->data;
BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle));
if (!conn) {
go... | static void hci_encrypt_change_evt(struct hci_dev *hdev, struct sk_buff *skb) {
struct hci_ev_encrypt_change *ev = (void *) skb->data;
BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle));
if (!conn) {
go... | static void hci_encrypt_change_evt(struct hci_dev *hdev, struct sk_buff *skb) {
struct hci_ev_encrypt_change *ev = (void *) skb->data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_handle(hdev, __le1... | static void hci_encrypt_change_evt(struct hci_dev *hdev, struct sk_buff *skb) {
struct hci_ev_encrypt_change *ev = (void *) skb->data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_handle(hdev, __le1... | static void hci_encrypt_change_evt(struct hci_dev *hdev, struct sk_buff *skb) {
struct hci_ev_encrypt_change *ev = (void *) skb->data;
BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle));
if (!conn) {
... |
CVE-2020-10135 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/hci_event.c | read_enc_key_size_complete | static void read_enc_key_size_complete(struct hci_dev *hdev, u8 status, u16 opcode, struct sk_buff *skb) {
const struct hci_rp_read_enc_key_size *rp;
struct hci_conn *conn;
u16 handle;
BT_DBG("%s status 0x%02x", hdev->name, status);
if (!skb || skb->len < sizeof(*rp)) {
bt_dev_err(hdev, "inv... | static void read_enc_key_size_complete(struct hci_dev *hdev, u8 status, u16 opcode, struct sk_buff *skb) {
const struct hci_rp_read_enc_key_size *rp;
struct hci_conn *conn;
u16 handle;
BT_DBG("%s status 0x%02x", hdev->name, status);
if (!skb || skb->len < sizeof(*rp)) {
bt_dev_err(hdev, "inv... | static void read_enc_key_size_complete(struct hci_dev *hdev, u8 status, u16 opcode, struct sk_buff *skb) {
const struct hci_rp_read_enc_key_size *rp;
struct hci_conn *conn;
u16 handle;
BT_DBG("%s status 0x%02x", hdev->name, status);
if (!skb || skb->len < sizeof(*rp)) {
BT_ERR("%s invalid HC... | static void read_enc_key_size_complete(struct hci_dev *hdev, u8 status, u16 opcode, struct sk_buff *skb) {
const struct hci_rp_read_enc_key_size *rp;
struct hci_conn *conn;
u16 handle;
BT_DBG("%s status 0x%02x", hdev->name, status);
if (!skb || skb->len < sizeof(*rp)) {
BT_ERR("%s invalid HC... | static void read_enc_key_size_complete(struct hci_dev *hdev, u8 status, u16 opcode, struct sk_buff *skb) {
if (!skb || skb->len < sizeof(*rp)) {
return;
}
rp = (void *)skb->data;
handle = le16_to_cpu(rp->handle);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_handle(hdev, handle);
i... | static void read_enc_key_size_complete(struct hci_dev *hdev, u8 status, u16 opcode, struct sk_buff *skb) {
if (!skb || skb->len < sizeof(*rp)) {
return;
}
rp = (void *)skb->data;
handle = le16_to_cpu(rp->handle);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_handle(hdev, handle);
i... | static void read_enc_key_size_complete(struct hci_dev *hdev, u8 status, u16 opcode, struct sk_buff *skb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!skb || skb->len < sizeof(*rp)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return;
}
rp = (void *)skb->data;
handle = le16_to_... | static void read_enc_key_size_complete(struct hci_dev *hdev, u8 status, u16 opcode, struct sk_buff *skb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!skb || skb->len < sizeof(*rp)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return;
}
rp = (void *)skb->data;
handle = le16_to_... | static void read_enc_key_size_complete(struct hci_dev *hdev, u8 status, u16 opcode, struct sk_buff *skb) {
if (!skb || skb->len < sizeof(*rp)) {
return;
}
rp = (void *)skb->data;
handle = le16_to_cpu(rp->handle);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_handle(hdev, handle... |
CVE-2020-10690 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/ptp/ptp_clock.c | ptp_clock_register | struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info, struct device *parent) {
struct ptp_clock *ptp;
int err = 0, index, major = MAJOR(ptp_devt);
if (info->n_alarm > PTP_MAX_ALARMS) {
return ERR_PTR(-EVAL);
}
err = -ENOMEM;
ptp = kzalloc(sizeof(struct ptp_clock), GFP_KERNEL)... | struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info, struct device *parent) {
struct ptp_clock *ptp;
int err = 0, index, major = MAJOR(ptp_devt);
if (info->n_alarm > PTP_MAX_ALARMS) {
return ERR_PTR(-EVAL);
}
err = -ENOMEM;
ptp = kzalloc(sizeof(struct ptp_clock), GFP_KERNEL)... | struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info, struct device *parent) {
struct ptp_clock *ptp;
int err = 0, index, major = MAJOR(ptp_devt);
if (info->n_alarm > PTP_MAX_ALARMS) {
return ERR_PTR(-EVAL);
}
err = -ENOMEM;
ptp = kzalloc(sizeof(struct ptp_clock), GFP_KERNEL)... | struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info, struct device *parent) {
struct ptp_clock *ptp;
int err = 0, index, major = MAJOR(ptp_devt);
if (info->n_alarm > PTP_MAX_ALARMS) {
return ERR_PTR(-EVAL);
}
err = -ENOMEM;
ptp = kzalloc(sizeof(struct ptp_clock), GFP_KERNEL)... | struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info, struct device *parent) {
int err = 0, index, major = MAJOR(ptp_devt);
ptp = kzalloc(sizeof(struct ptp_clock), GFP_KERNEL);
if (ptp == NULL) {
goto no_memory;
}
index = ida_simple_get(&ptp_clocks_map, 0, MORMASK + 1, GFP_KERNEL... | struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info, struct device *parent) {
int err = 0, index, major = MAJOR(ptp_devt);
ptp = kzalloc(sizeof(struct ptp_clock), GFP_KERNEL);
if (ptp == NULL) {
goto no_memory;
}
index = ida_simple_get(&ptp_clocks_map, 0, MORMASK + 1, GFP_KERNEL... | struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info, struct device *parent) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int err = 0, index, major = MAJOR(ptp_devt);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ptp = kzalloc(sizeof(struct ptp_clock), GFP_KERNEL);
if (ptp == NULL) {
... | struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info, struct device *parent) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int err = 0, index, major = MAJOR(ptp_devt);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ptp = kzalloc(sizeof(struct ptp_clock), GFP_KERNEL);
if (ptp == NULL) {
... | struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info, struct device *parent) {
int err = 0, index, major = MAJOR(ptp_devt);
ptp = kzalloc(sizeof(struct ptp_clock), GFP_KERNEL);
if (ptp == NULL) {
goto no_memory;
}
index = ida_simple_get(&ptp_clocks_map, 0, MORMASK + 1, GFP... |
CVE-2020-10690 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/ptp/ptp_clock.c | ptp_clock_unregister | int ptp_clock_unregister(struct ptp_clock *ptp) {
ptp->defunct = 1;
wake_up_interruptible(&ptp->tsev_wq);
if (ptp->kworker) {
kthread_cancel_delayed_work_sync(&ptp->aux_work);
kthread_destroy_worker(ptp->kworker);
}
if (ptp->pps_source) {
pps_unregister_source(ptp->pps_source... | int ptp_clock_unregister(struct ptp_clock *ptp) {
ptp->defunct = 1;
wake_up_interruptible(&ptp->tsev_wq);
if (ptp->kworker) {
kthread_cancel_delayed_work_sync(&ptp->aux_work);
kthread_destroy_worker(ptp->kworker);
}
if (ptp->pps_source) {
pps_unregister_source(ptp->pps_source... | int ptp_clock_unregister(struct ptp_clock *ptp) {
ptp->defunct = 1;
wake_up_interruptible(&ptp->tsev_wq);
if (ptp->pps_source) {
pps_unregister_source(ptp->pps_source);
}
device_destroy(ptp_class, ptp->devid);
ptp_cleanup_pin_groups(ptp);
posix_clock_unregister(&ptp->clock);
retu... | int ptp_clock_unregister(struct ptp_clock *ptp) {
ptp->defunct = 1;
wake_up_interruptible(&ptp->tsev_wq);
if (ptp->pps_source) {
pps_unregister_source(ptp->pps_source);
}
ptp_cleanup_pin_groups(ptp);
posix_clock_unregister(&ptp->clock);
return 0;
} | int ptp_clock_unregister(struct ptp_clock *ptp) {
if (ptp->pps_source) {
pps_unregister_source(ptp->pps_source);
}
device_destroy(ptp_class, ptp->devid);
ptp_cleanup_pin_groups(ptp);
posix_clock_unregister(&ptp->clock);
}
| int ptp_clock_unregister(struct ptp_clock *ptp) {
if (ptp->pps_source) {
pps_unregister_source(ptp->pps_source);
}
ptp_cleanup_pin_groups(ptp);
posix_clock_unregister(&ptp->clock);
}
| int ptp_clock_unregister(struct ptp_clock *ptp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (ptp->pps_source) {
pps_unregister_source(ptp->pps_source);
}
device_destroy(ptp_class, ptp->devid);
ptp_cleanup_pin_groups(ptp);
posix_clock_unregister(&ptp->clock);
/* PLACEHOLDER: DO... | int ptp_clock_unregister(struct ptp_clock *ptp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (ptp->pps_source) {
pps_unregister_source(ptp->pps_source);
}
ptp_cleanup_pin_groups(ptp);
posix_clock_unregister(&ptp->clock);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | int ptp_clock_unregister(struct ptp_clock *ptp) {
if (ptp->pps_source) {
pps_unregister_source(ptp->pps_source);
}
- device_destroy(ptp_class, ptp->devid);
ptp_cleanup_pin_groups(ptp);
posix_clock_unregister(&ptp->clock);
} |
CVE-2020-10690 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/time/posix-clock.c | posix_clock_open | static int posix_clock_open(struct inode *inode, struct file *fp) {
int err;
struct posix_clock *clk = container_of(inode->i_cdev, struct posix_clock, cdev);
down_read(&clk->rwsem);
if (clk->zombie) {
err = -ENODEV;
goto out;
}
if (clk->ops.open) {
err = clk->ops.open(clk... | static int posix_clock_open(struct inode *inode, struct file *fp) {
int err;
struct posix_clock *clk = container_of(inode->i_cdev, struct posix_clock, cdev);
down_read(&clk->rwsem);
if (clk->zombie) {
err = -ENODEV;
goto out;
}
if (clk->ops.open) {
err = clk->ops.open(clk... | static int posix_clock_open(struct inode *inode, struct file *fp) {
int err;
struct posix_clock *clk = container_of(inode->i_cdev, struct posix_clock, cdev);
down_read(&clk->rwsem);
if (clk->zombie) {
err = -ENODEV;
goto out;
}
if (clk->ops.open) {
err = clk->ops.open(clk... | static int posix_clock_open(struct inode *inode, struct file *fp) {
int err;
struct posix_clock *clk = container_of(inode->i_cdev, struct posix_clock, cdev);
down_read(&clk->rwsem);
if (clk->zombie) {
err = -ENODEV;
goto out;
}
if (clk->ops.open) {
err = clk->ops.open(clk... | static int posix_clock_open(struct inode *inode, struct file *fp) {
if (clk->ops.open) {
err = clk->ops.open(clk, fp->f_mode);
} else {
}
if (!err) {
kref_get(&clk->kref);
fp->private_data = clk;
}
out:
up_read(&clk->rwsem);
}
| static int posix_clock_open(struct inode *inode, struct file *fp) {
if (clk->ops.open) {
err = clk->ops.open(clk, fp->f_mode);
} else {
}
if (!err) {
get_device(clk->dev);
fp->private_data = clk;
}
out:
up_read(&clk->rwsem);
}
| static int posix_clock_open(struct inode *inode, struct file *fp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (clk->ops.open) {
err = clk->ops.open(clk, fp->f_mode);
} else {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
if (!err) {
kref_get(&clk->kref);
fp->priv... | static int posix_clock_open(struct inode *inode, struct file *fp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (clk->ops.open) {
err = clk->ops.open(clk, fp->f_mode);
} else {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
if (!err) {
get_device(clk->dev);
fp->priv... | static int posix_clock_open(struct inode *inode, struct file *fp) {
if (clk->ops.open) {
err = clk->ops.open(clk, fp->f_mode);
} else {
}
if (!err) {
- kref_get(&clk->kref);
+ get_device(clk->dev);
fp->private_data = clk;
}
out:
up_read(&clk->rwsem);
} |
CVE-2020-10690 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/time/posix-clock.c | posix_clock_register | int posix_clock_register(struct posix_clock *clk, dev_t devid) {
int err;
kref_init(&clk->kref);
init_rwsem(&clk->rwsem);
cdev_init(&clk->cdev, &posix_clock_file_operations);
clk->cdev.owner = clk->ops.owner;
err = cdev_add(&clk->cdev, devid, 1);
return err;
} | int posix_clock_register(struct posix_clock *clk, struct device *dev) {
int err;
init_rwsem(&clk->rwsem);
cdev_init(&clk->cdev, &posix_clock_file_operations);
err = cdev_device_add(&clk->cdev, dev);
if (err) {
pr_err("%s unable to add device %d:%d\n", dev_name(dev), MAJOR(dev->devt), MOR(dev... | int posix_clock_register(struct posix_clock *clk, dev_t devid) {
int err;
kref_init(&clk->kref);
init_rwsem(&clk->rwsem);
cdev_init(&clk->cdev, &posix_clock_file_operations);
clk->cdev.owner = clk->ops.owner;
err = cdev_add(&clk->cdev, devid, 1);
return err;
} | int posix_clock_register(struct posix_clock *clk, struct device *dev) {
int err;
init_rwsem(&clk->rwsem);
cdev_init(&clk->cdev, &posix_clock_file_operations);
err = cdev_device_add(&clk->cdev, dev);
if (err) {
pr_err("%s unable to add device %d:%d\n", dev_name(dev), MAJOR(dev->devt), MOR(dev... | int posix_clock_register(struct posix_clock *clk, dev_t devid) {
int err;
kref_init(&clk->kref);
init_rwsem(&clk->rwsem);
cdev_init(&clk->cdev, &posix_clock_file_operations);
clk->cdev.owner = clk->ops.owner;
err = cdev_add(&clk->cdev, devid, 1);
return err;
}
| int posix_clock_register(struct posix_clock *clk, struct device *dev) {
int err;
init_rwsem(&clk->rwsem);
cdev_init(&clk->cdev, &posix_clock_file_operations);
err = cdev_device_add(&clk->cdev, dev);
if (err) {
pr_err("%s unable to add device %d:%d\n", dev_name(dev), MAJOR(dev->devt), MOR(dev... | int posix_clock_register(struct posix_clock *clk, dev_t devid) {
int err;
kref_init(&clk->kref);
init_rwsem(&clk->rwsem);
cdev_init(&clk->cdev, &posix_clock_file_operations);
clk->cdev.owner = clk->ops.owner;
err = cdev_add(&clk->cdev, devid, 1);
return err;
}
| int posix_clock_register(struct posix_clock *clk, struct device *dev) {
int err;
init_rwsem(&clk->rwsem);
cdev_init(&clk->cdev, &posix_clock_file_operations);
err = cdev_device_add(&clk->cdev, dev);
if (err) {
pr_err("%s unable to add device %d:%d\n", dev_name(dev), MAJOR(dev->devt), MOR(dev... | -int posix_clock_register(struct posix_clock *clk, dev_t devid) {
+int posix_clock_register(struct posix_clock *clk, struct device *dev) {
int err;
- kref_init(&clk->kref);
init_rwsem(&clk->rwsem);
cdev_init(&clk->cdev, &posix_clock_file_operations);
+ err = cdev_device_add(&clk->cdev, dev);
+ i... |
CVE-2020-10690 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/time/posix-clock.c | posix_clock_release | static int posix_clock_release(struct inode *inode, struct file *fp) {
struct posix_clock *clk = fp->private_data;
int err = 0;
if (clk->ops.release) {
err = clk->ops.release(clk);
}
kref_put(&clk->kref, delete_clock);
fp->private_data = NULL;
return err;
} | static int posix_clock_release(struct inode *inode, struct file *fp) {
struct posix_clock *clk = fp->private_data;
int err = 0;
if (clk->ops.release) {
err = clk->ops.release(clk);
}
put_device(clk->dev);
fp->private_data = NULL;
return err;
} | static int posix_clock_release(struct inode *inode, struct file *fp) {
struct posix_clock *clk = fp->private_data;
int err = 0;
if (clk->ops.release) {
err = clk->ops.release(clk);
}
kref_put(&clk->kref, delete_clock);
fp->private_data = NULL;
return err;
} | static int posix_clock_release(struct inode *inode, struct file *fp) {
struct posix_clock *clk = fp->private_data;
int err = 0;
if (clk->ops.release) {
err = clk->ops.release(clk);
}
put_device(clk->dev);
fp->private_data = NULL;
return err;
} | static int posix_clock_release(struct inode *inode, struct file *fp) {
struct posix_clock *clk = fp->private_data;
if (clk->ops.release) {
err = clk->ops.release(clk);
}
kref_put(&clk->kref, delete_clock);
fp->private_data = NULL;
}
| static int posix_clock_release(struct inode *inode, struct file *fp) {
struct posix_clock *clk = fp->private_data;
if (clk->ops.release) {
err = clk->ops.release(clk);
}
put_device(clk->dev);
fp->private_data = NULL;
}
| static int posix_clock_release(struct inode *inode, struct file *fp) {
struct posix_clock *clk = fp->private_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (clk->ops.release) {
err = clk->ops.release(clk);
}
kref_put(&clk->kref, delete_clock);
fp->private_data = NULL;
/* PLAC... | static int posix_clock_release(struct inode *inode, struct file *fp) {
struct posix_clock *clk = fp->private_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (clk->ops.release) {
err = clk->ops.release(clk);
}
put_device(clk->dev);
fp->private_data = NULL;
/* PLACEHOLDER: DO NO... | static int posix_clock_release(struct inode *inode, struct file *fp) {
struct posix_clock *clk = fp->private_data;
if (clk->ops.release) {
err = clk->ops.release(clk);
}
- kref_put(&clk->kref, delete_clock);
+ put_device(clk->dev);
fp->private_data = NULL;
} |
CVE-2020-10690 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/time/posix-clock.c | posix_clock_unregister | void posix_clock_unregister(struct posix_clock *clk) {
cdev_del(&clk->cdev);
down_write(&clk->rwsem);
clk->zombie = true;
up_write(&clk->rwsem);
kref_put(&clk->kref, delete_clock);
} | void posix_clock_unregister(struct posix_clock *clk) {
cdev_device_del(&clk->cdev, clk->dev);
down_write(&clk->rwsem);
clk->zombie = true;
up_write(&clk->rwsem);
put_device(clk->dev);
} | void posix_clock_unregister(struct posix_clock *clk) {
cdev_del(&clk->cdev);
down_write(&clk->rwsem);
clk->zombie = true;
up_write(&clk->rwsem);
kref_put(&clk->kref, delete_clock);
} | void posix_clock_unregister(struct posix_clock *clk) {
cdev_device_del(&clk->cdev, clk->dev);
down_write(&clk->rwsem);
clk->zombie = true;
up_write(&clk->rwsem);
put_device(clk->dev);
} | void posix_clock_unregister(struct posix_clock *clk) {
cdev_del(&clk->cdev);
down_write(&clk->rwsem);
clk->zombie = true;
up_write(&clk->rwsem);
kref_put(&clk->kref, delete_clock);
}
| void posix_clock_unregister(struct posix_clock *clk) {
cdev_device_del(&clk->cdev, clk->dev);
down_write(&clk->rwsem);
clk->zombie = true;
up_write(&clk->rwsem);
put_device(clk->dev);
}
| void posix_clock_unregister(struct posix_clock *clk) {
cdev_del(&clk->cdev);
down_write(&clk->rwsem);
clk->zombie = true;
up_write(&clk->rwsem);
kref_put(&clk->kref, delete_clock);
}
| void posix_clock_unregister(struct posix_clock *clk) {
cdev_device_del(&clk->cdev, clk->dev);
down_write(&clk->rwsem);
clk->zombie = true;
up_write(&clk->rwsem);
put_device(clk->dev);
} | void posix_clock_unregister(struct posix_clock *clk) {
- cdev_del(&clk->cdev);
+ cdev_device_del(&clk->cdev, clk->dev);
down_write(&clk->rwsem);
clk->zombie = true;
up_write(&clk->rwsem);
- kref_put(&clk->kref, delete_clock);
+ put_device(clk->dev);
} |
CVE-2020-10720 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/core/dev.c | napi_frags_skb | static struct sk_buff *napi_frags_skb(struct napi_struct *napi) {
struct sk_buff *skb = napi->skb;
const struct ethhdr *eth;
unsigned int hlen = sizeof(*eth);
napi->skb = NULL;
skb_reset_mac_header(skb);
skb_gro_reset_offset(skb);
eth = skb_gro_header_fast(skb, 0);
if (unlikely(skb_gro_h... | static struct sk_buff *napi_frags_skb(struct napi_struct *napi) {
struct sk_buff *skb = napi->skb;
const struct ethhdr *eth;
unsigned int hlen = sizeof(*eth);
napi->skb = NULL;
skb_reset_mac_header(skb);
skb_gro_reset_offset(skb);
if (unlikely(skb_gro_header_hard(skb, hlen))) {
eth =... | static struct sk_buff *napi_frags_skb(struct napi_struct *napi) {
struct sk_buff *skb = napi->skb;
const struct ethhdr *eth;
unsigned int hlen = sizeof(*eth);
napi->skb = NULL;
skb_reset_mac_header(skb);
skb_gro_reset_offset(skb);
eth = skb_gro_header_fast(skb, 0);
if (unlikely(skb_gro_h... | static struct sk_buff *napi_frags_skb(struct napi_struct *napi) {
struct sk_buff *skb = napi->skb;
const struct ethhdr *eth;
unsigned int hlen = sizeof(*eth);
napi->skb = NULL;
skb_reset_mac_header(skb);
skb_gro_reset_offset(skb);
if (unlikely(skb_gro_header_hard(skb, hlen))) {
eth =... | static struct sk_buff *napi_frags_skb(struct napi_struct *napi) {
struct sk_buff *skb = napi->skb;
unsigned int hlen = sizeof(*eth);
skb_reset_mac_header(skb);
skb_gro_reset_offset(skb);
eth = skb_gro_header_fast(skb, 0);
if (unlikely(skb_gro_header_hard(skb, hlen))) {
eth = skb_gro_head... | static struct sk_buff *napi_frags_skb(struct napi_struct *napi) {
struct sk_buff *skb = napi->skb;
unsigned int hlen = sizeof(*eth);
skb_reset_mac_header(skb);
skb_gro_reset_offset(skb);
if (unlikely(skb_gro_header_hard(skb, hlen))) {
eth = skb_gro_header_slow(skb, hlen, 0);
if (unli... | static struct sk_buff *napi_frags_skb(struct napi_struct *napi) {
struct sk_buff *skb = napi->skb;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned int hlen = sizeof(*eth);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
skb_reset_mac_header(skb);
skb_gro_reset_offset(skb);
eth = skb_gro... | static struct sk_buff *napi_frags_skb(struct napi_struct *napi) {
struct sk_buff *skb = napi->skb;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned int hlen = sizeof(*eth);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
skb_reset_mac_header(skb);
skb_gro_reset_offset(skb);
if (unlikely(... | static struct sk_buff *napi_frags_skb(struct napi_struct *napi) {
struct sk_buff *skb = napi->skb;
unsigned int hlen = sizeof(*eth);
skb_reset_mac_header(skb);
skb_gro_reset_offset(skb);
- eth = skb_gro_header_fast(skb, 0);
if (unlikely(skb_gro_header_hard(skb, hlen))) {
eth = skb_... |
CVE-2020-10732 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/binfmt_elf.c | fill_thread_core_info | static int fill_thread_core_info(struct elf_thread_core_info *t, const struct user_regset_view *view, long signr, size_t *total) {
unsigned int i;
unsigned int regset0_size = regset_size(t->task, &view->regsets[0]);
fill_prstatus(&t->prstatus, t->task, signr);
(void) view->regsets[0].get(t->task, &view-... | static int fill_thread_core_info(struct elf_thread_core_info *t, const struct user_regset_view *view, long signr, size_t *total) {
unsigned int i;
unsigned int regset0_size = regset_size(t->task, &view->regsets[0]);
fill_prstatus(&t->prstatus, t->task, signr);
(void) view->regsets[0].get(t->task, &view-... | static int fill_thread_core_info(struct elf_thread_core_info *t, const struct user_regset_view *view, long signr, size_t *total) {
unsigned int i;
fill_prstatus(&t->prstatus, t->task, signr);
(void) view->regsets[0].get(t->task, &view->regsets[0], 0, PR_REG_SIZE(t->prstatus.pr_reg), PR_REG_PTR(&t->prstatus)... | static int fill_thread_core_info(struct elf_thread_core_info *t, const struct user_regset_view *view, long signr, size_t *total) {
unsigned int i;
fill_prstatus(&t->prstatus, t->task, signr);
(void) view->regsets[0].get(t->task, &view->regsets[0], 0, PR_REG_SIZE(t->prstatus.pr_reg), PR_REG_PTR(&t->prstatus)... | static int fill_thread_core_info(struct elf_thread_core_info *t, const struct user_regset_view *view, long signr, size_t *total) {
unsigned int regset0_size = regset_size(t->task, &view->regsets[0]);
fill_prstatus(&t->prstatus, t->task, signr);
(void) view->regsets[0].get(t->task, &view->regsets[0], 0, regs... | static int fill_thread_core_info(struct elf_thread_core_info *t, const struct user_regset_view *view, long signr, size_t *total) {
unsigned int regset0_size = regset_size(t->task, &view->regsets[0]);
fill_prstatus(&t->prstatus, t->task, signr);
(void) view->regsets[0].get(t->task, &view->regsets[0], 0, regs... | static int fill_thread_core_info(struct elf_thread_core_info *t, const struct user_regset_view *view, long signr, size_t *total) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
fill_prstatus(&t->prstatus, t->task, signr);
(void) view->regsets[0].get(t->task, &view->regsets[0], 0, PR_REG_SIZE(t->prstatus.pr_... | static int fill_thread_core_info(struct elf_thread_core_info *t, const struct user_regset_view *view, long signr, size_t *total) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
fill_prstatus(&t->prstatus, t->task, signr);
(void) view->regsets[0].get(t->task, &view->regsets[0], 0, PR_REG_SIZE(t->prstatus.pr_... | static int fill_thread_core_info(struct elf_thread_core_info *t, const struct user_regset_view *view, long signr, size_t *total) {
unsigned int regset0_size = regset_size(t->task, &view->regsets[0]);
fill_prstatus(&t->prstatus, t->task, signr);
(void) view->regsets[0].get(t->task, &view->regsets[0], 0, ... |
CVE-2020-10751 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | security/selinux/hooks.c | selinux_nlmsg_perm | static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb) {
int err = 0;
u32 perm;
struct nlmsghdr *nlh;
struct sk_security_struct *sksec = sk->sk_security;
if (skb->len < NLMSG_HDRLEN) {
err = -EVAL;
goto out;
}
nlh = nlmsg_hdr(skb);
err = selinux_nlmsg_lookup(... | static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb) {
int rc = 0;
unsigned int msg_len;
unsigned int data_len = skb->len;
unsigned char *data = skb->data;
struct nlmsghdr *nlh;
struct sk_security_struct *sksec = sk->sk_security;
u16 sclass = sksec->sclass;
u32 perm;
w... | static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb) {
int err = 0;
u32 perm;
struct nlmsghdr *nlh;
struct sk_security_struct *sksec = sk->sk_security;
if (skb->len < NLMSG_HDRLEN) {
err = -EVAL;
goto out;
}
nlh = nlmsg_hdr(skb);
err = selinux_nlmsg_lookup(... | static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb) {
int rc = 0;
unsigned int msg_len;
unsigned int data_len = skb->len;
unsigned char *data = skb->data;
struct nlmsghdr *nlh;
struct sk_security_struct *sksec = sk->sk_security;
u16 sclass = sksec->sclass;
u32 perm;
w... | static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb) {
int err = 0;
u32 perm;
struct nlmsghdr *nlh;
struct sk_security_struct *sksec = sk->sk_security;
if (skb->len < NLMSG_HDRLEN) {
err = -EVAL;
goto out;
}
nlh = nlmsg_hdr(skb);
err = selinux_nlmsg_lookup(... | static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb) {
int rc = 0;
unsigned int msg_len;
unsigned int data_len = skb->len;
unsigned char *data = skb->data;
struct nlmsghdr *nlh;
struct sk_security_struct *sksec = sk->sk_security;
u16 sclass = sksec->sclass;
u32 perm;
w... | static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb) {
int err = 0;
u32 perm;
struct nlmsghdr *nlh;
struct sk_security_struct *sksec = sk->sk_security;
if (skb->len < NLMSG_HDRLEN) {
err = -EVAL;
goto out;
}
nlh = nlmsg_hdr(skb);
err = selinux_nlmsg_lookup(... | static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb) {
int rc = 0;
unsigned int msg_len;
unsigned int data_len = skb->len;
unsigned char *data = skb->data;
struct nlmsghdr *nlh;
struct sk_security_struct *sksec = sk->sk_security;
u16 sclass = sksec->sclass;
u32 perm;
w... | static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb) {
- int err = 0;
- u32 perm;
+ int rc = 0;
+ unsigned int msg_len;
+ unsigned int data_len = skb->len;
+ unsigned char *data = skb->data;
struct nlmsghdr *nlh;
struct sk_security_struct *sksec = sk->sk_security;
- if (sk... |
CVE-2020-10757 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | mm/mremap.c | 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;
... | 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;
... | 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;
pmd_t *old_pmd, *new_pmd;
unsigned long mmun_start;
unsigned long mmun_end;
old_e... | 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;
pmd_t *old_pmd, *new_pmd;
unsigned long mmun_start;
unsigned long mmun_end;
old_e... | 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) {
for (; old_addr < old_end; old_addr += extent, new_addr += extent) {
if (is_swap_pmd(*old_pmd) || pmd_trans_huge(*old_pmd)) {
... | 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) {
for (; old_addr < old_end; old_addr += extent, new_addr += extent) {
if (is_swap_pmd(*old_pmd) || pmd_trans_huge(*old_pmd) || ... | 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) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (; old_addr < old_end; old_addr += extent, new_addr += extent) {
/* PLACEHOL... | 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) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (; old_addr < old_end; old_addr += extent, new_addr += extent) {
/* PLACEHOL... | 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) {
for (; old_addr < old_end; old_addr += extent, new_addr += extent) {
- if (is_swap_pmd(*old_pmd) || pmd_trans_huge(*old_pmd))... |
CVE-2020-10768 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kernel/cpu/bugs.c | ib_prctl_set | static int ib_prctl_set(struct task_struct *task, unsigned long ctrl) {
switch (ctrl) {
case PR_SPEC_ENABLE:
if (spectre_v2_user_ibpb == SPECTRE_V2_USER_NONE && spectre_v2_user_stibp == SPECTRE_V2_USER_NONE) {
return 0;
}
if (spectre_v2_user_ibpb == SPECTRE_V2_USER_STRICT || ... | static int ib_prctl_set(struct task_struct *task, unsigned long ctrl) {
switch (ctrl) {
case PR_SPEC_ENABLE:
if (spectre_v2_user_ibpb == SPECTRE_V2_USER_NONE && spectre_v2_user_stibp == SPECTRE_V2_USER_NONE) {
return 0;
}
if (spectre_v2_user_ibpb == SPECTRE_V2_USER_STRICT || ... | static int ib_prctl_set(struct task_struct *task, unsigned long ctrl) {
switch (ctrl) {
case PR_SPEC_ENABLE:
if (spectre_v2_user_ibpb == SPECTRE_V2_USER_NONE && spectre_v2_user_stibp == SPECTRE_V2_USER_NONE) {
return 0;
}
if (spectre_v2_user_ibpb == SPECTRE_V2_USER_STRICT || ... | static int ib_prctl_set(struct task_struct *task, unsigned long ctrl) {
switch (ctrl) {
case PR_SPEC_ENABLE:
if (spectre_v2_user_ibpb == SPECTRE_V2_USER_NONE && spectre_v2_user_stibp == SPECTRE_V2_USER_NONE) {
return 0;
}
if (spectre_v2_user_ibpb == SPECTRE_V2_USER_STRICT || ... | static int ib_prctl_set(struct task_struct *task, unsigned long ctrl) {
switch (ctrl) {
case PR_SPEC_ENABLE:
if (spectre_v2_user_ibpb == SPECTRE_V2_USER_NONE && spectre_v2_user_stibp == SPECTRE_V2_USER_NONE) {
return 0;
}
if (spectre_v2_user_ibpb == SPECTRE_V2_USER_STRICT || ... | static int ib_prctl_set(struct task_struct *task, unsigned long ctrl) {
switch (ctrl) {
case PR_SPEC_ENABLE:
if (spectre_v2_user_ibpb == SPECTRE_V2_USER_NONE && spectre_v2_user_stibp == SPECTRE_V2_USER_NONE) {
return 0;
}
if (spectre_v2_user_ibpb == SPECTRE_V2_USER_STRICT || ... | static int ib_prctl_set(struct task_struct *task, unsigned long ctrl) {
switch (ctrl) {
case PR_SPEC_ENABLE:
if (spectre_v2_user_ibpb == SPECTRE_V2_USER_NONE && spectre_v2_user_stibp == SPECTRE_V2_USER_NONE) {
return 0;
}
if (spectre_v2_user_ibpb == SPECTRE_V2_USER_STRICT || ... | static int ib_prctl_set(struct task_struct *task, unsigned long ctrl) {
switch (ctrl) {
case PR_SPEC_ENABLE:
if (spectre_v2_user_ibpb == SPECTRE_V2_USER_NONE && spectre_v2_user_stibp == SPECTRE_V2_USER_NONE) {
return 0;
}
if (spectre_v2_user_ibpb == SPECTRE_V2_USER_STRICT || ... | static int ib_prctl_set(struct task_struct *task, unsigned long ctrl) {
switch (ctrl) {
case PR_SPEC_ENABLE:
if (spectre_v2_user_ibpb == SPECTRE_V2_USER_NONE && spectre_v2_user_stibp == SPECTRE_V2_USER_NONE) {
return 0;
}
- if (spectre_v2_user_ibpb == SPECTRE_V2_USER_STR... |
CVE-2020-10769 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | crypto/authenc.c | crypto_authenc_extractkeys | int crypto_authenc_extractkeys(struct crypto_authenc_keys *keys, const u8 *key, unsigned int keylen) {
struct rtattr *rta = (struct rtattr *)key;
struct crypto_authenc_key_param *param;
if (!RTA_OK(rta, keylen)) {
return -EVAL;
}
if (rta->rta_type != CRYPTO_AUTHENC_KEYA_PARAM) {
retu... | int crypto_authenc_extractkeys(struct crypto_authenc_keys *keys, const u8 *key, unsigned int keylen) {
struct rtattr *rta = (struct rtattr *)key;
struct crypto_authenc_key_param *param;
if (!RTA_OK(rta, keylen)) {
return -EVAL;
}
if (rta->rta_type != CRYPTO_AUTHENC_KEYA_PARAM) {
retu... | int crypto_authenc_extractkeys(struct crypto_authenc_keys *keys, const u8 *key, unsigned int keylen) {
struct rtattr *rta = (struct rtattr *)key;
struct crypto_authenc_key_param *param;
if (!RTA_OK(rta, keylen)) {
return -EVAL;
}
if (rta->rta_type != CRYPTO_AUTHENC_KEYA_PARAM) {
retu... | int crypto_authenc_extractkeys(struct crypto_authenc_keys *keys, const u8 *key, unsigned int keylen) {
struct rtattr *rta = (struct rtattr *)key;
struct crypto_authenc_key_param *param;
if (!RTA_OK(rta, keylen)) {
return -EVAL;
}
if (rta->rta_type != CRYPTO_AUTHENC_KEYA_PARAM) {
retu... | int crypto_authenc_extractkeys(struct crypto_authenc_keys *keys, const u8 *key, unsigned int keylen) {
struct rtattr *rta = (struct rtattr *)key;
if (!RTA_OK(rta, keylen)) {
return -EVAL;
}
if (RTA_PAYLOAD(rta) < sizeof(*param)) {
return -EVAL;
}
param = RTA_DATA(rta);
keys->... | int crypto_authenc_extractkeys(struct crypto_authenc_keys *keys, const u8 *key, unsigned int keylen) {
struct rtattr *rta = (struct rtattr *)key;
if (!RTA_OK(rta, keylen)) {
return -EVAL;
}
if (RTA_PAYLOAD(rta) != sizeof(*param)) {
return -EVAL;
}
BUILD_BUG_ON(sizeof(*param) % RT... | int crypto_authenc_extractkeys(struct crypto_authenc_keys *keys, const u8 *key, unsigned int keylen) {
struct rtattr *rta = (struct rtattr *)key;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!RTA_OK(rta, keylen)) {
return -EVAL;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (RT... | int crypto_authenc_extractkeys(struct crypto_authenc_keys *keys, const u8 *key, unsigned int keylen) {
struct rtattr *rta = (struct rtattr *)key;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!RTA_OK(rta, keylen)) {
return -EVAL;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (RT... | int crypto_authenc_extractkeys(struct crypto_authenc_keys *keys, const u8 *key, unsigned int keylen) {
struct rtattr *rta = (struct rtattr *)key;
if (!RTA_OK(rta, keylen)) {
return -EVAL;
}
- if (RTA_PAYLOAD(rta) < sizeof(*param)) {
+ if (RTA_PAYLOAD(rta) != sizeof(*param)) {
ret... |
CVE-2020-10773 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/s390/mm/cmm.c | cmm_timeout_handler | static int cmm_timeout_handler(struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) {
char buf[64], *p;
long nr, seconds;
unsigned int len;
if (!*lenp || (*ppos && !write)) {
*lenp = 0;
return 0;
}
if (write) {
len = *lenp;
if (copy_from_use... | static int cmm_timeout_handler(struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) {
char buf[64], *p;
long nr, seconds;
unsigned int len;
if (!*lenp || (*ppos && !write)) {
*lenp = 0;
return 0;
}
if (write) {
len = min(*lenp, sizeof(buf));
... | static int cmm_timeout_handler(struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) {
char buf[64], *p;
long nr, seconds;
unsigned int len;
if (!*lenp || (*ppos && !write)) {
*lenp = 0;
return 0;
}
if (write) {
len = *lenp;
if (copy_from_use... | static int cmm_timeout_handler(struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) {
char buf[64], *p;
long nr, seconds;
unsigned int len;
if (!*lenp || (*ppos && !write)) {
*lenp = 0;
return 0;
}
if (write) {
len = min(*lenp, sizeof(buf));
... | static int cmm_timeout_handler(struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) {
if (!*lenp || (*ppos && !write)) {
return 0;
}
if (write) {
len = *lenp;
if (copy_from_user(buf, buffer, len > sizeof(buf) ? sizeof(buf) : len)) {
return -EFAULT;
... | static int cmm_timeout_handler(struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) {
if (!*lenp || (*ppos && !write)) {
return 0;
}
if (write) {
len = min(*lenp, sizeof(buf));
if (copy_from_user(buf, buffer, len)) {
return -EFAULT;
}
... | static int cmm_timeout_handler(struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!*lenp || (*ppos && !write)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return 0;
}
if (write) {
len = *lenp;
if... | static int cmm_timeout_handler(struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!*lenp || (*ppos && !write)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return 0;
}
if (write) {
len = min(*lenp, sizeof... | static int cmm_timeout_handler(struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) {
if (!*lenp || (*ppos && !write)) {
return 0;
}
if (write) {
- len = *lenp;
- if (copy_from_user(buf, buffer, len > sizeof(buf) ? sizeof(buf) : len)) {
+ len = min(*l... |
CVE-2020-10942 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/vhost/net.c | get_raw_socket | static struct socket *get_raw_socket(int fd) {
struct {
struct sockaddr_ll sa;
char buf[MAX_ADDR_LEN];
} uaddr;
int r;
struct socket *sock = sockfd_lookup(fd, &r);
if (!sock) {
return ERR_PTR(-ENOTSOCK);
}
if (sock->sk->sk_type != SOCK_RAW) {
r = -ESOCKTNOSUPP... | static struct socket *get_raw_socket(int fd) {
int r;
struct socket *sock = sockfd_lookup(fd, &r);
if (!sock) {
return ERR_PTR(-ENOTSOCK);
}
if (sock->sk->sk_type != SOCK_RAW) {
r = -ESOCKTNOSUPPORT;
goto err;
}
if (sock->sk->sk_family != AF_PACKET) {
r = -EPF... | static struct socket *get_raw_socket(int fd) {
struct {
struct sockaddr_ll sa;
char buf[MAX_ADDR_LEN];
} uaddr;
int uaddr_len = sizeof uaddr, r;
struct socket *sock = sockfd_lookup(fd, &r);
if (!sock) {
return ERR_PTR(-ENOTSOCK);
}
if (sock->sk->sk_type != SOCK_RAW) {... | static struct socket *get_raw_socket(int fd) {
int r;
struct socket *sock = sockfd_lookup(fd, &r);
if (!sock) {
return ERR_PTR(-ENOTSOCK);
}
if (sock->sk->sk_type != SOCK_RAW) {
r = -ESOCKTNOSUPPORT;
goto err;
}
if (sock->sk->sk_family != AF_PACKET) {
r = -EPF... | static struct socket *get_raw_socket(int fd) {
struct {
struct sockaddr_ll sa;
char buf[MAX_ADDR_LEN];
} uaddr;
int r;
struct socket *sock = sockfd_lookup(fd, &r);
if (!sock) {
return ERR_PTR(-ENOTSOCK);
}
if (sock->sk->sk_type != SOCK_RAW) {
goto err;
}
... | static struct socket *get_raw_socket(int fd) {
int r;
struct socket *sock = sockfd_lookup(fd, &r);
if (!sock) {
return ERR_PTR(-ENOTSOCK);
}
if (sock->sk->sk_type != SOCK_RAW) {
goto err;
}
if (sock->sk->sk_family != AF_PACKET) {
r = -EPFNOSUPPORT;
goto err;
... | static struct socket *get_raw_socket(int fd) {
struct {
struct sockaddr_ll sa;
char buf[MAX_ADDR_LEN];
} uaddr;
int uaddr_len = sizeof uaddr, r;
struct socket *sock = sockfd_lookup(fd, &r);
if (!sock) {
return ERR_PTR(-ENOTSOCK);
}
if (sock->sk->sk_type != SOCK_RAW) {... | static struct socket *get_raw_socket(int fd) {
int r;
struct socket *sock = sockfd_lookup(fd, &r);
if (!sock) {
return ERR_PTR(-ENOTSOCK);
}
if (sock->sk->sk_type != SOCK_RAW) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
goto err;
}
if (sock->sk->sk_family != AF_PACKET... | static struct socket *get_raw_socket(int fd) {
- struct {
- struct sockaddr_ll sa;
- char buf[MAX_ADDR_LEN];
- } uaddr;
int r;
struct socket *sock = sockfd_lookup(fd, &r);
if (!sock) {
return ERR_PTR(-ENOTSOCK);
}
if (sock->sk->sk_type != SOCK_RAW) {
goto ... |
CVE-2020-11494 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/can/slcan.c | slc_alloc | static struct slcan *slc_alloc(dev_t line) {
int i;
char name[IFNAMSIZ];
struct net_device *dev = NULL;
struct slcan *sl;
for (i = 0; i < maxdev; i++) {
dev = slcan_devs[i];
if (dev == NULL) {
break;
}
}
if (i >= maxdev) {
return NULL;
}
sp... | static struct slcan *slc_alloc(dev_t line) {
int i;
char name[IFNAMSIZ];
struct net_device *dev = NULL;
struct slcan *sl;
for (i = 0; i < maxdev; i++) {
dev = slcan_devs[i];
if (dev == NULL) {
break;
}
}
if (i >= maxdev) {
return NULL;
}
sp... | static struct slcan *slc_alloc(dev_t line) {
int i;
char name[IFNAMSIZ];
struct net_device *dev = NULL;
struct slcan *sl;
for (i = 0; i < maxdev; i++) {
dev = slcan_devs[i];
if (dev == NULL) {
break;
}
}
if (i >= maxdev) {
return NULL;
}
sp... | static struct slcan *slc_alloc(dev_t line) {
int i;
char name[IFNAMSIZ];
struct net_device *dev = NULL;
struct slcan *sl;
for (i = 0; i < maxdev; i++) {
dev = slcan_devs[i];
if (dev == NULL) {
break;
}
}
if (i >= maxdev) {
return NULL;
}
sp... | static struct slcan *slc_alloc(dev_t line) {
}
| static struct slcan *slc_alloc(dev_t line) {
}
| static struct slcan *slc_alloc(dev_t line) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static struct slcan *slc_alloc(dev_t line) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | |
CVE-2020-11494 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/can/slcan.c | slc_bump | static void slc_bump(struct slcan *sl) {
struct sk_buff *skb;
struct can_frame cf;
int i, tmp;
u32 tmpid;
char *cmd = sl->rbuff;
cf.can_id = 0;
switch (*cmd) {
case 'r':
cf.can_id = CAN_RTR_FLAG;
case 't':
cf.can_dlc = sl->rbuff[SLC_CMD_LEN + SLC_SFF_ID_LEN];
... | static void slc_bump(struct slcan *sl) {
struct sk_buff *skb;
struct can_frame cf;
int i, tmp;
u32 tmpid;
char *cmd = sl->rbuff;
memset(&cf, 0, sizeof(cf));
switch (*cmd) {
case 'r':
cf.can_id = CAN_RTR_FLAG;
case 't':
cf.can_dlc = sl->rbuff[SLC_CMD_LEN + SLC_SFF_ID_L... | static void slc_bump(struct slcan *sl) {
struct sk_buff *skb;
struct can_frame cf;
int i, tmp;
u32 tmpid;
char *cmd = sl->rbuff;
cf.can_id = 0;
switch (*cmd) {
case 'r':
cf.can_id = CAN_RTR_FLAG;
case 't':
cf.can_dlc = sl->rbuff[SLC_CMD_LEN + SLC_SFF_ID_LEN];
... | static void slc_bump(struct slcan *sl) {
struct sk_buff *skb;
struct can_frame cf;
int i, tmp;
u32 tmpid;
char *cmd = sl->rbuff;
memset(&cf, 0, sizeof(cf));
switch (*cmd) {
case 'r':
cf.can_id = CAN_RTR_FLAG;
case 't':
cf.can_dlc = sl->rbuff[SLC_CMD_LEN + SLC_SFF_ID_L... | static void slc_bump(struct slcan *sl) {
char *cmd = sl->rbuff;
cf.can_id = 0;
switch (*cmd) {
case 'T':
cf.can_id |= CAN_EFF_FLAG;
break;
}
cf.can_id |= tmpid;
if (cf.can_dlc >= '0' && cf.can_dlc < '9') {
cf.can_dlc -= '0';
} else {
}
*(u64 *) (&cf.data) ... | static void slc_bump(struct slcan *sl) {
char *cmd = sl->rbuff;
memset(&cf, 0, sizeof(cf));
switch (*cmd) {
case 'T':
cf.can_id |= CAN_EFF_FLAG;
break;
}
cf.can_id |= tmpid;
if (cf.can_dlc >= '0' && cf.can_dlc < '9') {
cf.can_dlc -= '0';
} else {
}
memcpy(... | static void slc_bump(struct slcan *sl) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
char *cmd = sl->rbuff;
cf.can_id = 0;
switch (*cmd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case 'T':
cf.can_id |= CAN_EFF_FLAG;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
break;... | static void slc_bump(struct slcan *sl) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
char *cmd = sl->rbuff;
memset(&cf, 0, sizeof(cf));
switch (*cmd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case 'T':
cf.can_id |= CAN_EFF_FLAG;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static void slc_bump(struct slcan *sl) {
char *cmd = sl->rbuff;
- cf.can_id = 0;
+ memset(&cf, 0, sizeof(cf));
switch (*cmd) {
case 'T':
cf.can_id |= CAN_EFF_FLAG;
break;
}
cf.can_id |= tmpid;
if (cf.can_dlc >= '0' && cf.can_dlc < '9') {
cf.can_dlc -= '0';... |
CVE-2020-11494 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/can/slcan.c | slc_open | static int slc_open(struct net_device *dev) {
struct slcan *sl = netdev_priv(dev);
if (sl->tty == NULL) {
return -ENODEV;
}
sl->flags &= (1 << SLF_USE);
netif_start_queue(dev);
return 0;
} | static int slc_open(struct net_device *dev) {
struct slcan *sl = netdev_priv(dev);
if (sl->tty == NULL) {
return -ENODEV;
}
sl->flags &= (1 << SLF_USE);
netif_start_queue(dev);
return 0;
} | static int slc_open(struct net_device *dev) {
struct slcan *sl = netdev_priv(dev);
if (sl->tty == NULL) {
return -ENODEV;
}
sl->flags &= (1 << SLF_USE);
netif_start_queue(dev);
return 0;
} | static int slc_open(struct net_device *dev) {
struct slcan *sl = netdev_priv(dev);
if (sl->tty == NULL) {
return -ENODEV;
}
sl->flags &= (1 << SLF_USE);
netif_start_queue(dev);
return 0;
} | static int slc_open(struct net_device *dev) {
struct slcan *sl = netdev_priv(dev);
if (sl->tty == NULL) {
return -ENODEV;
}
sl->flags &= (1 << SLF_USE);
netif_start_queue(dev);
return 0;
}
| static int slc_open(struct net_device *dev) {
struct slcan *sl = netdev_priv(dev);
if (sl->tty == NULL) {
return -ENODEV;
}
sl->flags &= (1 << SLF_USE);
netif_start_queue(dev);
return 0;
}
| static int slc_open(struct net_device *dev) {
struct slcan *sl = netdev_priv(dev);
if (sl->tty == NULL) {
return -ENODEV;
}
sl->flags &= (1 << SLF_USE);
netif_start_queue(dev);
return 0;
}
| static int slc_open(struct net_device *dev) {
struct slcan *sl = netdev_priv(dev);
if (sl->tty == NULL) {
return -ENODEV;
}
sl->flags &= (1 << SLF_USE);
netif_start_queue(dev);
return 0;
} | |
CVE-2020-11494 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/can/slcan.c | slc_sync | static void slc_sync(void) {
int i;
struct net_device *dev;
struct slcan *sl;
for (i = 0; i < maxdev; i++) {
dev = slcan_devs[i];
if (dev == NULL) {
break;
}
sl = netdev_priv(dev);
if (sl->tty) {
continue;
}
if (dev->flags &... | static void slc_sync(void) {
int i;
struct net_device *dev;
struct slcan *sl;
for (i = 0; i < maxdev; i++) {
dev = slcan_devs[i];
if (dev == NULL) {
break;
}
sl = netdev_priv(dev);
if (sl->tty) {
continue;
}
if (dev->flags &... | static void slc_sync(void) {
int i;
struct net_device *dev;
struct slcan *sl;
for (i = 0; i < maxdev; i++) {
dev = slcan_devs[i];
if (dev == NULL) {
break;
}
sl = netdev_priv(dev);
if (sl->tty) {
continue;
}
if (dev->flags &... | static void slc_sync(void) {
int i;
struct net_device *dev;
struct slcan *sl;
for (i = 0; i < maxdev; i++) {
dev = slcan_devs[i];
if (dev == NULL) {
break;
}
sl = netdev_priv(dev);
if (sl->tty) {
continue;
}
if (dev->flags &... | static void slc_sync(void) {
}
| static void slc_sync(void) {
}
| static void slc_sync(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static void slc_sync(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | |
CVE-2020-11494 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/can/slcan.c | slc_xmit | static netdev_tx_t slc_xmit(struct sk_buff *skb, struct net_device *dev) {
struct slcan *sl = netdev_priv(dev);
if (skb->len != sizeof(struct can_frame)) {
goto out;
}
spin_lock(&sl->lock);
if (!netif_running(dev)) {
spin_unlock(&sl->lock);
printk(KERN_WARNG "%s: xmit: iface ... | static netdev_tx_t slc_xmit(struct sk_buff *skb, struct net_device *dev) {
struct slcan *sl = netdev_priv(dev);
if (skb->len != sizeof(struct can_frame)) {
goto out;
}
spin_lock(&sl->lock);
if (!netif_running(dev)) {
spin_unlock(&sl->lock);
printk(KERN_WARNG "%s: xmit: iface ... | static netdev_tx_t slc_xmit(struct sk_buff *skb, struct net_device *dev) {
struct slcan *sl = netdev_priv(dev);
if (skb->len != sizeof(struct can_frame)) {
goto out;
}
spin_lock(&sl->lock);
if (!netif_running(dev)) {
spin_unlock(&sl->lock);
printk(KERN_WARNG "%s: xmit: iface ... | static netdev_tx_t slc_xmit(struct sk_buff *skb, struct net_device *dev) {
struct slcan *sl = netdev_priv(dev);
if (skb->len != sizeof(struct can_frame)) {
goto out;
}
spin_lock(&sl->lock);
if (!netif_running(dev)) {
spin_unlock(&sl->lock);
printk(KERN_WARNG "%s: xmit: iface ... | static netdev_tx_t slc_xmit(struct sk_buff *skb, struct net_device *dev) {
}
| static netdev_tx_t slc_xmit(struct sk_buff *skb, struct net_device *dev) {
}
| static netdev_tx_t slc_xmit(struct sk_buff *skb, struct net_device *dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static netdev_tx_t slc_xmit(struct sk_buff *skb, struct net_device *dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | |
CVE-2020-11494 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/can/slcan.c | slcan_close | static void slcan_close(struct tty_struct *tty) {
struct slcan *sl = (struct slcan *) tty->disc_data;
if (!sl || sl->magic != SLCAN_MAGIC || sl->tty != tty) {
return;
}
spin_lock_bh(&sl->lock);
rcu_assign_pointer(tty->disc_data, NULL);
sl->tty = NULL;
spin_unlock_bh(&sl->lock);
s... | static void slcan_close(struct tty_struct *tty) {
struct slcan *sl = (struct slcan *) tty->disc_data;
if (!sl || sl->magic != SLCAN_MAGIC || sl->tty != tty) {
return;
}
spin_lock_bh(&sl->lock);
rcu_assign_pointer(tty->disc_data, NULL);
sl->tty = NULL;
spin_unlock_bh(&sl->lock);
s... | static void slcan_close(struct tty_struct *tty) {
struct slcan *sl = (struct slcan *) tty->disc_data;
if (!sl || sl->magic != SLCAN_MAGIC || sl->tty != tty) {
return;
}
spin_lock_bh(&sl->lock);
rcu_assign_pointer(tty->disc_data, NULL);
sl->tty = NULL;
spin_unlock_bh(&sl->lock);
s... | static void slcan_close(struct tty_struct *tty) {
struct slcan *sl = (struct slcan *) tty->disc_data;
if (!sl || sl->magic != SLCAN_MAGIC || sl->tty != tty) {
return;
}
spin_lock_bh(&sl->lock);
rcu_assign_pointer(tty->disc_data, NULL);
sl->tty = NULL;
spin_unlock_bh(&sl->lock);
s... | static void slcan_close(struct tty_struct *tty) {
}
| static void slcan_close(struct tty_struct *tty) {
}
| static void slcan_close(struct tty_struct *tty) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static void slcan_close(struct tty_struct *tty) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | |
CVE-2020-11494 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/can/slcan.c | slcan_init | static int slcan_init(void) {
int status;
if (maxdev < 4) {
maxdev = 4;
}
pr_info("slcan: serial line CAN interface driver\n");
pr_info("slcan: %d dynamic interface channels.\n", maxdev);
slcan_devs = kzalloc(sizeof(struct net_device *)*maxdev, GFP_KERNEL);
if (!slcan_devs) {
... | static int slcan_init(void) {
int status;
if (maxdev < 4) {
maxdev = 4;
}
pr_info("slcan: serial line CAN interface driver\n");
pr_info("slcan: %d dynamic interface channels.\n", maxdev);
slcan_devs = kzalloc(sizeof(struct net_device *)*maxdev, GFP_KERNEL);
if (!slcan_devs) {
... | static int slcan_init(void) {
int status;
if (maxdev < 4) {
maxdev = 4;
}
printk(banner);
printk(KERN_FO "slcan: %d dynamic interface channels.\n", maxdev);
slcan_devs = kzalloc(sizeof(struct net_device *)*maxdev, GFP_KERNEL);
if (!slcan_devs) {
return -ENOMEM;
}
stat... | static int slcan_init(void) {
int status;
if (maxdev < 4) {
maxdev = 4;
}
printk(banner);
printk(KERN_FO "slcan: %d dynamic interface channels.\n", maxdev);
slcan_devs = kzalloc(sizeof(struct net_device *)*maxdev, GFP_KERNEL);
if (!slcan_devs) {
return -ENOMEM;
}
stat... | static int slcan_init(void) {
}
| static int slcan_init(void) {
}
| static int slcan_init(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static int slcan_init(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | |
CVE-2020-11494 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/can/slcan.c | slcan_ioctl | static int slcan_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) {
struct slcan *sl = (struct slcan *) tty->disc_data;
unsigned int tmp;
if (!sl || sl->magic != SLCAN_MAGIC) {
return -EVAL;
}
switch (cmd) {
case SIOCGIFNAME:
tmp = strlen(sl->... | static int slcan_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) {
struct slcan *sl = (struct slcan *) tty->disc_data;
unsigned int tmp;
if (!sl || sl->magic != SLCAN_MAGIC) {
return -EVAL;
}
switch (cmd) {
case SIOCGIFNAME:
tmp = strlen(sl->... | static int slcan_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) {
struct slcan *sl = (struct slcan *) tty->disc_data;
unsigned int tmp;
if (!sl || sl->magic != SLCAN_MAGIC) {
return -EVAL;
}
switch (cmd) {
case SIOCGIFNAME:
tmp = strlen(sl->... | static int slcan_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) {
struct slcan *sl = (struct slcan *) tty->disc_data;
unsigned int tmp;
if (!sl || sl->magic != SLCAN_MAGIC) {
return -EVAL;
}
switch (cmd) {
case SIOCGIFNAME:
tmp = strlen(sl->... | static int slcan_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) {
}
| static int slcan_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) {
}
| static int slcan_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static int slcan_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | |
CVE-2020-11494 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/can/slcan.c | slcan_open | static int slcan_open(struct tty_struct *tty) {
struct slcan *sl;
int err;
if (!capable(CAP_NET_ADM)) {
return -EPERM;
}
if (tty->ops->write == NULL) {
return -EOPNOTSUPP;
}
rtnl_lock();
slc_sync();
sl = tty->disc_data;
err = -EEXIST;
if (sl && sl->magic == SL... | static int slcan_open(struct tty_struct *tty) {
struct slcan *sl;
int err;
if (!capable(CAP_NET_ADM)) {
return -EPERM;
}
if (tty->ops->write == NULL) {
return -EOPNOTSUPP;
}
rtnl_lock();
slc_sync();
sl = tty->disc_data;
err = -EEXIST;
if (sl && sl->magic == SL... | static int slcan_open(struct tty_struct *tty) {
struct slcan *sl;
int err;
if (!capable(CAP_NET_ADM)) {
return -EPERM;
}
if (tty->ops->write == NULL) {
return -EOPNOTSUPP;
}
rtnl_lock();
slc_sync();
sl = tty->disc_data;
err = -EEXIST;
if (sl && sl->magic == SL... | static int slcan_open(struct tty_struct *tty) {
struct slcan *sl;
int err;
if (!capable(CAP_NET_ADM)) {
return -EPERM;
}
if (tty->ops->write == NULL) {
return -EOPNOTSUPP;
}
rtnl_lock();
slc_sync();
sl = tty->disc_data;
err = -EEXIST;
if (sl && sl->magic == SL... | static int slcan_open(struct tty_struct *tty) {
}
| static int slcan_open(struct tty_struct *tty) {
}
| static int slcan_open(struct tty_struct *tty) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static int slcan_open(struct tty_struct *tty) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | |
CVE-2020-11494 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/can/slcan.c | slcan_receive_buf | static void slcan_receive_buf(struct tty_struct *tty, const unsigned char *cp, char *fp, int count) {
struct slcan *sl = (struct slcan *) tty->disc_data;
if (!sl || sl->magic != SLCAN_MAGIC || !netif_running(sl->dev)) {
return;
}
while (count--) {
if (fp && *fp++) {
if (!test... | static void slcan_receive_buf(struct tty_struct *tty, const unsigned char *cp, char *fp, int count) {
struct slcan *sl = (struct slcan *) tty->disc_data;
if (!sl || sl->magic != SLCAN_MAGIC || !netif_running(sl->dev)) {
return;
}
while (count--) {
if (fp && *fp++) {
if (!test... | static void slcan_receive_buf(struct tty_struct *tty, const unsigned char *cp, char *fp, int count) {
struct slcan *sl = (struct slcan *) tty->disc_data;
if (!sl || sl->magic != SLCAN_MAGIC || !netif_running(sl->dev)) {
return;
}
while (count--) {
if (fp && *fp++) {
if (!test... | static void slcan_receive_buf(struct tty_struct *tty, const unsigned char *cp, char *fp, int count) {
struct slcan *sl = (struct slcan *) tty->disc_data;
if (!sl || sl->magic != SLCAN_MAGIC || !netif_running(sl->dev)) {
return;
}
while (count--) {
if (fp && *fp++) {
if (!test... | static void slcan_receive_buf(struct tty_struct *tty, const unsigned char *cp, char *fp, int count) {
}
| static void slcan_receive_buf(struct tty_struct *tty, const unsigned char *cp, char *fp, int count) {
}
| static void slcan_receive_buf(struct tty_struct *tty, const unsigned char *cp, char *fp, int count) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static void slcan_receive_buf(struct tty_struct *tty, const unsigned char *cp, char *fp, int count) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | |
CVE-2020-11494 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/can/slcan.c | slcan_write_wakeup | static void slcan_write_wakeup(struct tty_struct *tty) {
struct slcan *sl;
rcu_read_lock();
sl = rcu_dereference(tty->disc_data);
if (!sl) {
goto out;
}
schedule_work(&sl->tx_work);
out:
rcu_read_unlock();
} | static void slcan_write_wakeup(struct tty_struct *tty) {
struct slcan *sl;
rcu_read_lock();
sl = rcu_dereference(tty->disc_data);
if (!sl) {
goto out;
}
schedule_work(&sl->tx_work);
out:
rcu_read_unlock();
} | static void slcan_write_wakeup(struct tty_struct *tty) {
struct slcan *sl;
rcu_read_lock();
sl = rcu_dereference(tty->disc_data);
if (!sl) {
goto out;
}
schedule_work(&sl->tx_work);
out:
rcu_read_unlock();
} | static void slcan_write_wakeup(struct tty_struct *tty) {
struct slcan *sl;
rcu_read_lock();
sl = rcu_dereference(tty->disc_data);
if (!sl) {
goto out;
}
schedule_work(&sl->tx_work);
out:
rcu_read_unlock();
} | static void slcan_write_wakeup(struct tty_struct *tty) {
}
| static void slcan_write_wakeup(struct tty_struct *tty) {
}
| static void slcan_write_wakeup(struct tty_struct *tty) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static void slcan_write_wakeup(struct tty_struct *tty) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | |
CVE-2020-11565 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | mm/mempolicy.c | mpol_parse_str | int mpol_parse_str(char *str, struct mempolicy **mpol) {
struct mempolicy *new = NULL;
unsigned short mode_flags;
nodemask_t nodes;
char *nodelist = strchr(str, ':');
char *flags = strchr(str, '=');
int err = 1, mode;
if (flags) {
*flags++ = '\0';
}
if (nodelist) {
*n... | int mpol_parse_str(char *str, struct mempolicy **mpol) {
struct mempolicy *new = NULL;
unsigned short mode_flags;
nodemask_t nodes;
char *nodelist = strchr(str, ':');
char *flags = strchr(str, '=');
int err = 1, mode;
if (flags) {
*flags++ = '\0';
}
if (nodelist) {
*n... | int mpol_parse_str(char *str, struct mempolicy **mpol) {
struct mempolicy *new = NULL;
unsigned short mode;
unsigned short mode_flags;
nodemask_t nodes;
char *nodelist = strchr(str, ':');
char *flags = strchr(str, '=');
int err = 1;
if (nodelist) {
*nodelist++ = '\0';
if ... | int mpol_parse_str(char *str, struct mempolicy **mpol) {
struct mempolicy *new = NULL;
unsigned short mode;
unsigned short mode_flags;
nodemask_t nodes;
char *nodelist = strchr(str, ':');
char *flags = strchr(str, '=');
int err = 1;
if (nodelist) {
*nodelist++ = '\0';
if ... | int mpol_parse_str(char *str, struct mempolicy **mpol) {
char *nodelist = strchr(str, ':');
if (nodelist) {
*nodelist++ = '\0';
if (nodelist_parse(nodelist, nodes)) {
goto out;
}
if (!nodes_subset(nodes, node_states[N_MEMORY])) {
goto out;
}
} ... | int mpol_parse_str(char *str, struct mempolicy **mpol) {
char *nodelist = strchr(str, ':');
if (nodelist) {
*nodelist++ = '\0';
if (nodelist_parse(nodelist, nodes)) {
goto out;
}
if (!nodes_subset(nodes, node_states[N_MEMORY])) {
goto out;
}
} ... | int mpol_parse_str(char *str, struct mempolicy **mpol) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
char *nodelist = strchr(str, ':');
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (nodelist) {
*nodelist++ = '\0';
if (nodelist_parse(nodelist, nodes)) {
goto out;
... | int mpol_parse_str(char *str, struct mempolicy **mpol) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
char *nodelist = strchr(str, ':');
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (nodelist) {
*nodelist++ = '\0';
if (nodelist_parse(nodelist, nodes)) {
goto out;
... | int mpol_parse_str(char *str, struct mempolicy **mpol) {
char *nodelist = strchr(str, ':');
if (nodelist) {
*nodelist++ = '\0';
if (nodelist_parse(nodelist, nodes)) {
goto out;
}
if (!nodes_subset(nodes, node_states[N_MEMORY])) {
goto out;
... |
CVE-2020-11608 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/usb/gspca/ov519.c | ov511_mode_init_regs | static void ov511_mode_init_regs(struct sd *sd) {
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
int hsegs, vsegs, packet_size, fps, needed;
int interlaced = 0;
struct usb_host_interface *alt;
struct usb_interface *intf;
intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface);
... | static void ov511_mode_init_regs(struct sd *sd) {
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
int hsegs, vsegs, packet_size, fps, needed;
int interlaced = 0;
struct usb_host_interface *alt;
struct usb_interface *intf;
intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface);
... | static void ov511_mode_init_regs(struct sd *sd) {
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
int hsegs, vsegs, packet_size, fps, needed;
int interlaced = 0;
struct usb_host_interface *alt;
struct usb_interface *intf;
intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface);
... | static void ov511_mode_init_regs(struct sd *sd) {
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
int hsegs, vsegs, packet_size, fps, needed;
int interlaced = 0;
struct usb_host_interface *alt;
struct usb_interface *intf;
intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface);
... | static void ov511_mode_init_regs(struct sd *sd) {
if (!alt) {
return;
}
packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
}
| static void ov511_mode_init_regs(struct sd *sd) {
if (!alt) {
return;
}
if (alt->desc.bNumEndpoints < 1) {
sd->gspca_dev.usb_err = -ENODEV;
return;
}
packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
}
| static void ov511_mode_init_regs(struct sd *sd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!alt) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return;
}
packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static void ov511_mode_init_regs(struct sd *sd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!alt) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return;
}
if (alt->desc.bNumEndpoints < 1) {
sd->gspca_dev.usb_err = -ENODEV;
return;
}
packet_size = le16_to_cpu(... | static void ov511_mode_init_regs(struct sd *sd) {
if (!alt) {
return;
}
+ if (alt->desc.bNumEndpoints < 1) {
+ sd->gspca_dev.usb_err = -ENODEV;
+ return;
+ }
packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
} |
CVE-2020-11608 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/usb/gspca/ov519.c | ov518_mode_init_regs | static void ov518_mode_init_regs(struct sd *sd) {
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
int hsegs, vsegs, packet_size;
struct usb_host_interface *alt;
struct usb_interface *intf;
intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface);
alt = usb_altnum_to_altsetting(intf, ... | static void ov518_mode_init_regs(struct sd *sd) {
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
int hsegs, vsegs, packet_size;
struct usb_host_interface *alt;
struct usb_interface *intf;
intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface);
alt = usb_altnum_to_altsetting(intf, ... | static void ov518_mode_init_regs(struct sd *sd) {
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
int hsegs, vsegs, packet_size;
struct usb_host_interface *alt;
struct usb_interface *intf;
intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface);
alt = usb_altnum_to_altsetting(intf, ... | static void ov518_mode_init_regs(struct sd *sd) {
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
int hsegs, vsegs, packet_size;
struct usb_host_interface *alt;
struct usb_interface *intf;
intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface);
alt = usb_altnum_to_altsetting(intf, ... | static void ov518_mode_init_regs(struct sd *sd) {
if (!alt) {
return;
}
packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
}
| static void ov518_mode_init_regs(struct sd *sd) {
if (!alt) {
return;
}
if (alt->desc.bNumEndpoints < 1) {
sd->gspca_dev.usb_err = -ENODEV;
return;
}
packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
}
| static void ov518_mode_init_regs(struct sd *sd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!alt) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return;
}
packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static void ov518_mode_init_regs(struct sd *sd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!alt) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return;
}
if (alt->desc.bNumEndpoints < 1) {
sd->gspca_dev.usb_err = -ENODEV;
return;
}
packet_size = le16_to_cpu(... | static void ov518_mode_init_regs(struct sd *sd) {
if (!alt) {
return;
}
+ if (alt->desc.bNumEndpoints < 1) {
+ sd->gspca_dev.usb_err = -ENODEV;
+ return;
+ }
packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
} |
CVE-2020-11609 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/usb/gspca/stv06xx/stv06xx.c | stv06xx_isoc_init | static int stv06xx_isoc_init(struct gspca_dev *gspca_dev) {
struct usb_host_interface *alt;
struct sd *sd = (struct sd *) gspca_dev;
alt = &gspca_dev->dev->actconfig->intf_cache[0]->altsetting[1];
alt->endpoint[0].desc.wMaxPacketSize = cpu_to_le16(sd->sensor->max_packet_size[gspca_dev->curr_mode]);
... | static int stv06xx_isoc_init(struct gspca_dev *gspca_dev) {
struct usb_interface_cache *intfc;
struct usb_host_interface *alt;
struct sd *sd = (struct sd *) gspca_dev;
intfc = gspca_dev->dev->actconfig->intf_cache[0];
if (intfc->num_altsetting < 2) {
return -ENODEV;
}
alt = &intfc->a... | static int stv06xx_isoc_init(struct gspca_dev *gspca_dev) {
struct usb_host_interface *alt;
struct sd *sd = (struct sd *) gspca_dev;
alt = &gspca_dev->dev->actconfig->intf_cache[0]->altsetting[1];
alt->endpoint[0].desc.wMaxPacketSize = cpu_to_le16(sd->sensor->max_packet_size[gspca_dev->curr_mode]);
... | static int stv06xx_isoc_init(struct gspca_dev *gspca_dev) {
struct usb_interface_cache *intfc;
struct usb_host_interface *alt;
struct sd *sd = (struct sd *) gspca_dev;
intfc = gspca_dev->dev->actconfig->intf_cache[0];
if (intfc->num_altsetting < 2) {
return -ENODEV;
}
alt = &intfc->a... | static int stv06xx_isoc_init(struct gspca_dev *gspca_dev) {
struct usb_host_interface *alt;
struct sd *sd = (struct sd *) gspca_dev;
alt = &gspca_dev->dev->actconfig->intf_cache[0]->altsetting[1];
alt->endpoint[0].desc.wMaxPacketSize = cpu_to_le16(sd->sensor->max_packet_size[gspca_dev->curr_mode]);
... | static int stv06xx_isoc_init(struct gspca_dev *gspca_dev) {
struct usb_interface_cache *intfc;
struct usb_host_interface *alt;
struct sd *sd = (struct sd *) gspca_dev;
intfc = gspca_dev->dev->actconfig->intf_cache[0];
if (intfc->num_altsetting < 2) {
return -ENODEV;
}
alt = &intfc->a... | static int stv06xx_isoc_init(struct gspca_dev *gspca_dev) {
struct usb_host_interface *alt;
struct sd *sd = (struct sd *) gspca_dev;
alt = &gspca_dev->dev->actconfig->intf_cache[0]->altsetting[1];
alt->endpoint[0].desc.wMaxPacketSize = cpu_to_le16(sd->sensor->max_packet_size[gspca_dev->curr_mode]);
... | static int stv06xx_isoc_init(struct gspca_dev *gspca_dev) {
struct usb_interface_cache *intfc;
struct usb_host_interface *alt;
struct sd *sd = (struct sd *) gspca_dev;
intfc = gspca_dev->dev->actconfig->intf_cache[0];
if (intfc->num_altsetting < 2) {
return -ENODEV;
}
alt = &intfc->a... | static int stv06xx_isoc_init(struct gspca_dev *gspca_dev) {
+ struct usb_interface_cache *intfc;
struct usb_host_interface *alt;
struct sd *sd = (struct sd *) gspca_dev;
- alt = &gspca_dev->dev->actconfig->intf_cache[0]->altsetting[1];
+ intfc = gspca_dev->dev->actconfig->intf_cache[0];
+ if (int... |
CVE-2020-11609 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/usb/gspca/stv06xx/stv06xx.c | stv06xx_start | static int stv06xx_start(struct gspca_dev *gspca_dev) {
struct sd *sd = (struct sd *) gspca_dev;
struct usb_host_interface *alt;
struct usb_interface *intf;
int err, packet_size;
intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface);
alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.al... | static int stv06xx_start(struct gspca_dev *gspca_dev) {
struct sd *sd = (struct sd *) gspca_dev;
struct usb_host_interface *alt;
struct usb_interface *intf;
int err, packet_size;
intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface);
alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.al... | static int stv06xx_start(struct gspca_dev *gspca_dev) {
struct sd *sd = (struct sd *) gspca_dev;
struct usb_host_interface *alt;
struct usb_interface *intf;
int err, packet_size;
intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface);
alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.al... | static int stv06xx_start(struct gspca_dev *gspca_dev) {
struct sd *sd = (struct sd *) gspca_dev;
struct usb_host_interface *alt;
struct usb_interface *intf;
int err, packet_size;
intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface);
alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.al... | static int stv06xx_start(struct gspca_dev *gspca_dev) {
if (!alt) {
return -EIO;
}
packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
}
| static int stv06xx_start(struct gspca_dev *gspca_dev) {
if (!alt) {
return -EIO;
}
if (alt->desc.bNumEndpoints < 1) {
return -ENODEV;
}
packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
}
| static int stv06xx_start(struct gspca_dev *gspca_dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!alt) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return -EIO;
}
packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static int stv06xx_start(struct gspca_dev *gspca_dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!alt) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return -EIO;
}
if (alt->desc.bNumEndpoints < 1) {
return -ENODEV;
}
packet_size = le16_to_cpu(alt->endpoint[0].desc.... | static int stv06xx_start(struct gspca_dev *gspca_dev) {
if (!alt) {
return -EIO;
}
+ if (alt->desc.bNumEndpoints < 1) {
+ return -ENODEV;
+ }
packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
} |
CVE-2020-11609 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c | pb0100_start | static int pb0100_start(struct sd *sd) {
int err, packet_size, max_packet_size;
struct usb_host_interface *alt;
struct usb_interface *intf;
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
struct cam *cam = &sd->gspca_dev.cam;
u32 mode = cam->cam_mode[sd->gspca_dev.curr_mode].priv;
intf... | static int pb0100_start(struct sd *sd) {
int err, packet_size, max_packet_size;
struct usb_host_interface *alt;
struct usb_interface *intf;
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
struct cam *cam = &sd->gspca_dev.cam;
u32 mode = cam->cam_mode[sd->gspca_dev.curr_mode].priv;
intf... | static int pb0100_start(struct sd *sd) {
int err, packet_size, max_packet_size;
struct usb_host_interface *alt;
struct usb_interface *intf;
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
struct cam *cam = &sd->gspca_dev.cam;
u32 mode = cam->cam_mode[sd->gspca_dev.curr_mode].priv;
intf... | static int pb0100_start(struct sd *sd) {
int err, packet_size, max_packet_size;
struct usb_host_interface *alt;
struct usb_interface *intf;
struct gspca_dev *gspca_dev = (struct gspca_dev *)sd;
struct cam *cam = &sd->gspca_dev.cam;
u32 mode = cam->cam_mode[sd->gspca_dev.curr_mode].priv;
intf... | static int pb0100_start(struct sd *sd) {
if (!alt) {
return -ENODEV;
}
packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
}
| static int pb0100_start(struct sd *sd) {
if (!alt) {
return -ENODEV;
}
if (alt->desc.bNumEndpoints < 1) {
return -ENODEV;
}
packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
}
| static int pb0100_start(struct sd *sd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!alt) {
return -ENODEV;
}
packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static int pb0100_start(struct sd *sd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!alt) {
return -ENODEV;
}
if (alt->desc.bNumEndpoints < 1) {
return -ENODEV;
}
packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
/* PLACEHOLDER: DO NOT DELETE THIS COMMEN... | static int pb0100_start(struct sd *sd) {
if (!alt) {
return -ENODEV;
}
+ if (alt->desc.bNumEndpoints < 1) {
+ return -ENODEV;
+ }
packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
} |
CVE-2020-11668 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/usb/gspca/xirlink_cit.c | cit_get_packet_size | static int cit_get_packet_size(struct gspca_dev *gspca_dev) {
struct usb_host_interface *alt;
struct usb_interface *intf;
intf = usb_ifnum_to_if(gspca_dev->dev, gspca_dev->iface);
alt = usb_altnum_to_altsetting(intf, gspca_dev->alt);
if (!alt) {
pr_err("Couldn't get altsetting\n");
r... | static int cit_get_packet_size(struct gspca_dev *gspca_dev) {
struct usb_host_interface *alt;
struct usb_interface *intf;
intf = usb_ifnum_to_if(gspca_dev->dev, gspca_dev->iface);
alt = usb_altnum_to_altsetting(intf, gspca_dev->alt);
if (!alt) {
pr_err("Couldn't get altsetting\n");
r... | static int cit_get_packet_size(struct gspca_dev *gspca_dev) {
struct usb_host_interface *alt;
struct usb_interface *intf;
intf = usb_ifnum_to_if(gspca_dev->dev, gspca_dev->iface);
alt = usb_altnum_to_altsetting(intf, gspca_dev->alt);
if (!alt) {
pr_err("Couldn't get altsetting\n");
r... | static int cit_get_packet_size(struct gspca_dev *gspca_dev) {
struct usb_host_interface *alt;
struct usb_interface *intf;
intf = usb_ifnum_to_if(gspca_dev->dev, gspca_dev->iface);
alt = usb_altnum_to_altsetting(intf, gspca_dev->alt);
if (!alt) {
pr_err("Couldn't get altsetting\n");
r... | static int cit_get_packet_size(struct gspca_dev *gspca_dev) {
if (!alt) {
return -EIO;
}
return le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
}
| static int cit_get_packet_size(struct gspca_dev *gspca_dev) {
if (!alt) {
return -EIO;
}
if (alt->desc.bNumEndpoints < 1) {
return -ENODEV;
}
return le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
}
| static int cit_get_packet_size(struct gspca_dev *gspca_dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!alt) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return -EIO;
}
return le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
}
| static int cit_get_packet_size(struct gspca_dev *gspca_dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!alt) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return -EIO;
}
if (alt->desc.bNumEndpoints < 1) {
return -ENODEV;
}
return le16_to_cpu(alt->endpoint[0].desc.w... | static int cit_get_packet_size(struct gspca_dev *gspca_dev) {
if (!alt) {
return -EIO;
}
+ if (alt->desc.bNumEndpoints < 1) {
+ return -ENODEV;
+ }
return le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize);
} |
CVE-2020-11668 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/usb/gspca/xirlink_cit.c | sd_isoc_init | static int sd_isoc_init(struct gspca_dev *gspca_dev) {
struct usb_host_interface *alt;
int max_packet_size;
switch (gspca_dev->pixfmt.width) {
case 160:
max_packet_size = 450;
break;
case 176:
max_packet_size = 600;
break;
default:
max_packet_size = 1022;
... | static int sd_isoc_init(struct gspca_dev *gspca_dev) {
struct usb_interface_cache *intfc;
struct usb_host_interface *alt;
int max_packet_size;
switch (gspca_dev->pixfmt.width) {
case 160:
max_packet_size = 450;
break;
case 176:
max_packet_size = 600;
break;
de... | static int sd_isoc_init(struct gspca_dev *gspca_dev) {
struct usb_host_interface *alt;
int max_packet_size;
switch (gspca_dev->pixfmt.width) {
case 160:
max_packet_size = 450;
break;
case 176:
max_packet_size = 600;
break;
default:
max_packet_size = 1022;
... | static int sd_isoc_init(struct gspca_dev *gspca_dev) {
struct usb_interface_cache *intfc;
struct usb_host_interface *alt;
int max_packet_size;
switch (gspca_dev->pixfmt.width) {
case 160:
max_packet_size = 450;
break;
case 176:
max_packet_size = 600;
break;
de... | static int sd_isoc_init(struct gspca_dev *gspca_dev) {
struct usb_host_interface *alt;
switch (gspca_dev->pixfmt.width) {
case 160:
max_packet_size = 450;
break;
case 176:
max_packet_size = 600;
break;
default:
max_packet_size = 1022;
break;
}
... | static int sd_isoc_init(struct gspca_dev *gspca_dev) {
struct usb_interface_cache *intfc;
struct usb_host_interface *alt;
switch (gspca_dev->pixfmt.width) {
case 160:
max_packet_size = 450;
break;
case 176:
max_packet_size = 600;
break;
default:
max_packet... | static int sd_isoc_init(struct gspca_dev *gspca_dev) {
struct usb_host_interface *alt;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (gspca_dev->pixfmt.width) {
case 160:
max_packet_size = 450;
break;
case 176:
max_packet_size = 600;
break;
default:
... | static int sd_isoc_init(struct gspca_dev *gspca_dev) {
struct usb_interface_cache *intfc;
struct usb_host_interface *alt;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (gspca_dev->pixfmt.width) {
case 160:
max_packet_size = 450;
break;
case 176:
max_packet_size = 6... | static int sd_isoc_init(struct gspca_dev *gspca_dev) {
+ struct usb_interface_cache *intfc;
struct usb_host_interface *alt;
switch (gspca_dev->pixfmt.width) {
case 160:
max_packet_size = 450;
break;
case 176:
max_packet_size = 600;
break;
default:
... |
CVE-2020-11884 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/s390/lib/uaccess.c | enable_sacf_uaccess | mm_segment_t enable_sacf_uaccess(void) {
mm_segment_t old_fs;
unsigned long asce, cr;
old_fs = current->thread.mm_segment;
if (old_fs & 1) {
return old_fs;
}
current->thread.mm_segment |= 1;
asce = S390_lowcore.kernel_asce;
if (likely(old_fs == USER_DS)) {
__ctl_store(cr,... | mm_segment_t enable_sacf_uaccess(void) {
mm_segment_t old_fs;
unsigned long asce, cr;
unsigned long flags;
old_fs = current->thread.mm_segment;
if (old_fs & 1) {
return old_fs;
}
local_irq_save(flags);
current->thread.mm_segment |= 1;
asce = S390_lowcore.kernel_asce;
if (... | mm_segment_t enable_sacf_uaccess(void) {
mm_segment_t old_fs;
unsigned long asce, cr;
old_fs = current->thread.mm_segment;
if (old_fs & 1) {
return old_fs;
}
current->thread.mm_segment |= 1;
asce = S390_lowcore.kernel_asce;
if (likely(old_fs == USER_DS)) {
__ctl_store(cr,... | mm_segment_t enable_sacf_uaccess(void) {
mm_segment_t old_fs;
unsigned long asce, cr;
unsigned long flags;
old_fs = current->thread.mm_segment;
if (old_fs & 1) {
return old_fs;
}
local_irq_save(flags);
current->thread.mm_segment |= 1;
asce = S390_lowcore.kernel_asce;
if (... | mm_segment_t enable_sacf_uaccess(void) {
unsigned long asce, cr;
old_fs = current->thread.mm_segment;
if (old_fs & 1) {
return old_fs;
}
current->thread.mm_segment |= 1;
if (cr != asce) {
set_cpu_flag(CIF_ASCE_SECONDARY);
}
return old_fs;
}
| mm_segment_t enable_sacf_uaccess(void) {
unsigned long asce, cr;
unsigned long flags;
old_fs = current->thread.mm_segment;
if (old_fs & 1) {
return old_fs;
}
local_irq_save(flags);
current->thread.mm_segment |= 1;
if (cr != asce) {
set_cpu_flag(CIF_ASCE_SECONDARY);
}
... | mm_segment_t enable_sacf_uaccess(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned long asce, cr;
old_fs = current->thread.mm_segment;
if (old_fs & 1) {
return old_fs;
}
current->thread.mm_segment |= 1;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (cr != asce) {
... | mm_segment_t enable_sacf_uaccess(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned long asce, cr;
unsigned long flags;
old_fs = current->thread.mm_segment;
if (old_fs & 1) {
return old_fs;
}
local_irq_save(flags);
current->thread.mm_segment |= 1;
/* PLACEHOLDER: ... | mm_segment_t enable_sacf_uaccess(void) {
unsigned long asce, cr;
+ unsigned long flags;
old_fs = current->thread.mm_segment;
if (old_fs & 1) {
return old_fs;
}
+ local_irq_save(flags);
current->thread.mm_segment |= 1;
if (cr != asce) {
set_cpu_flag(CIF_ASCE_SECONDA... |
CVE-2020-11884 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/s390/mm/pgalloc.c | __crst_table_upgrade | static void __crst_table_upgrade(void *arg) {
struct mm_struct *mm = arg;
if (current->active_mm == mm) {
set_user_asce(mm);
}
__tlb_flush_local();
} | static void __crst_table_upgrade(void *arg) {
struct mm_struct *mm = arg;
if (current->active_mm == mm) {
S390_lowcore.user_asce = mm->context.asce;
if (current->thread.mm_segment == USER_DS) {
__ctl_load(S390_lowcore.user_asce, 1, 1);
clear_cpu_flag(CIF_ASCE_PRIMARY);
... | static void __crst_table_upgrade(void *arg) {
struct mm_struct *mm = arg;
if (current->active_mm == mm) {
set_user_asce(mm);
}
__tlb_flush_local();
} | static void __crst_table_upgrade(void *arg) {
struct mm_struct *mm = arg;
if (current->active_mm == mm) {
S390_lowcore.user_asce = mm->context.asce;
if (current->thread.mm_segment == USER_DS) {
__ctl_load(S390_lowcore.user_asce, 1, 1);
clear_cpu_flag(CIF_ASCE_PRIMARY);
... | static void __crst_table_upgrade(void *arg) {
struct mm_struct *mm = arg;
if (current->active_mm == mm) {
set_user_asce(mm);
}
__tlb_flush_local();
}
| static void __crst_table_upgrade(void *arg) {
struct mm_struct *mm = arg;
if (current->active_mm == mm) {
S390_lowcore.user_asce = mm->context.asce;
if (current->thread.mm_segment == USER_DS) {
__ctl_load(S390_lowcore.user_asce, 1, 1);
clear_cpu_flag(CIF_ASCE_PRIMARY);
... | static void __crst_table_upgrade(void *arg) {
struct mm_struct *mm = arg;
if (current->active_mm == mm) {
set_user_asce(mm);
}
__tlb_flush_local();
}
| static void __crst_table_upgrade(void *arg) {
struct mm_struct *mm = arg;
if (current->active_mm == mm) {
S390_lowcore.user_asce = mm->context.asce;
if (current->thread.mm_segment == USER_DS) {
__ctl_load(S390_lowcore.user_asce, 1, 1);
clear_cpu_flag(CIF_ASCE_PRIMARY);
... | static void __crst_table_upgrade(void *arg) {
struct mm_struct *mm = arg;
if (current->active_mm == mm) {
- set_user_asce(mm);
+ S390_lowcore.user_asce = mm->context.asce;
+ if (current->thread.mm_segment == USER_DS) {
+ __ctl_load(S390_lowcore.user_asce, 1, 1);
+ c... |
CVE-2020-12351 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | l2cap_data_rcv | static int l2cap_data_rcv(struct l2cap_chan *chan, struct sk_buff *skb) {
struct l2cap_ctrl *control = &bt_cb(skb)->l2cap;
u16 len;
u8 event;
__unpack_control(chan, skb);
len = skb->len;
if (l2cap_check_fcs(chan, skb)) {
goto drop;
}
if (!control->sframe && control->sar == L2CAP_... | static int l2cap_data_rcv(struct l2cap_chan *chan, struct sk_buff *skb) {
struct l2cap_ctrl *control = &bt_cb(skb)->l2cap;
u16 len;
u8 event;
__unpack_control(chan, skb);
len = skb->len;
if (l2cap_check_fcs(chan, skb)) {
goto drop;
}
if (!control->sframe && control->sar == L2CAP_... | static int l2cap_data_rcv(struct l2cap_chan *chan, struct sk_buff *skb) {
struct l2cap_ctrl *control = &bt_cb(skb)->l2cap;
u16 len;
u8 event;
__unpack_control(chan, skb);
len = skb->len;
if (l2cap_check_fcs(chan, skb)) {
goto drop;
}
if (!control->sframe && control->sar == L2CAP_... | static int l2cap_data_rcv(struct l2cap_chan *chan, struct sk_buff *skb) {
struct l2cap_ctrl *control = &bt_cb(skb)->l2cap;
u16 len;
u8 event;
__unpack_control(chan, skb);
len = skb->len;
if (l2cap_check_fcs(chan, skb)) {
goto drop;
}
if (!control->sframe && control->sar == L2CAP_... | static int l2cap_data_rcv(struct l2cap_chan *chan, struct sk_buff *skb) {
struct l2cap_ctrl *control = &bt_cb(skb)->l2cap;
__unpack_control(chan, skb);
if (l2cap_check_fcs(chan, skb)) {
goto drop;
}
if (len > chan->mps) {
goto drop;
}
if ((chan->mode == L2CAP_MODE_ERTM || cha... | static int l2cap_data_rcv(struct l2cap_chan *chan, struct sk_buff *skb) {
struct l2cap_ctrl *control = &bt_cb(skb)->l2cap;
__unpack_control(chan, skb);
if (l2cap_check_fcs(chan, skb)) {
goto drop;
}
if (len > chan->mps) {
goto drop;
}
if (chan->ops->filter) {
if (chan... | static int l2cap_data_rcv(struct l2cap_chan *chan, struct sk_buff *skb) {
struct l2cap_ctrl *control = &bt_cb(skb)->l2cap;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
__unpack_control(chan, skb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (l2cap_check_fcs(chan, skb)) {
goto drop;
... | static int l2cap_data_rcv(struct l2cap_chan *chan, struct sk_buff *skb) {
struct l2cap_ctrl *control = &bt_cb(skb)->l2cap;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
__unpack_control(chan, skb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (l2cap_check_fcs(chan, skb)) {
goto drop;
... | static int l2cap_data_rcv(struct l2cap_chan *chan, struct sk_buff *skb) {
struct l2cap_ctrl *control = &bt_cb(skb)->l2cap;
__unpack_control(chan, skb);
if (l2cap_check_fcs(chan, skb)) {
goto drop;
}
if (len > chan->mps) {
goto drop;
}
- if ((chan->mode == L2CAP_MODE_E... |
CVE-2020-12352 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/a2mp.c | a2mp_chan_recv_cb | static int a2mp_chan_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb) {
struct a2mp_cmd *hdr;
struct amp_mgr *mgr = chan->data;
int err = 0;
amp_mgr_get(mgr);
while (skb->len >= sizeof(*hdr)) {
u16 len;
hdr = (void *) skb->data;
len = le16_to_cpu(hdr->len);
BT_DB... | static int a2mp_chan_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb) {
struct a2mp_cmd *hdr;
struct amp_mgr *mgr = chan->data;
int err = 0;
amp_mgr_get(mgr);
while (skb->len >= sizeof(*hdr)) {
u16 len;
hdr = (void *) skb->data;
len = le16_to_cpu(hdr->len);
BT_DB... | static int a2mp_chan_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb) {
struct a2mp_cmd *hdr;
struct amp_mgr *mgr = chan->data;
int err = 0;
amp_mgr_get(mgr);
while (skb->len >= sizeof(*hdr)) {
u16 len;
hdr = (void *) skb->data;
len = le16_to_cpu(hdr->len);
BT_DB... | static int a2mp_chan_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb) {
struct a2mp_cmd *hdr;
struct amp_mgr *mgr = chan->data;
int err = 0;
amp_mgr_get(mgr);
while (skb->len >= sizeof(*hdr)) {
u16 len;
hdr = (void *) skb->data;
len = le16_to_cpu(hdr->len);
BT_DB... | static int a2mp_chan_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb) {
if (err) {
struct a2mp_cmd_rej rej;
rej.reason = cpu_to_le16(0);
}
}
| static int a2mp_chan_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb) {
if (err) {
struct a2mp_cmd_rej rej;
memset(&rej, 0, sizeof(rej));
rej.reason = cpu_to_le16(0);
}
}
| static int a2mp_chan_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (err) {
struct a2mp_cmd_rej rej;
rej.reason = cpu_to_le16(0);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static int a2mp_chan_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (err) {
struct a2mp_cmd_rej rej;
memset(&rej, 0, sizeof(rej));
rej.reason = cpu_to_le16(0);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
/* PLACEHO... | static int a2mp_chan_recv_cb(struct l2cap_chan *chan, struct sk_buff *skb) {
if (err) {
struct a2mp_cmd_rej rej;
+ memset(&rej, 0, sizeof(rej));
rej.reason = cpu_to_le16(0);
}
} |
CVE-2020-12352 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/a2mp.c | a2mp_createphyslink_req | static int a2mp_createphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
struct a2mp_physlink_req *req = (void *) skb->data;
struct a2mp_physlink_rsp rsp;
struct hci_dev *hdev;
struct hci_conn *hcon;
struct amp_ctrl *ctrl;
if (le16_to_cpu(hdr->len) < sizeof(*req)) {
... | static int a2mp_createphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
struct a2mp_physlink_req *req = (void *) skb->data;
struct a2mp_physlink_rsp rsp;
struct hci_dev *hdev;
struct hci_conn *hcon;
struct amp_ctrl *ctrl;
if (le16_to_cpu(hdr->len) < sizeof(*req)) {
... | static int a2mp_createphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
struct a2mp_physlink_req *req = (void *) skb->data;
struct a2mp_physlink_rsp rsp;
struct hci_dev *hdev;
struct hci_conn *hcon;
struct amp_ctrl *ctrl;
if (le16_to_cpu(hdr->len) < sizeof(*req)) {
... | static int a2mp_createphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
struct a2mp_physlink_req *req = (void *) skb->data;
struct a2mp_physlink_rsp rsp;
struct hci_dev *hdev;
struct hci_conn *hcon;
struct amp_ctrl *ctrl;
if (le16_to_cpu(hdr->len) < sizeof(*req)) {
... | static int a2mp_createphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
BT_DBG("local_id %d, remote_id %d", req->local_id, req->remote_id);
rsp.local_id = req->remote_id;
}
| static int a2mp_createphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
BT_DBG("local_id %d, remote_id %d", req->local_id, req->remote_id);
memset(&rsp, 0, sizeof(rsp));
rsp.local_id = req->remote_id;
}
| static int a2mp_createphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("local_id %d, remote_id %d", req->local_id, req->remote_id);
rsp.local_id = req->remote_id;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static int a2mp_createphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("local_id %d, remote_id %d", req->local_id, req->remote_id);
memset(&rsp, 0, sizeof(rsp));
rsp.local_id = req->remote_id;
/* PLACEHOLDER: DO NOT D... | static int a2mp_createphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
BT_DBG("local_id %d, remote_id %d", req->local_id, req->remote_id);
+ memset(&rsp, 0, sizeof(rsp));
rsp.local_id = req->remote_id;
} |
CVE-2020-12352 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/a2mp.c | a2mp_discover_amp | void a2mp_discover_amp(struct l2cap_chan *chan) {
struct l2cap_conn *conn = chan->conn;
struct amp_mgr *mgr = conn->hcon->amp_mgr;
struct a2mp_discov_req req;
BT_DBG("chan %p conn %p mgr %p", chan, conn, mgr);
if (!mgr) {
mgr = amp_mgr_create(conn, true);
if (!mgr) {
retu... | void a2mp_discover_amp(struct l2cap_chan *chan) {
struct l2cap_conn *conn = chan->conn;
struct amp_mgr *mgr = conn->hcon->amp_mgr;
struct a2mp_discov_req req;
BT_DBG("chan %p conn %p mgr %p", chan, conn, mgr);
if (!mgr) {
mgr = amp_mgr_create(conn, true);
if (!mgr) {
retu... | void a2mp_discover_amp(struct l2cap_chan *chan) {
struct l2cap_conn *conn = chan->conn;
struct amp_mgr *mgr = conn->hcon->amp_mgr;
struct a2mp_discov_req req;
BT_DBG("chan %p conn %p mgr %p", chan, conn, mgr);
if (!mgr) {
mgr = amp_mgr_create(conn, true);
if (!mgr) {
retu... | void a2mp_discover_amp(struct l2cap_chan *chan) {
struct l2cap_conn *conn = chan->conn;
struct amp_mgr *mgr = conn->hcon->amp_mgr;
struct a2mp_discov_req req;
BT_DBG("chan %p conn %p mgr %p", chan, conn, mgr);
if (!mgr) {
mgr = amp_mgr_create(conn, true);
if (!mgr) {
retu... | void a2mp_discover_amp(struct l2cap_chan *chan) {
mgr->bredr_chan = chan;
req.mtu = cpu_to_le16(L2CAP_A2MP_DEFAULT_MTU);
}
| void a2mp_discover_amp(struct l2cap_chan *chan) {
mgr->bredr_chan = chan;
memset(&req, 0, sizeof(req));
req.mtu = cpu_to_le16(L2CAP_A2MP_DEFAULT_MTU);
}
| void a2mp_discover_amp(struct l2cap_chan *chan) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
mgr->bredr_chan = chan;
req.mtu = cpu_to_le16(L2CAP_A2MP_DEFAULT_MTU);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| void a2mp_discover_amp(struct l2cap_chan *chan) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
mgr->bredr_chan = chan;
memset(&req, 0, sizeof(req));
req.mtu = cpu_to_le16(L2CAP_A2MP_DEFAULT_MTU);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | void a2mp_discover_amp(struct l2cap_chan *chan) {
mgr->bredr_chan = chan;
+ memset(&req, 0, sizeof(req));
req.mtu = cpu_to_le16(L2CAP_A2MP_DEFAULT_MTU);
} |
CVE-2020-12352 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/a2mp.c | a2mp_discover_rsp | static int a2mp_discover_rsp(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
struct a2mp_discov_rsp *rsp = (void *) skb->data;
u16 len = le16_to_cpu(hdr->len);
struct a2mp_cl *cl;
u16 ext_feat;
bool found = false;
if (len < sizeof(*rsp)) {
return -EVAL;
}
len -=... | static int a2mp_discover_rsp(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
struct a2mp_discov_rsp *rsp = (void *) skb->data;
u16 len = le16_to_cpu(hdr->len);
struct a2mp_cl *cl;
u16 ext_feat;
bool found = false;
if (len < sizeof(*rsp)) {
return -EVAL;
}
len -=... | static int a2mp_discover_rsp(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
struct a2mp_discov_rsp *rsp = (void *) skb->data;
u16 len = le16_to_cpu(hdr->len);
struct a2mp_cl *cl;
u16 ext_feat;
bool found = false;
if (len < sizeof(*rsp)) {
return -EVAL;
}
len -=... | static int a2mp_discover_rsp(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
struct a2mp_discov_rsp *rsp = (void *) skb->data;
u16 len = le16_to_cpu(hdr->len);
struct a2mp_cl *cl;
u16 ext_feat;
bool found = false;
if (len < sizeof(*rsp)) {
return -EVAL;
}
len -=... | static int a2mp_discover_rsp(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
while (len >= sizeof(*cl)) {
BT_DBG("Remote AMP id %d type %d status %d", cl->id, cl->type, cl->status);
if (cl->id != AMP_ID_BREDR && cl->type != AMP_TYPE_BREDR) {
struct a2mp_info_req req;
... | static int a2mp_discover_rsp(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
while (len >= sizeof(*cl)) {
BT_DBG("Remote AMP id %d type %d status %d", cl->id, cl->type, cl->status);
if (cl->id != AMP_ID_BREDR && cl->type != AMP_TYPE_BREDR) {
struct a2mp_info_req req;
... | static int a2mp_discover_rsp(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (len >= sizeof(*cl)) {
BT_DBG("Remote AMP id %d type %d status %d", cl->id, cl->type, cl->status);
if (cl->id != AMP_ID_BREDR && cl->type != AMP_TYPE... | static int a2mp_discover_rsp(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (len >= sizeof(*cl)) {
BT_DBG("Remote AMP id %d type %d status %d", cl->id, cl->type, cl->status);
if (cl->id != AMP_ID_BREDR && cl->type != AMP_TYPE... | static int a2mp_discover_rsp(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
while (len >= sizeof(*cl)) {
BT_DBG("Remote AMP id %d type %d status %d", cl->id, cl->type, cl->status);
if (cl->id != AMP_ID_BREDR && cl->type != AMP_TYPE_BREDR) {
struct a2mp_info_req re... |
CVE-2020-12352 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/a2mp.c | a2mp_discphyslink_req | static int a2mp_discphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
struct a2mp_physlink_req *req = (void *) skb->data;
struct a2mp_physlink_rsp rsp;
struct hci_dev *hdev;
struct hci_conn *hcon;
if (le16_to_cpu(hdr->len) < sizeof(*req)) {
return -EVAL;
}
... | static int a2mp_discphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
struct a2mp_physlink_req *req = (void *) skb->data;
struct a2mp_physlink_rsp rsp;
struct hci_dev *hdev;
struct hci_conn *hcon;
if (le16_to_cpu(hdr->len) < sizeof(*req)) {
return -EVAL;
}
... | static int a2mp_discphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
struct a2mp_physlink_req *req = (void *) skb->data;
struct a2mp_physlink_rsp rsp;
struct hci_dev *hdev;
struct hci_conn *hcon;
if (le16_to_cpu(hdr->len) < sizeof(*req)) {
return -EVAL;
}
... | static int a2mp_discphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
struct a2mp_physlink_req *req = (void *) skb->data;
struct a2mp_physlink_rsp rsp;
struct hci_dev *hdev;
struct hci_conn *hcon;
if (le16_to_cpu(hdr->len) < sizeof(*req)) {
return -EVAL;
}
... | static int a2mp_discphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
BT_DBG("local_id %d remote_id %d", req->local_id, req->remote_id);
rsp.local_id = req->remote_id;
}
| static int a2mp_discphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
BT_DBG("local_id %d remote_id %d", req->local_id, req->remote_id);
memset(&rsp, 0, sizeof(rsp));
rsp.local_id = req->remote_id;
}
| static int a2mp_discphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("local_id %d remote_id %d", req->local_id, req->remote_id);
rsp.local_id = req->remote_id;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static int a2mp_discphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("local_id %d remote_id %d", req->local_id, req->remote_id);
memset(&rsp, 0, sizeof(rsp));
rsp.local_id = req->remote_id;
/* PLACEHOLDER: DO NOT DELE... | static int a2mp_discphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
BT_DBG("local_id %d remote_id %d", req->local_id, req->remote_id);
+ memset(&rsp, 0, sizeof(rsp));
rsp.local_id = req->remote_id;
} |
CVE-2020-12352 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/a2mp.c | a2mp_getampassoc_req | static int a2mp_getampassoc_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
struct a2mp_amp_assoc_req *req = (void *) skb->data;
struct hci_dev *hdev;
struct amp_mgr *tmp;
if (le16_to_cpu(hdr->len) < sizeof(*req)) {
return -EVAL;
}
BT_DBG("id %d", req->id);
tmp ... | static int a2mp_getampassoc_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
struct a2mp_amp_assoc_req *req = (void *) skb->data;
struct hci_dev *hdev;
struct amp_mgr *tmp;
if (le16_to_cpu(hdr->len) < sizeof(*req)) {
return -EVAL;
}
BT_DBG("id %d", req->id);
tmp ... | static int a2mp_getampassoc_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
struct a2mp_amp_assoc_req *req = (void *) skb->data;
struct hci_dev *hdev;
struct amp_mgr *tmp;
if (le16_to_cpu(hdr->len) < sizeof(*req)) {
return -EVAL;
}
BT_DBG("id %d", req->id);
tmp ... | static int a2mp_getampassoc_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
struct a2mp_amp_assoc_req *req = (void *) skb->data;
struct hci_dev *hdev;
struct amp_mgr *tmp;
if (le16_to_cpu(hdr->len) < sizeof(*req)) {
return -EVAL;
}
BT_DBG("id %d", req->id);
tmp ... | static int a2mp_getampassoc_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
if (!hdev || hdev->amp_type == AMP_TYPE_BREDR || tmp) {
rsp.id = req->id;
if (tmp) {
} else {
}
goto done;
}
done:
if (hdev) {
hci_dev_put(hdev);
}
}
| static int a2mp_getampassoc_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
if (!hdev || hdev->amp_type == AMP_TYPE_BREDR || tmp) {
rsp.id = req->id;
memset(&rsp, 0, sizeof(rsp));
if (tmp) {
} else {
}
goto done;
}
done:
if (hdev) {
... | static int a2mp_getampassoc_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!hdev || hdev->amp_type == AMP_TYPE_BREDR || tmp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
rsp.id = req->id;
if (tmp) {
/* PLACEHOLDE... | static int a2mp_getampassoc_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!hdev || hdev->amp_type == AMP_TYPE_BREDR || tmp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
rsp.id = req->id;
memset(&rsp, 0, sizeof(rsp))... | static int a2mp_getampassoc_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
if (!hdev || hdev->amp_type == AMP_TYPE_BREDR || tmp) {
rsp.id = req->id;
+ memset(&rsp, 0, sizeof(rsp));
if (tmp) {
} else {
}
goto done;
}
done:
if (hd... |
CVE-2020-12352 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/a2mp.c | a2mp_getinfo_req | static int a2mp_getinfo_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
struct a2mp_info_req *req = (void *) skb->data;
struct hci_dev *hdev;
struct hci_request hreq;
int err = 0;
if (le16_to_cpu(hdr->len) < sizeof(*req)) {
return -EVAL;
}
BT_DBG("id %d", req->i... | static int a2mp_getinfo_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
struct a2mp_info_req *req = (void *) skb->data;
struct hci_dev *hdev;
struct hci_request hreq;
int err = 0;
if (le16_to_cpu(hdr->len) < sizeof(*req)) {
return -EVAL;
}
BT_DBG("id %d", req->i... | static int a2mp_getinfo_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
struct a2mp_info_req *req = (void *) skb->data;
struct hci_dev *hdev;
struct hci_request hreq;
int err = 0;
if (le16_to_cpu(hdr->len) < sizeof(*req)) {
return -EVAL;
}
BT_DBG("id %d", req->i... | static int a2mp_getinfo_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
struct a2mp_info_req *req = (void *) skb->data;
struct hci_dev *hdev;
struct hci_request hreq;
int err = 0;
if (le16_to_cpu(hdr->len) < sizeof(*req)) {
return -EVAL;
}
BT_DBG("id %d", req->i... | static int a2mp_getinfo_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
if (!hdev || hdev->dev_type != HCI_AMP) {
struct a2mp_info_rsp rsp;
rsp.id = req->id;
goto done;
}
done:
if (hdev) {
hci_dev_put(hdev);
}
}
| static int a2mp_getinfo_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
if (!hdev || hdev->dev_type != HCI_AMP) {
struct a2mp_info_rsp rsp;
memset(&rsp, 0, sizeof(rsp));
rsp.id = req->id;
goto done;
}
done:
if (hdev) {
hci_dev_put(hdev);
}
}
| static int a2mp_getinfo_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!hdev || hdev->dev_type != HCI_AMP) {
struct a2mp_info_rsp rsp;
rsp.id = req->id;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
goto done;
... | static int a2mp_getinfo_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!hdev || hdev->dev_type != HCI_AMP) {
struct a2mp_info_rsp rsp;
memset(&rsp, 0, sizeof(rsp));
rsp.id = req->id;
/* PLACEHOLDER: DO NOT DELET... | static int a2mp_getinfo_req(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
if (!hdev || hdev->dev_type != HCI_AMP) {
struct a2mp_info_rsp rsp;
+ memset(&rsp, 0, sizeof(rsp));
rsp.id = req->id;
goto done;
}
done:
if (hdev) {
hci_dev_put(hdev)... |
CVE-2020-12352 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/a2mp.c | a2mp_getinfo_rsp | static int a2mp_getinfo_rsp(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
struct a2mp_info_rsp *rsp = (struct a2mp_info_rsp *) skb->data;
struct a2mp_amp_assoc_req req;
struct amp_ctrl *ctrl;
if (le16_to_cpu(hdr->len) < sizeof(*rsp)) {
return -EVAL;
}
BT_DBG("id %d st... | static int a2mp_getinfo_rsp(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
struct a2mp_info_rsp *rsp = (struct a2mp_info_rsp *) skb->data;
struct a2mp_amp_assoc_req req;
struct amp_ctrl *ctrl;
if (le16_to_cpu(hdr->len) < sizeof(*rsp)) {
return -EVAL;
}
BT_DBG("id %d st... | static int a2mp_getinfo_rsp(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
struct a2mp_info_rsp *rsp = (struct a2mp_info_rsp *) skb->data;
struct a2mp_amp_assoc_req req;
struct amp_ctrl *ctrl;
if (le16_to_cpu(hdr->len) < sizeof(*rsp)) {
return -EVAL;
}
BT_DBG("id %d st... | static int a2mp_getinfo_rsp(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
struct a2mp_info_rsp *rsp = (struct a2mp_info_rsp *) skb->data;
struct a2mp_amp_assoc_req req;
struct amp_ctrl *ctrl;
if (le16_to_cpu(hdr->len) < sizeof(*rsp)) {
return -EVAL;
}
BT_DBG("id %d st... | static int a2mp_getinfo_rsp(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
if (!ctrl) {
return -ENOMEM;
}
req.id = rsp->id;
}
| static int a2mp_getinfo_rsp(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
if (!ctrl) {
return -ENOMEM;
}
memset(&req, 0, sizeof(req));
req.id = rsp->id;
}
| static int a2mp_getinfo_rsp(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!ctrl) {
return -ENOMEM;
}
req.id = rsp->id;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static int a2mp_getinfo_rsp(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!ctrl) {
return -ENOMEM;
}
memset(&req, 0, sizeof(req));
req.id = rsp->id;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | static int a2mp_getinfo_rsp(struct amp_mgr *mgr, struct sk_buff *skb, struct a2mp_cmd *hdr) {
if (!ctrl) {
return -ENOMEM;
}
+ memset(&req, 0, sizeof(req));
req.id = rsp->id;
} |
CVE-2020-12352 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/a2mp.c | a2mp_send_create_phy_link_rsp | void a2mp_send_create_phy_link_rsp(struct hci_dev *hdev, u8 status) {
struct amp_mgr *mgr;
struct a2mp_physlink_rsp rsp;
struct hci_conn *hs_hcon;
mgr = amp_mgr_lookup_by_state(WRITE_REMOTE_AMP_ASSOC);
if (!mgr) {
return;
}
hs_hcon = hci_conn_hash_lookup_state(hdev, AMP_LK, BT_CONNEC... | void a2mp_send_create_phy_link_rsp(struct hci_dev *hdev, u8 status) {
struct amp_mgr *mgr;
struct a2mp_physlink_rsp rsp;
struct hci_conn *hs_hcon;
mgr = amp_mgr_lookup_by_state(WRITE_REMOTE_AMP_ASSOC);
if (!mgr) {
return;
}
memset(&rsp, 0, sizeof(rsp));
hs_hcon = hci_conn_hash_lo... | void a2mp_send_create_phy_link_rsp(struct hci_dev *hdev, u8 status) {
struct amp_mgr *mgr;
struct a2mp_physlink_rsp rsp;
struct hci_conn *hs_hcon;
mgr = amp_mgr_lookup_by_state(WRITE_REMOTE_AMP_ASSOC);
if (!mgr) {
return;
}
hs_hcon = hci_conn_hash_lookup_state(hdev, AMP_LK, BT_CONNEC... | void a2mp_send_create_phy_link_rsp(struct hci_dev *hdev, u8 status) {
struct amp_mgr *mgr;
struct a2mp_physlink_rsp rsp;
struct hci_conn *hs_hcon;
mgr = amp_mgr_lookup_by_state(WRITE_REMOTE_AMP_ASSOC);
if (!mgr) {
return;
}
memset(&rsp, 0, sizeof(rsp));
hs_hcon = hci_conn_hash_lo... | void a2mp_send_create_phy_link_rsp(struct hci_dev *hdev, u8 status) {
if (!mgr) {
return;
}
hs_hcon = hci_conn_hash_lookup_state(hdev, AMP_LK, BT_CONNECT);
}
| void a2mp_send_create_phy_link_rsp(struct hci_dev *hdev, u8 status) {
if (!mgr) {
return;
}
memset(&rsp, 0, sizeof(rsp));
hs_hcon = hci_conn_hash_lookup_state(hdev, AMP_LK, BT_CONNECT);
}
| void a2mp_send_create_phy_link_rsp(struct hci_dev *hdev, u8 status) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!mgr) {
return;
}
hs_hcon = hci_conn_hash_lookup_state(hdev, AMP_LK, BT_CONNECT);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| void a2mp_send_create_phy_link_rsp(struct hci_dev *hdev, u8 status) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!mgr) {
return;
}
memset(&rsp, 0, sizeof(rsp));
hs_hcon = hci_conn_hash_lookup_state(hdev, AMP_LK, BT_CONNECT);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | void a2mp_send_create_phy_link_rsp(struct hci_dev *hdev, u8 status) {
if (!mgr) {
return;
}
+ memset(&rsp, 0, sizeof(rsp));
hs_hcon = hci_conn_hash_lookup_state(hdev, AMP_LK, BT_CONNECT);
} |
CVE-2020-12352 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/a2mp.c | a2mp_send_getinfo_rsp | void a2mp_send_getinfo_rsp(struct hci_dev *hdev) {
struct amp_mgr *mgr;
struct a2mp_info_rsp rsp;
mgr = amp_mgr_lookup_by_state(READ_LOC_AMP_FO);
if (!mgr) {
return;
}
BT_DBG("%s mgr %p", hdev->name, mgr);
rsp.id = hdev->id;
rsp.status = A2MP_STATUS_VALID_CTRL_ID;
if (hdev->a... | void a2mp_send_getinfo_rsp(struct hci_dev *hdev) {
struct amp_mgr *mgr;
struct a2mp_info_rsp rsp;
mgr = amp_mgr_lookup_by_state(READ_LOC_AMP_FO);
if (!mgr) {
return;
}
BT_DBG("%s mgr %p", hdev->name, mgr);
memset(&rsp, 0, sizeof(rsp));
rsp.id = hdev->id;
rsp.status = A2MP_STA... | void a2mp_send_getinfo_rsp(struct hci_dev *hdev) {
struct amp_mgr *mgr;
struct a2mp_info_rsp rsp;
mgr = amp_mgr_lookup_by_state(READ_LOC_AMP_FO);
if (!mgr) {
return;
}
BT_DBG("%s mgr %p", hdev->name, mgr);
rsp.id = hdev->id;
rsp.status = A2MP_STATUS_VALID_CTRL_ID;
if (hdev->a... | void a2mp_send_getinfo_rsp(struct hci_dev *hdev) {
struct amp_mgr *mgr;
struct a2mp_info_rsp rsp;
mgr = amp_mgr_lookup_by_state(READ_LOC_AMP_FO);
if (!mgr) {
return;
}
BT_DBG("%s mgr %p", hdev->name, mgr);
memset(&rsp, 0, sizeof(rsp));
rsp.id = hdev->id;
rsp.status = A2MP_STA... | void a2mp_send_getinfo_rsp(struct hci_dev *hdev) {
BT_DBG("%s mgr %p", hdev->name, mgr);
rsp.id = hdev->id;
}
| void a2mp_send_getinfo_rsp(struct hci_dev *hdev) {
BT_DBG("%s mgr %p", hdev->name, mgr);
memset(&rsp, 0, sizeof(rsp));
rsp.id = hdev->id;
}
| void a2mp_send_getinfo_rsp(struct hci_dev *hdev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("%s mgr %p", hdev->name, mgr);
rsp.id = hdev->id;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| void a2mp_send_getinfo_rsp(struct hci_dev *hdev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("%s mgr %p", hdev->name, mgr);
memset(&rsp, 0, sizeof(rsp));
rsp.id = hdev->id;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | void a2mp_send_getinfo_rsp(struct hci_dev *hdev) {
BT_DBG("%s mgr %p", hdev->name, mgr);
+ memset(&rsp, 0, sizeof(rsp));
rsp.id = hdev->id;
} |
CVE-2020-12464 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/usb/core/message.c | usb_sg_cancel | void usb_sg_cancel(struct usb_sg_request *io) {
unsigned long flags;
int i, retval;
spin_lock_irqsave(&io->lock, flags);
if (io->status) {
spin_unlock_irqrestore(&io->lock, flags);
return;
}
io->status = -ECONNRESET;
spin_unlock_irqrestore(&io->lock, flags);
for (i = io->... | void usb_sg_cancel(struct usb_sg_request *io) {
unsigned long flags;
int i, retval;
spin_lock_irqsave(&io->lock, flags);
if (io->status || io->count == 0) {
spin_unlock_irqrestore(&io->lock, flags);
return;
}
io->status = -ECONNRESET;
io->count++;
spin_unlock_irqrestore(&... | void usb_sg_cancel(struct usb_sg_request *io) {
unsigned long flags;
int i, retval;
spin_lock_irqsave(&io->lock, flags);
if (io->status) {
spin_unlock_irqrestore(&io->lock, flags);
return;
}
io->status = -ECONNRESET;
spin_unlock_irqrestore(&io->lock, flags);
for (i = io->... | void usb_sg_cancel(struct usb_sg_request *io) {
unsigned long flags;
int i, retval;
spin_lock_irqsave(&io->lock, flags);
if (io->status || io->count == 0) {
spin_unlock_irqrestore(&io->lock, flags);
return;
}
io->status = -ECONNRESET;
io->count++;
spin_unlock_irqrestore(&... | void usb_sg_cancel(struct usb_sg_request *io) {
spin_lock_irqsave(&io->lock, flags);
if (io->status) {
spin_unlock_irqrestore(&io->lock, flags);
return;
}
io->status = -ECONNRESET;
spin_unlock_irqrestore(&io->lock, flags);
for (i = io->entries - 1; i >= 0; --i) {
}
}
| void usb_sg_cancel(struct usb_sg_request *io) {
spin_lock_irqsave(&io->lock, flags);
if (io->status || io->count == 0) {
spin_unlock_irqrestore(&io->lock, flags);
return;
}
io->status = -ECONNRESET;
io->count++;
spin_unlock_irqrestore(&io->lock, flags);
for (i = io->entries -... | void usb_sg_cancel(struct usb_sg_request *io) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
spin_lock_irqsave(&io->lock, flags);
if (io->status) {
spin_unlock_irqrestore(&io->lock, flags);
return;
}
io->status = -ECONNRESET;
spin_unlock_irqrestore(&io->lock, flags);
for (i ... | void usb_sg_cancel(struct usb_sg_request *io) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
spin_lock_irqsave(&io->lock, flags);
if (io->status || io->count == 0) {
spin_unlock_irqrestore(&io->lock, flags);
return;
}
io->status = -ECONNRESET;
io->count++;
spin_unlock_irqres... | void usb_sg_cancel(struct usb_sg_request *io) {
spin_lock_irqsave(&io->lock, flags);
- if (io->status) {
+ if (io->status || io->count == 0) {
spin_unlock_irqrestore(&io->lock, flags);
return;
}
io->status = -ECONNRESET;
+ io->count++;
spin_unlock_irqrestore(&io->lock, fl... |
CVE-2020-12465 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/mediatek/mt76/dma.c | mt76_add_fragment | static void mt76_add_fragment(struct mt76_dev *dev, struct mt76_queue *q, void *data, int len, bool more) {
struct page *page = virt_to_head_page(data);
int offset = data - page_address(page);
struct sk_buff *skb = q->rx_head;
offset += q->buf_offset;
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, ... | static void mt76_add_fragment(struct mt76_dev *dev, struct mt76_queue *q, void *data, int len, bool more) {
struct page *page = virt_to_head_page(data);
int offset = data - page_address(page);
struct sk_buff *skb = q->rx_head;
struct skb_shared_info *shinfo = skb_shinfo(skb);
if (shinfo->nr_frags < ... | static void mt76_add_fragment(struct mt76_dev *dev, struct mt76_queue *q, void *data, int len, bool more) {
struct page *page = virt_to_head_page(data);
int offset = data - page_address(page);
struct sk_buff *skb = q->rx_head;
offset += q->buf_offset;
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, ... | static void mt76_add_fragment(struct mt76_dev *dev, struct mt76_queue *q, void *data, int len, bool more) {
struct page *page = virt_to_head_page(data);
int offset = data - page_address(page);
struct sk_buff *skb = q->rx_head;
struct skb_shared_info *shinfo = skb_shinfo(skb);
if (shinfo->nr_frags < ... | static void mt76_add_fragment(struct mt76_dev *dev, struct mt76_queue *q, void *data, int len, bool more) {
struct page *page = virt_to_head_page(data);
int offset = data - page_address(page);
struct sk_buff *skb = q->rx_head;
offset += q->buf_offset;
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, ... | static void mt76_add_fragment(struct mt76_dev *dev, struct mt76_queue *q, void *data, int len, bool more) {
struct page *page = virt_to_head_page(data);
int offset = data - page_address(page);
struct sk_buff *skb = q->rx_head;
struct skb_shared_info *shinfo = skb_shinfo(skb);
if (shinfo->nr_frags < ... | static void mt76_add_fragment(struct mt76_dev *dev, struct mt76_queue *q, void *data, int len, bool more) {
struct page *page = virt_to_head_page(data);
int offset = data - page_address(page);
struct sk_buff *skb = q->rx_head;
offset += q->buf_offset;
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, ... | static void mt76_add_fragment(struct mt76_dev *dev, struct mt76_queue *q, void *data, int len, bool more) {
struct page *page = virt_to_head_page(data);
int offset = data - page_address(page);
struct sk_buff *skb = q->rx_head;
struct skb_shared_info *shinfo = skb_shinfo(skb);
if (shinfo->nr_frags < ... | static void mt76_add_fragment(struct mt76_dev *dev, struct mt76_queue *q, void *data, int len, bool more) {
struct page *page = virt_to_head_page(data);
int offset = data - page_address(page);
struct sk_buff *skb = q->rx_head;
- offset += q->buf_offset;
- skb_add_rx_frag(skb, skb_shinfo(skb)->nr_f... |
CVE-2020-12652 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/message/fusion/mptctl.c | __mptctl_ioctl | static long __mptctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg) {
mpt_ioctl_header *uhdr = (void *) arg;
mpt_ioctl_header khdr;
int iocnum;
unsigned iocnumX;
int nonblock = (file->f_flags & O_NONBLOCK);
int ret;
MPT_ADAPTER *iocp = NULL;
if (copy_from_user(&khdr, uhdr,... | static long __mptctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg) {
mpt_ioctl_header *uhdr = (void *) arg;
mpt_ioctl_header khdr;
int iocnum;
unsigned iocnumX;
int nonblock = (file->f_flags & O_NONBLOCK);
int ret;
MPT_ADAPTER *iocp = NULL;
if (copy_from_user(&khdr, uhdr,... | static long __mptctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg) {
mpt_ioctl_header *uhdr = (void *) arg;
mpt_ioctl_header khdr;
int iocnum;
unsigned iocnumX;
int nonblock = (file->f_flags & O_NONBLOCK);
int ret;
MPT_ADAPTER *iocp = NULL;
if (copy_from_user(&khdr, uhdr,... | static long __mptctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg) {
mpt_ioctl_header *uhdr = (void *) arg;
mpt_ioctl_header khdr;
int iocnum;
unsigned iocnumX;
int nonblock = (file->f_flags & O_NONBLOCK);
int ret;
MPT_ADAPTER *iocp = NULL;
if (copy_from_user(&khdr, uhdr,... | static long __mptctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg) {
int nonblock = (file->f_flags & O_NONBLOCK);
MPT_ADAPTER *iocp = NULL;
iocnumX = khdr.iocnum & 0xFF;
if (((iocnum = mpt_verify_adapter(iocnumX, &iocp)) < 0) || (iocp == NULL)) {
return -ENODEV;
}
if ((cm... | static long __mptctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg) {
int nonblock = (file->f_flags & O_NONBLOCK);
MPT_ADAPTER *iocp = NULL;
iocnumX = khdr.iocnum & 0xFF;
if (((iocnum = mpt_verify_adapter(iocnumX, &iocp)) < 0) || (iocp == NULL)) {
return -ENODEV;
}
if ((cm... | static long __mptctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int nonblock = (file->f_flags & O_NONBLOCK);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
MPT_ADAPTER *iocp = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
io... | static long __mptctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int nonblock = (file->f_flags & O_NONBLOCK);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
MPT_ADAPTER *iocp = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
io... | static long __mptctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg) {
int nonblock = (file->f_flags & O_NONBLOCK);
MPT_ADAPTER *iocp = NULL;
iocnumX = khdr.iocnum & 0xFF;
if (((iocnum = mpt_verify_adapter(iocnumX, &iocp)) < 0) || (iocp == NULL)) {
return -ENODEV;
}
... |
CVE-2020-12652 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/message/fusion/mptctl.c | compat_mpt_command | static int compat_mpt_command(struct file *filp, unsigned int cmd, unsigned long arg) {
struct mpt_ioctl_command32 karg32;
struct mpt_ioctl_command32 *uarg = (struct mpt_ioctl_command32 *) arg;
struct mpt_ioctl_command karg;
MPT_ADAPTER *iocp = NULL;
int iocnum, iocnumX;
int nonblock = (filp->f_... | static int compat_mpt_command(struct file *filp, unsigned int cmd, unsigned long arg) {
struct mpt_ioctl_command32 karg32;
struct mpt_ioctl_command32 *uarg = (struct mpt_ioctl_command32 *) arg;
struct mpt_ioctl_command karg;
MPT_ADAPTER *iocp = NULL;
int iocnum, iocnumX;
int nonblock = (filp->f_... | static int compat_mpt_command(struct file *filp, unsigned int cmd, unsigned long arg) {
struct mpt_ioctl_command32 karg32;
struct mpt_ioctl_command32 *uarg = (struct mpt_ioctl_command32 *) arg;
struct mpt_ioctl_command karg;
MPT_ADAPTER *iocp = NULL;
int iocnum, iocnumX;
int nonblock = (filp->f_... | static int compat_mpt_command(struct file *filp, unsigned int cmd, unsigned long arg) {
struct mpt_ioctl_command32 karg32;
struct mpt_ioctl_command32 *uarg = (struct mpt_ioctl_command32 *) arg;
struct mpt_ioctl_command karg;
MPT_ADAPTER *iocp = NULL;
int iocnum, iocnumX;
int nonblock = (filp->f_... | static int compat_mpt_command(struct file *filp, unsigned int cmd, unsigned long arg) {
struct mpt_ioctl_command32 *uarg = (struct mpt_ioctl_command32 *) arg;
MPT_ADAPTER *iocp = NULL;
int nonblock = (filp->f_flags & O_NONBLOCK);
iocnumX = karg32.hdr.iocnum & 0xFF;
if (((iocnum = mpt_verify_adapter(... | static int compat_mpt_command(struct file *filp, unsigned int cmd, unsigned long arg) {
struct mpt_ioctl_command32 *uarg = (struct mpt_ioctl_command32 *) arg;
MPT_ADAPTER *iocp = NULL;
int nonblock = (filp->f_flags & O_NONBLOCK);
iocnumX = karg32.hdr.iocnum & 0xFF;
if (((iocnum = mpt_verify_adapter(... | static int compat_mpt_command(struct file *filp, unsigned int cmd, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mpt_ioctl_command32 *uarg = (struct mpt_ioctl_command32 *) arg;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
MPT_ADAPTER *iocp = NULL;
/* PLACEHOLDER: DO NOT ... | static int compat_mpt_command(struct file *filp, unsigned int cmd, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mpt_ioctl_command32 *uarg = (struct mpt_ioctl_command32 *) arg;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
MPT_ADAPTER *iocp = NULL;
/* PLACEHOLDER: DO NOT ... | static int compat_mpt_command(struct file *filp, unsigned int cmd, unsigned long arg) {
struct mpt_ioctl_command32 *uarg = (struct mpt_ioctl_command32 *) arg;
MPT_ADAPTER *iocp = NULL;
int nonblock = (filp->f_flags & O_NONBLOCK);
iocnumX = karg32.hdr.iocnum & 0xFF;
if (((iocnum = mpt_verify_ad... |
CVE-2020-12652 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/message/fusion/mptctl.c | compat_mptfwxfer_ioctl | static int compat_mptfwxfer_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) {
struct mpt_fw_xfer32 kfw32;
struct mpt_fw_xfer kfw;
MPT_ADAPTER *iocp = NULL;
int iocnum, iocnumX;
int nonblock = (filp->f_flags & O_NONBLOCK);
int ret;
if (copy_from_user(&kfw32, (char *)arg, sizeof(... | static int compat_mptfwxfer_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) {
struct mpt_fw_xfer32 kfw32;
struct mpt_fw_xfer kfw;
MPT_ADAPTER *iocp = NULL;
int iocnum, iocnumX;
int nonblock = (filp->f_flags & O_NONBLOCK);
int ret;
if (copy_from_user(&kfw32, (char *)arg, sizeof(... | static int compat_mptfwxfer_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) {
struct mpt_fw_xfer32 kfw32;
struct mpt_fw_xfer kfw;
MPT_ADAPTER *iocp = NULL;
int iocnum, iocnumX;
int nonblock = (filp->f_flags & O_NONBLOCK);
int ret;
if (copy_from_user(&kfw32, (char *)arg, sizeof(... | static int compat_mptfwxfer_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) {
struct mpt_fw_xfer32 kfw32;
struct mpt_fw_xfer kfw;
MPT_ADAPTER *iocp = NULL;
int iocnum, iocnumX;
int nonblock = (filp->f_flags & O_NONBLOCK);
int ret;
if (copy_from_user(&kfw32, (char *)arg, sizeof(... | static int compat_mptfwxfer_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) {
MPT_ADAPTER *iocp = NULL;
int nonblock = (filp->f_flags & O_NONBLOCK);
iocnumX = kfw32.iocnum & 0xFF;
if (((iocnum = mpt_verify_adapter(iocnumX, &iocp)) < 0) || (iocp == NULL)) {
return -ENODEV;
}
... | static int compat_mptfwxfer_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) {
MPT_ADAPTER *iocp = NULL;
int nonblock = (filp->f_flags & O_NONBLOCK);
iocnumX = kfw32.iocnum & 0xFF;
if (((iocnum = mpt_verify_adapter(iocnumX, &iocp)) < 0) || (iocp == NULL)) {
return -ENODEV;
}
... | static int compat_mptfwxfer_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
MPT_ADAPTER *iocp = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int nonblock = (filp->f_flags & O_NONBLOCK);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */... | static int compat_mptfwxfer_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
MPT_ADAPTER *iocp = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int nonblock = (filp->f_flags & O_NONBLOCK);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */... | static int compat_mptfwxfer_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) {
MPT_ADAPTER *iocp = NULL;
int nonblock = (filp->f_flags & O_NONBLOCK);
iocnumX = kfw32.iocnum & 0xFF;
if (((iocnum = mpt_verify_adapter(iocnumX, &iocp)) < 0) || (iocp == NULL)) {
return -ENODEV;
... |
CVE-2020-12652 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/message/fusion/mptctl.c | mptctl_do_fw_download | static int mptctl_do_fw_download(int ioc, char *ufwbuf, size_t fwlen) {
FWDownload_t *dlmsg;
MPT_FRAME_HDR *mf;
MPT_ADAPTER *iocp;
FWDownloadTCSGE_t *ptsge;
MptSge_t *sgl, *sgIn;
char *sgOut;
struct buflist *buflist;
struct buflist *bl;
dma_addr_t sgl_dma;
int ret;
int numfra... | static int mptctl_do_fw_download(MPT_ADAPTER *iocp, char *ufwbuf, size_t fwlen) {
FWDownload_t *dlmsg;
MPT_FRAME_HDR *mf;
FWDownloadTCSGE_t *ptsge;
MptSge_t *sgl, *sgIn;
char *sgOut;
struct buflist *buflist;
struct buflist *bl;
dma_addr_t sgl_dma;
int ret;
int numfrags = 0;
i... | static int mptctl_do_fw_download(int ioc, char *ufwbuf, size_t fwlen) {
FWDownload_t *dlmsg;
MPT_FRAME_HDR *mf;
MPT_ADAPTER *iocp;
FWDownloadTCSGE_t *ptsge;
MptSge_t *sgl, *sgIn;
char *sgOut;
struct buflist *buflist;
struct buflist *bl;
dma_addr_t sgl_dma;
int ret;
int numfra... | static int mptctl_do_fw_download(MPT_ADAPTER *iocp, char *ufwbuf, size_t fwlen) {
FWDownload_t *dlmsg;
MPT_FRAME_HDR *mf;
FWDownloadTCSGE_t *ptsge;
MptSge_t *sgl, *sgIn;
char *sgOut;
struct buflist *buflist;
struct buflist *bl;
dma_addr_t sgl_dma;
int ret;
int numfrags = 0;
i... | static int mptctl_do_fw_download(int ioc, char *ufwbuf, size_t fwlen) {
MPT_FRAME_HDR *mf;
MPT_ADAPTER *iocp;
FWDownloadTCSGE_t *ptsge;
pFWDownloadReply_t ReplyMsg = NULL;
unsigned long timeleft;
if (mpt_verify_adapter(ioc, &iocp) < 0) {
printk(KERN_DEBUG MYNAM "ioctl_fwdl - ioc%d not fo... | static int mptctl_do_fw_download(MPT_ADAPTER *iocp, char *ufwbuf, size_t fwlen) {
MPT_FRAME_HDR *mf;
FWDownloadTCSGE_t *ptsge;
pFWDownloadReply_t ReplyMsg = NULL;
unsigned long timeleft;
if ((mf = mpt_get_msg_frame(mptctl_id, iocp)) == NULL) {
return -EAGA;
}
dctlprintk(iocp, printk(... | static int mptctl_do_fw_download(int ioc, char *ufwbuf, size_t fwlen) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
MPT_FRAME_HDR *mf;
MPT_ADAPTER *iocp;
FWDownloadTCSGE_t *ptsge;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pFWDownloadReply_t ReplyMsg = NULL;
unsigned long timeleft;
... | static int mptctl_do_fw_download(MPT_ADAPTER *iocp, char *ufwbuf, size_t fwlen) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
MPT_FRAME_HDR *mf;
FWDownloadTCSGE_t *ptsge;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pFWDownloadReply_t ReplyMsg = NULL;
unsigned long timeleft;
if ((mf = mpt... | -static int mptctl_do_fw_download(int ioc, char *ufwbuf, size_t fwlen) {
+static int mptctl_do_fw_download(MPT_ADAPTER *iocp, char *ufwbuf, size_t fwlen) {
MPT_FRAME_HDR *mf;
- MPT_ADAPTER *iocp;
FWDownloadTCSGE_t *ptsge;
pFWDownloadReply_t ReplyMsg = NULL;
unsigned long timeleft;
- if (mpt_ve... |
CVE-2020-12652 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/message/fusion/mptctl.c | mptctl_do_reset | static int mptctl_do_reset(unsigned long arg) {
struct mpt_ioctl_diag_reset *urinfo = (void *) arg;
struct mpt_ioctl_diag_reset krinfo;
MPT_ADAPTER *iocp;
if (copy_from_user(&krinfo, urinfo, sizeof(struct mpt_ioctl_diag_reset))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_do_reset - " "Unable to copy... | static int mptctl_do_reset(MPT_ADAPTER *iocp, unsigned long arg) {
struct mpt_ioctl_diag_reset *urinfo = (void *) arg;
struct mpt_ioctl_diag_reset krinfo;
if (copy_from_user(&krinfo, urinfo, sizeof(struct mpt_ioctl_diag_reset))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_do_reset - " "Unable to copy mpt... | static int mptctl_do_reset(unsigned long arg) {
struct mpt_ioctl_diag_reset *urinfo = (void *) arg;
struct mpt_ioctl_diag_reset krinfo;
MPT_ADAPTER *iocp;
if (copy_from_user(&krinfo, urinfo, sizeof(struct mpt_ioctl_diag_reset))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_do_reset - " "Unable to copy... | static int mptctl_do_reset(MPT_ADAPTER *iocp, unsigned long arg) {
struct mpt_ioctl_diag_reset *urinfo = (void *) arg;
struct mpt_ioctl_diag_reset krinfo;
if (copy_from_user(&krinfo, urinfo, sizeof(struct mpt_ioctl_diag_reset))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_do_reset - " "Unable to copy mpt... | static int mptctl_do_reset(unsigned long arg) {
struct mpt_ioctl_diag_reset krinfo;
MPT_ADAPTER *iocp;
if (copy_from_user(&krinfo, urinfo, sizeof(struct mpt_ioctl_diag_reset))) {
return -EFAULT;
}
if (mpt_verify_adapter(krinfo.hdr.iocnum, &iocp) < 0) {
printk(KERN_DEBUG MYNAM "%s@%d:... | static int mptctl_do_reset(MPT_ADAPTER *iocp, unsigned long arg) {
struct mpt_ioctl_diag_reset krinfo;
if (copy_from_user(&krinfo, urinfo, sizeof(struct mpt_ioctl_diag_reset))) {
return -EFAULT;
}
if (mpt_HardResetHandler(iocp, CAN_SLEEP) != 0) {
return -1;
}
}
| static int mptctl_do_reset(unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mpt_ioctl_diag_reset krinfo;
MPT_ADAPTER *iocp;
if (copy_from_user(&krinfo, urinfo, sizeof(struct mpt_ioctl_diag_reset))) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return -EFAULT;
}... | static int mptctl_do_reset(MPT_ADAPTER *iocp, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mpt_ioctl_diag_reset krinfo;
if (copy_from_user(&krinfo, urinfo, sizeof(struct mpt_ioctl_diag_reset))) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return -EFAULT;
}
... | -static int mptctl_do_reset(unsigned long arg) {
+static int mptctl_do_reset(MPT_ADAPTER *iocp, unsigned long arg) {
struct mpt_ioctl_diag_reset krinfo;
- MPT_ADAPTER *iocp;
if (copy_from_user(&krinfo, urinfo, sizeof(struct mpt_ioctl_diag_reset))) {
return -EFAULT;
- }
- if (mpt_verify_adapt... |
CVE-2020-12652 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/message/fusion/mptctl.c | mptctl_eventenable | static int mptctl_eventenable (unsigned long arg) {
struct mpt_ioctl_eventenable *uarg = (void *) arg;
struct mpt_ioctl_eventenable karg;
MPT_ADAPTER *ioc;
int iocnum;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventenable))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_eventenable - ... | static int mptctl_eventenable (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_eventenable *uarg = (void *) arg;
struct mpt_ioctl_eventenable karg;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventenable))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_eventenable - " "Unable to read in... | static int mptctl_eventenable (unsigned long arg) {
struct mpt_ioctl_eventenable *uarg = (void *) arg;
struct mpt_ioctl_eventenable karg;
MPT_ADAPTER *ioc;
int iocnum;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventenable))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_eventenable - ... | static int mptctl_eventenable (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_eventenable *uarg = (void *) arg;
struct mpt_ioctl_eventenable karg;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventenable))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_eventenable - " "Unable to read in... | static int mptctl_eventenable (unsigned long arg) {
struct mpt_ioctl_eventenable karg;
MPT_ADAPTER *ioc;
int iocnum;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventenable))) {
return -EFAULT;
}
if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) || (ioc == NULL))... | static int mptctl_eventenable (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_eventenable karg;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventenable))) {
return -EFAULT;
}
if (ioc->events == NULL) {
if (!ioc->events) {
return -ENOMEM;
}
... | static int mptctl_eventenable (unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mpt_ioctl_eventenable karg;
MPT_ADAPTER *ioc;
int iocnum;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventenable))) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return... | static int mptctl_eventenable (MPT_ADAPTER *ioc, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mpt_ioctl_eventenable karg;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventenable))) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return -EFAULT;
}
... | -static int mptctl_eventenable (unsigned long arg) {
+static int mptctl_eventenable (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_eventenable karg;
- MPT_ADAPTER *ioc;
- int iocnum;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventenable))) {
return -EFAULT;
- }
- i... |
CVE-2020-12652 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/message/fusion/mptctl.c | mptctl_eventquery | static int mptctl_eventquery (unsigned long arg) {
struct mpt_ioctl_eventquery *uarg = (void *) arg;
struct mpt_ioctl_eventquery karg;
MPT_ADAPTER *ioc;
int iocnum;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventquery))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_eventquery - " "Un... | static int mptctl_eventquery (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_eventquery *uarg = (void *) arg;
struct mpt_ioctl_eventquery karg;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventquery))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_eventquery - " "Unable to read in mpt_... | static int mptctl_eventquery (unsigned long arg) {
struct mpt_ioctl_eventquery *uarg = (void *) arg;
struct mpt_ioctl_eventquery karg;
MPT_ADAPTER *ioc;
int iocnum;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventquery))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_eventquery - " "Un... | static int mptctl_eventquery (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_eventquery *uarg = (void *) arg;
struct mpt_ioctl_eventquery karg;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventquery))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_eventquery - " "Unable to read in mpt_... | static int mptctl_eventquery (unsigned long arg) {
struct mpt_ioctl_eventquery karg;
MPT_ADAPTER *ioc;
int iocnum;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventquery))) {
return -EFAULT;
}
if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) || (ioc == NULL)) {
... | static int mptctl_eventquery (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_eventquery karg;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventquery))) {
return -EFAULT;
}
karg.eventEntries = MPTCTL_EVENT_LOG_SIZE;
karg.eventTypes = ioc->eventTypes;
if (copy_to_user(... | static int mptctl_eventquery (unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mpt_ioctl_eventquery karg;
MPT_ADAPTER *ioc;
int iocnum;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventquery))) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return -E... | static int mptctl_eventquery (MPT_ADAPTER *ioc, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mpt_ioctl_eventquery karg;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventquery))) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return -EFAULT;
}
/* ... | -static int mptctl_eventquery (unsigned long arg) {
+static int mptctl_eventquery (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_eventquery karg;
- MPT_ADAPTER *ioc;
- int iocnum;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventquery))) {
return -EFAULT;
- }
- if ((... |
CVE-2020-12652 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/message/fusion/mptctl.c | mptctl_eventreport | static int mptctl_eventreport (unsigned long arg) {
struct mpt_ioctl_eventreport *uarg = (void *) arg;
struct mpt_ioctl_eventreport karg;
MPT_ADAPTER *ioc;
int iocnum;
int numBytes, maxEvents, max;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventreport))) {
printk(KERN_ERR M... | static int mptctl_eventreport (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_eventreport *uarg = (void *) arg;
struct mpt_ioctl_eventreport karg;
int numBytes, maxEvents, max;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventreport))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_... | static int mptctl_eventreport (unsigned long arg) {
struct mpt_ioctl_eventreport *uarg = (void *) arg;
struct mpt_ioctl_eventreport karg;
MPT_ADAPTER *ioc;
int iocnum;
int numBytes, maxEvents, max;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventreport))) {
printk(KERN_ERR M... | static int mptctl_eventreport (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_eventreport *uarg = (void *) arg;
struct mpt_ioctl_eventreport karg;
int numBytes, maxEvents, max;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventreport))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_... | static int mptctl_eventreport (unsigned long arg) {
struct mpt_ioctl_eventreport karg;
MPT_ADAPTER *ioc;
int iocnum;
int numBytes, maxEvents, max;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventreport))) {
return -EFAULT;
}
if (((iocnum = mpt_verify_adapter(karg.hdr.ioc... | static int mptctl_eventreport (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_eventreport karg;
int numBytes, maxEvents, max;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventreport))) {
return -EFAULT;
}
numBytes = karg.hdr.maxDataSize - sizeof(mpt_ioctl_header);
if... | static int mptctl_eventreport (unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mpt_ioctl_eventreport karg;
MPT_ADAPTER *ioc;
int iocnum;
int numBytes, maxEvents, max;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventreport))) {
/* PLACEHOLDER: DO NOT DEL... | static int mptctl_eventreport (MPT_ADAPTER *ioc, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mpt_ioctl_eventreport karg;
int numBytes, maxEvents, max;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventreport))) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | -static int mptctl_eventreport (unsigned long arg) {
+static int mptctl_eventreport (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_eventreport karg;
- MPT_ADAPTER *ioc;
- int iocnum;
int numBytes, maxEvents, max;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventreport))) {
... |
CVE-2020-12652 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/message/fusion/mptctl.c | mptctl_fw_download | static int mptctl_fw_download(unsigned long arg) {
struct mpt_fw_xfer *ufwdl = (void *) arg;
struct mpt_fw_xfer kfwdl;
if (copy_from_user(&kfwdl, ufwdl, sizeof(struct mpt_fw_xfer))) {
printk(KERN_ERR MYNAM "%s@%d::_ioctl_fwdl - " "Unable to copy mpt_fw_xfer struct @ %p\n", __FILE__, __LE__, ufwdl);
... | static int mptctl_fw_download(MPT_ADAPTER *iocp, unsigned long arg) {
struct mpt_fw_xfer *ufwdl = (void *) arg;
struct mpt_fw_xfer kfwdl;
if (copy_from_user(&kfwdl, ufwdl, sizeof(struct mpt_fw_xfer))) {
printk(KERN_ERR MYNAM "%s@%d::_ioctl_fwdl - " "Unable to copy mpt_fw_xfer struct @ %p\n", __FILE_... | static int mptctl_fw_download(unsigned long arg) {
struct mpt_fw_xfer *ufwdl = (void *) arg;
struct mpt_fw_xfer kfwdl;
if (copy_from_user(&kfwdl, ufwdl, sizeof(struct mpt_fw_xfer))) {
printk(KERN_ERR MYNAM "%s@%d::_ioctl_fwdl - " "Unable to copy mpt_fw_xfer struct @ %p\n", __FILE__, __LE__, ufwdl);
... | static int mptctl_fw_download(MPT_ADAPTER *iocp, unsigned long arg) {
struct mpt_fw_xfer *ufwdl = (void *) arg;
struct mpt_fw_xfer kfwdl;
if (copy_from_user(&kfwdl, ufwdl, sizeof(struct mpt_fw_xfer))) {
printk(KERN_ERR MYNAM "%s@%d::_ioctl_fwdl - " "Unable to copy mpt_fw_xfer struct @ %p\n", __FILE_... | static int mptctl_fw_download(unsigned long arg) {
struct mpt_fw_xfer *ufwdl = (void *) arg;
struct mpt_fw_xfer kfwdl;
if (copy_from_user(&kfwdl, ufwdl, sizeof(struct mpt_fw_xfer))) {
printk(KERN_ERR MYNAM "%s@%d::_ioctl_fwdl - " "Unable to copy mpt_fw_xfer struct @ %p\n", __FILE__, __LE__, ufwdl);
... | static int mptctl_fw_download(MPT_ADAPTER *iocp, unsigned long arg) {
struct mpt_fw_xfer *ufwdl = (void *) arg;
struct mpt_fw_xfer kfwdl;
if (copy_from_user(&kfwdl, ufwdl, sizeof(struct mpt_fw_xfer))) {
printk(KERN_ERR MYNAM "%s@%d::_ioctl_fwdl - " "Unable to copy mpt_fw_xfer struct @ %p\n", __FILE_... | static int mptctl_fw_download(unsigned long arg) {
struct mpt_fw_xfer *ufwdl = (void *) arg;
struct mpt_fw_xfer kfwdl;
if (copy_from_user(&kfwdl, ufwdl, sizeof(struct mpt_fw_xfer))) {
printk(KERN_ERR MYNAM "%s@%d::_ioctl_fwdl - " "Unable to copy mpt_fw_xfer struct @ %p\n", __FILE__, __LE__, ufwdl);
... | static int mptctl_fw_download(MPT_ADAPTER *iocp, unsigned long arg) {
struct mpt_fw_xfer *ufwdl = (void *) arg;
struct mpt_fw_xfer kfwdl;
if (copy_from_user(&kfwdl, ufwdl, sizeof(struct mpt_fw_xfer))) {
printk(KERN_ERR MYNAM "%s@%d::_ioctl_fwdl - " "Unable to copy mpt_fw_xfer struct @ %p\n", __FILE_... | -static int mptctl_fw_download(unsigned long arg) {
+static int mptctl_fw_download(MPT_ADAPTER *iocp, unsigned long arg) {
struct mpt_fw_xfer *ufwdl = (void *) arg;
struct mpt_fw_xfer kfwdl;
if (copy_from_user(&kfwdl, ufwdl, sizeof(struct mpt_fw_xfer))) {
printk(KERN_ERR MYNAM "%s@%d::_ioctl_fwd... |
CVE-2020-12652 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/message/fusion/mptctl.c | mptctl_getiocinfo | static int mptctl_getiocinfo (unsigned long arg, unsigned int data_size) {
struct mpt_ioctl_iocinfo *uarg = (void *) arg;
struct mpt_ioctl_iocinfo *karg;
MPT_ADAPTER *ioc;
struct pci_dev *pdev;
int iocnum;
unsigned int port;
int cim_rev;
struct scsi_device *sdev;
VirtDevice *vdevice;... | static int mptctl_getiocinfo (MPT_ADAPTER *ioc, unsigned long arg, unsigned int data_size) {
struct mpt_ioctl_iocinfo *uarg = (void *) arg;
struct mpt_ioctl_iocinfo *karg;
struct pci_dev *pdev;
unsigned int port;
int cim_rev;
struct scsi_device *sdev;
VirtDevice *vdevice;
if (data_size =... | static int mptctl_getiocinfo (unsigned long arg, unsigned int data_size) {
struct mpt_ioctl_iocinfo *uarg = (void *) arg;
struct mpt_ioctl_iocinfo *karg;
MPT_ADAPTER *ioc;
struct pci_dev *pdev;
int iocnum;
unsigned int port;
int cim_rev;
struct scsi_device *sdev;
VirtDevice *vdevice;... | static int mptctl_getiocinfo (MPT_ADAPTER *ioc, unsigned long arg, unsigned int data_size) {
struct mpt_ioctl_iocinfo *uarg = (void *) arg;
struct mpt_ioctl_iocinfo *karg;
struct pci_dev *pdev;
unsigned int port;
int cim_rev;
struct scsi_device *sdev;
VirtDevice *vdevice;
if (data_size =... | static int mptctl_getiocinfo (unsigned long arg, unsigned int data_size) {
struct mpt_ioctl_iocinfo *uarg = (void *) arg;
struct mpt_ioctl_iocinfo *karg;
MPT_ADAPTER *ioc;
struct pci_dev *pdev;
int iocnum;
unsigned int port;
if (data_size == sizeof(struct mpt_ioctl_iocinfo_rev0)) {
} els... | static int mptctl_getiocinfo (MPT_ADAPTER *ioc, unsigned long arg, unsigned int data_size) {
struct mpt_ioctl_iocinfo *uarg = (void *) arg;
struct mpt_ioctl_iocinfo *karg;
struct pci_dev *pdev;
unsigned int port;
if (data_size == sizeof(struct mpt_ioctl_iocinfo_rev0)) {
} else if (data_size == s... | static int mptctl_getiocinfo (unsigned long arg, unsigned int data_size) {
struct mpt_ioctl_iocinfo *uarg = (void *) arg;
struct mpt_ioctl_iocinfo *karg;
MPT_ADAPTER *ioc;
struct pci_dev *pdev;
int iocnum;
unsigned int port;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (data_size == ... | static int mptctl_getiocinfo (MPT_ADAPTER *ioc, unsigned long arg, unsigned int data_size) {
struct mpt_ioctl_iocinfo *uarg = (void *) arg;
struct mpt_ioctl_iocinfo *karg;
struct pci_dev *pdev;
unsigned int port;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (data_size == sizeof(struct mpt_io... | -static int mptctl_getiocinfo (unsigned long arg, unsigned int data_size) {
+static int mptctl_getiocinfo (MPT_ADAPTER *ioc, unsigned long arg, unsigned int data_size) {
struct mpt_ioctl_iocinfo *uarg = (void *) arg;
struct mpt_ioctl_iocinfo *karg;
- MPT_ADAPTER *ioc;
struct pci_dev *pdev;
- int io... |
CVE-2020-12652 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/message/fusion/mptctl.c | mptctl_gettargetinfo | static int mptctl_gettargetinfo (unsigned long arg) {
struct mpt_ioctl_targetinfo *uarg = (void *) arg;
struct mpt_ioctl_targetinfo karg;
MPT_ADAPTER *ioc;
VirtDevice *vdevice;
char *pmem;
int *pdata;
int iocnum;
int numDevices = 0;
int lun;
int maxWordsLeft;
int numBytes;
... | static int mptctl_gettargetinfo (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_targetinfo *uarg = (void *) arg;
struct mpt_ioctl_targetinfo karg;
VirtDevice *vdevice;
char *pmem;
int *pdata;
int numDevices = 0;
int lun;
int maxWordsLeft;
int numBytes;
u8 port;
struc... | static int mptctl_gettargetinfo (unsigned long arg) {
struct mpt_ioctl_targetinfo *uarg = (void *) arg;
struct mpt_ioctl_targetinfo karg;
MPT_ADAPTER *ioc;
VirtDevice *vdevice;
char *pmem;
int *pdata;
int iocnum;
int numDevices = 0;
int lun;
int maxWordsLeft;
int numBytes;
... | static int mptctl_gettargetinfo (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_targetinfo *uarg = (void *) arg;
struct mpt_ioctl_targetinfo karg;
VirtDevice *vdevice;
char *pmem;
int *pdata;
int numDevices = 0;
int lun;
int maxWordsLeft;
int numBytes;
u8 port;
struc... | static int mptctl_gettargetinfo (unsigned long arg) {
struct mpt_ioctl_targetinfo karg;
MPT_ADAPTER *ioc;
VirtDevice *vdevice;
int *pdata;
int iocnum;
int numDevices = 0;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_targetinfo))) {
return -EFAULT;
}
if (((iocnum = ... | static int mptctl_gettargetinfo (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_targetinfo karg;
VirtDevice *vdevice;
int *pdata;
int numDevices = 0;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_targetinfo))) {
return -EFAULT;
}
numBytes = karg.hdr.maxDataSize - s... | static int mptctl_gettargetinfo (unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mpt_ioctl_targetinfo karg;
MPT_ADAPTER *ioc;
VirtDevice *vdevice;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int *pdata;
int iocnum;
int numDevices = 0;
/* PLACEHOLDER: DO NO... | static int mptctl_gettargetinfo (MPT_ADAPTER *ioc, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mpt_ioctl_targetinfo karg;
VirtDevice *vdevice;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int *pdata;
int numDevices = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMEN... | -static int mptctl_gettargetinfo (unsigned long arg) {
+static int mptctl_gettargetinfo (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_targetinfo karg;
- MPT_ADAPTER *ioc;
VirtDevice *vdevice;
int *pdata;
- int iocnum;
int numDevices = 0;
if (copy_from_user(&karg, uarg, sizeof(s... |
CVE-2020-12652 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/message/fusion/mptctl.c | mptctl_hp_hostinfo | static int mptctl_hp_hostinfo(unsigned long arg, unsigned int data_size) {
hp_host_info_t *uarg = (void *) arg;
MPT_ADAPTER *ioc;
struct pci_dev *pdev;
char *pbuf=NULL;
dma_addr_t buf_dma;
hp_host_info_t karg;
CONFIGPARMS cfg;
ConfigPageHeader_t hdr;
int iocnum;
int rc, cim_rev;
... | static int mptctl_hp_hostinfo(MPT_ADAPTER *ioc, unsigned long arg, unsigned int data_size) {
hp_host_info_t *uarg = (void *) arg;
struct pci_dev *pdev;
char *pbuf=NULL;
dma_addr_t buf_dma;
hp_host_info_t karg;
CONFIGPARMS cfg;
ConfigPageHeader_t hdr;
int rc, cim_rev;
ToolboxIstwiRead... | static int mptctl_hp_hostinfo(unsigned long arg, unsigned int data_size) {
hp_host_info_t *uarg = (void *) arg;
MPT_ADAPTER *ioc;
struct pci_dev *pdev;
char *pbuf=NULL;
dma_addr_t buf_dma;
hp_host_info_t karg;
CONFIGPARMS cfg;
ConfigPageHeader_t hdr;
int iocnum;
int rc, cim_rev;
... | static int mptctl_hp_hostinfo(MPT_ADAPTER *ioc, unsigned long arg, unsigned int data_size) {
hp_host_info_t *uarg = (void *) arg;
struct pci_dev *pdev;
char *pbuf=NULL;
dma_addr_t buf_dma;
hp_host_info_t karg;
CONFIGPARMS cfg;
ConfigPageHeader_t hdr;
int rc, cim_rev;
ToolboxIstwiRead... | static int mptctl_hp_hostinfo(unsigned long arg, unsigned int data_size) {
hp_host_info_t *uarg = (void *) arg;
MPT_ADAPTER *ioc;
struct pci_dev *pdev;
ConfigPageHeader_t hdr;
int iocnum;
int rc, cim_rev;
if (copy_from_user(&karg, uarg, sizeof(hp_host_info_t))) {
return -EFAULT;
... | static int mptctl_hp_hostinfo(MPT_ADAPTER *ioc, unsigned long arg, unsigned int data_size) {
hp_host_info_t *uarg = (void *) arg;
struct pci_dev *pdev;
ConfigPageHeader_t hdr;
int rc, cim_rev;
if (copy_from_user(&karg, uarg, sizeof(hp_host_info_t))) {
return -EFAULT;
}
pdev = (struct... | static int mptctl_hp_hostinfo(unsigned long arg, unsigned int data_size) {
hp_host_info_t *uarg = (void *) arg;
MPT_ADAPTER *ioc;
struct pci_dev *pdev;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ConfigPageHeader_t hdr;
int iocnum;
int rc, cim_rev;
/* PLACEHOLDER: DO NOT DELETE THIS CO... | static int mptctl_hp_hostinfo(MPT_ADAPTER *ioc, unsigned long arg, unsigned int data_size) {
hp_host_info_t *uarg = (void *) arg;
struct pci_dev *pdev;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ConfigPageHeader_t hdr;
int rc, cim_rev;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (cop... | -static int mptctl_hp_hostinfo(unsigned long arg, unsigned int data_size) {
+static int mptctl_hp_hostinfo(MPT_ADAPTER *ioc, unsigned long arg, unsigned int data_size) {
hp_host_info_t *uarg = (void *) arg;
- MPT_ADAPTER *ioc;
struct pci_dev *pdev;
ConfigPageHeader_t hdr;
- int iocnum;
int rc,... |
CVE-2020-12652 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/message/fusion/mptctl.c | mptctl_hp_targetinfo | static int mptctl_hp_targetinfo(unsigned long arg) {
hp_target_info_t *uarg = (void *) arg;
SCSIDevicePage0_t *pg0_alloc;
SCSIDevicePage3_t *pg3_alloc;
MPT_ADAPTER *ioc;
MPT_SCSI_HOST *hd = NULL;
hp_target_info_t karg;
int iocnum;
int data_sz;
dma_addr_t page_dma;
CONFIGPARMS cfg... | static int mptctl_hp_targetinfo(MPT_ADAPTER *ioc, unsigned long arg) {
hp_target_info_t *uarg = (void *) arg;
SCSIDevicePage0_t *pg0_alloc;
SCSIDevicePage3_t *pg3_alloc;
MPT_SCSI_HOST *hd = NULL;
hp_target_info_t karg;
int data_sz;
dma_addr_t page_dma;
CONFIGPARMS cfg;
ConfigPageHead... | static int mptctl_hp_targetinfo(unsigned long arg) {
hp_target_info_t *uarg = (void *) arg;
SCSIDevicePage0_t *pg0_alloc;
SCSIDevicePage3_t *pg3_alloc;
MPT_ADAPTER *ioc;
MPT_SCSI_HOST *hd = NULL;
hp_target_info_t karg;
int iocnum;
int data_sz;
dma_addr_t page_dma;
CONFIGPARMS cfg... | static int mptctl_hp_targetinfo(MPT_ADAPTER *ioc, unsigned long arg) {
hp_target_info_t *uarg = (void *) arg;
SCSIDevicePage0_t *pg0_alloc;
SCSIDevicePage3_t *pg3_alloc;
MPT_SCSI_HOST *hd = NULL;
hp_target_info_t karg;
int data_sz;
dma_addr_t page_dma;
CONFIGPARMS cfg;
ConfigPageHead... | static int mptctl_hp_targetinfo(unsigned long arg) {
SCSIDevicePage3_t *pg3_alloc;
MPT_ADAPTER *ioc;
MPT_SCSI_HOST *hd = NULL;
hp_target_info_t karg;
int iocnum;
int data_sz;
if (copy_from_user(&karg, uarg, sizeof(hp_target_info_t))) {
return -EFAULT;
}
if (((iocnum = mpt_ver... | static int mptctl_hp_targetinfo(MPT_ADAPTER *ioc, unsigned long arg) {
SCSIDevicePage3_t *pg3_alloc;
MPT_SCSI_HOST *hd = NULL;
hp_target_info_t karg;
int data_sz;
if (copy_from_user(&karg, uarg, sizeof(hp_target_info_t))) {
return -EFAULT;
}
if (karg.hdr.id >= MPT_MAX_FC_DEVICES) {
... | static int mptctl_hp_targetinfo(unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
SCSIDevicePage3_t *pg3_alloc;
MPT_ADAPTER *ioc;
MPT_SCSI_HOST *hd = NULL;
hp_target_info_t karg;
int iocnum;
int data_sz;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (copy_from_use... | static int mptctl_hp_targetinfo(MPT_ADAPTER *ioc, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
SCSIDevicePage3_t *pg3_alloc;
MPT_SCSI_HOST *hd = NULL;
hp_target_info_t karg;
int data_sz;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (copy_from_user(&karg, uarg, sizeo... | -static int mptctl_hp_targetinfo(unsigned long arg) {
+static int mptctl_hp_targetinfo(MPT_ADAPTER *ioc, unsigned long arg) {
SCSIDevicePage3_t *pg3_alloc;
- MPT_ADAPTER *ioc;
MPT_SCSI_HOST *hd = NULL;
hp_target_info_t karg;
- int iocnum;
int data_sz;
if (copy_from_user(&karg, uarg, sizeo... |
CVE-2020-12652 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/message/fusion/mptctl.c | mptctl_mpt_command | static int mptctl_mpt_command (unsigned long arg) {
struct mpt_ioctl_command *uarg = (void *) arg;
struct mpt_ioctl_command karg;
MPT_ADAPTER *ioc;
int iocnum;
int rc;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_command))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_mpt_command - ... | static int mptctl_mpt_command (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_command *uarg = (void *) arg;
struct mpt_ioctl_command karg;
int rc;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_command))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_mpt_command - " "Unable to read in... | static int mptctl_mpt_command (unsigned long arg) {
struct mpt_ioctl_command *uarg = (void *) arg;
struct mpt_ioctl_command karg;
MPT_ADAPTER *ioc;
int iocnum;
int rc;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_command))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_mpt_command - ... | static int mptctl_mpt_command (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_command *uarg = (void *) arg;
struct mpt_ioctl_command karg;
int rc;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_command))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_mpt_command - " "Unable to read in... | static int mptctl_mpt_command (unsigned long arg) {
struct mpt_ioctl_command *uarg = (void *) arg;
struct mpt_ioctl_command karg;
MPT_ADAPTER *ioc;
int iocnum;
int rc;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_command))) {
return -EFAULT;
}
if (((iocnum = mpt_verify... | static int mptctl_mpt_command (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_command *uarg = (void *) arg;
struct mpt_ioctl_command karg;
int rc;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_command))) {
return -EFAULT;
}
rc = mptctl_do_mpt_command (ioc, karg, &uarg-... | static int mptctl_mpt_command (unsigned long arg) {
struct mpt_ioctl_command *uarg = (void *) arg;
struct mpt_ioctl_command karg;
MPT_ADAPTER *ioc;
int iocnum;
int rc;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_command))) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
r... | static int mptctl_mpt_command (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_command *uarg = (void *) arg;
struct mpt_ioctl_command karg;
int rc;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_command))) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return -EFAULT;
}... | -static int mptctl_mpt_command (unsigned long arg) {
+static int mptctl_mpt_command (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_command *uarg = (void *) arg;
struct mpt_ioctl_command karg;
- MPT_ADAPTER *ioc;
- int iocnum;
int rc;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_... |
CVE-2020-12652 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/message/fusion/mptctl.c | mptctl_readtest | static int mptctl_readtest (unsigned long arg) {
struct mpt_ioctl_test *uarg = (void *) arg;
struct mpt_ioctl_test karg;
MPT_ADAPTER *ioc;
int iocnum;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_test))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_readtest - " "Unable to read in mpt_io... | static int mptctl_readtest (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_test *uarg = (void *) arg;
struct mpt_ioctl_test karg;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_test))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_readtest - " "Unable to read in mpt_ioctl_test struct @ %p... | static int mptctl_readtest (unsigned long arg) {
struct mpt_ioctl_test *uarg = (void *) arg;
struct mpt_ioctl_test karg;
MPT_ADAPTER *ioc;
int iocnum;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_test))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_readtest - " "Unable to read in mpt_io... | static int mptctl_readtest (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_test *uarg = (void *) arg;
struct mpt_ioctl_test karg;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_test))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_readtest - " "Unable to read in mpt_ioctl_test struct @ %p... | static int mptctl_readtest (unsigned long arg) {
struct mpt_ioctl_test karg;
MPT_ADAPTER *ioc;
int iocnum;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_test))) {
return -EFAULT;
}
if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) || (ioc == NULL)) {
printk... | static int mptctl_readtest (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_test karg;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_test))) {
return -EFAULT;
}
karg.chip_type = ioc->mfcnt;
strncpy (karg.name, ioc->name, MPT_MAX_NAME);
karg.name[MPT_MAX_NAME-1]='\0';
... | static int mptctl_readtest (unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mpt_ioctl_test karg;
MPT_ADAPTER *ioc;
int iocnum;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_test))) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return -EFAULT;
}
... | static int mptctl_readtest (MPT_ADAPTER *ioc, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mpt_ioctl_test karg;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_test))) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return -EFAULT;
}
/* PLACEHOLDER: D... | -static int mptctl_readtest (unsigned long arg) {
+static int mptctl_readtest (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_test karg;
- MPT_ADAPTER *ioc;
- int iocnum;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_test))) {
return -EFAULT;
- }
- if (((iocnum = mpt_ve... |
CVE-2020-12652 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/message/fusion/mptctl.c | mptctl_replace_fw | static int mptctl_replace_fw (unsigned long arg) {
struct mpt_ioctl_replace_fw *uarg = (void *) arg;
struct mpt_ioctl_replace_fw karg;
MPT_ADAPTER *ioc;
int iocnum;
int newFwSize;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_replace_fw))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl... | static int mptctl_replace_fw (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_replace_fw *uarg = (void *) arg;
struct mpt_ioctl_replace_fw karg;
int newFwSize;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_replace_fw))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_replace_fw - " "Una... | static int mptctl_replace_fw (unsigned long arg) {
struct mpt_ioctl_replace_fw *uarg = (void *) arg;
struct mpt_ioctl_replace_fw karg;
MPT_ADAPTER *ioc;
int iocnum;
int newFwSize;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_replace_fw))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl... | static int mptctl_replace_fw (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_replace_fw *uarg = (void *) arg;
struct mpt_ioctl_replace_fw karg;
int newFwSize;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_replace_fw))) {
printk(KERN_ERR MYNAM "%s@%d::mptctl_replace_fw - " "Una... | static int mptctl_replace_fw (unsigned long arg) {
struct mpt_ioctl_replace_fw karg;
MPT_ADAPTER *ioc;
int iocnum;
int newFwSize;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_replace_fw))) {
return -EFAULT;
}
if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) |... | static int mptctl_replace_fw (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_replace_fw karg;
int newFwSize;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_replace_fw))) {
return -EFAULT;
}
if (ioc->cached_fw == NULL) {
return 0;
}
mpt_free_fw_memory(ioc);
... | static int mptctl_replace_fw (unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mpt_ioctl_replace_fw karg;
MPT_ADAPTER *ioc;
int iocnum;
int newFwSize;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_replace_fw))) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT *... | static int mptctl_replace_fw (MPT_ADAPTER *ioc, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mpt_ioctl_replace_fw karg;
int newFwSize;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_replace_fw))) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return -EF... | -static int mptctl_replace_fw (unsigned long arg) {
+static int mptctl_replace_fw (MPT_ADAPTER *ioc, unsigned long arg) {
struct mpt_ioctl_replace_fw karg;
- MPT_ADAPTER *ioc;
- int iocnum;
int newFwSize;
if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_replace_fw))) {
return -EFAUL... |
CVE-2020-12653 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/mwifiex/scan.c | mwifiex_cmd_append_vsie_tlv | int mwifiex_cmd_append_vsie_tlv(struct mwifiex_private *priv, u16 vsie_mask, u8 **buffer) {
int id, ret_len = 0;
struct mwifiex_ie_types_vendor_param_set *vs_param_set;
if (!buffer) {
return 0;
}
if (!(*buffer)) {
return 0;
}
for (id = 0; id < MWIFIEX_MAX_VSIE_NUM; id++) {
... | int mwifiex_cmd_append_vsie_tlv(struct mwifiex_private *priv, u16 vsie_mask, u8 **buffer) {
int id, ret_len = 0;
struct mwifiex_ie_types_vendor_param_set *vs_param_set;
if (!buffer) {
return 0;
}
if (!(*buffer)) {
return 0;
}
for (id = 0; id < MWIFIEX_MAX_VSIE_NUM; id++) {
... | int mwifiex_cmd_append_vsie_tlv(struct mwifiex_private *priv, u16 vsie_mask, u8 **buffer) {
int id, ret_len = 0;
struct mwifiex_ie_types_vendor_param_set *vs_param_set;
if (!buffer) {
return 0;
}
if (!(*buffer)) {
return 0;
}
for (id = 0; id < MWIFIEX_MAX_VSIE_NUM; id++) {
... | int mwifiex_cmd_append_vsie_tlv(struct mwifiex_private *priv, u16 vsie_mask, u8 **buffer) {
int id, ret_len = 0;
struct mwifiex_ie_types_vendor_param_set *vs_param_set;
if (!buffer) {
return 0;
}
if (!(*buffer)) {
return 0;
}
for (id = 0; id < MWIFIEX_MAX_VSIE_NUM; id++) {
... | int mwifiex_cmd_append_vsie_tlv(struct mwifiex_private *priv, u16 vsie_mask, u8 **buffer) {
for (id = 0; id < MWIFIEX_MAX_VSIE_NUM; id++) {
if (priv->vs_ie[id].mask & vsie_mask) {
vs_param_set->header.len = cpu_to_le16((((u16) priv->vs_ie[id].ie[1])
... | int mwifiex_cmd_append_vsie_tlv(struct mwifiex_private *priv, u16 vsie_mask, u8 **buffer) {
for (id = 0; id < MWIFIEX_MAX_VSIE_NUM; id++) {
if (priv->vs_ie[id].mask & vsie_mask) {
vs_param_set->header.len = cpu_to_le16((((u16) priv->vs_ie[id].ie[1])
... | int mwifiex_cmd_append_vsie_tlv(struct mwifiex_private *priv, u16 vsie_mask, u8 **buffer) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (id = 0; id < MWIFIEX_MAX_VSIE_NUM; id++) {
if (priv->vs_ie[id].mask & vsie_mask) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vs_param_set->he... | int mwifiex_cmd_append_vsie_tlv(struct mwifiex_private *priv, u16 vsie_mask, u8 **buffer) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (id = 0; id < MWIFIEX_MAX_VSIE_NUM; id++) {
if (priv->vs_ie[id].mask & vsie_mask) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vs_param_set->he... | int mwifiex_cmd_append_vsie_tlv(struct mwifiex_private *priv, u16 vsie_mask, u8 **buffer) {
for (id = 0; id < MWIFIEX_MAX_VSIE_NUM; id++) {
if (priv->vs_ie[id].mask & vsie_mask) {
vs_param_set->header.len = cpu_to_le16((((u16) priv->vs_ie[id].ie[1])
... |
CVE-2020-12654 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/mwifiex/wmm.c | mwifiex_ret_wmm_get_status | int mwifiex_ret_wmm_get_status(struct mwifiex_private *priv, const struct host_cmd_ds_command *resp) {
u8 *curr = (u8 *) &resp->params.get_wmm_status;
uint16_t resp_len = le16_to_cpu(resp->size), tlv_len;
int mask = IEEE80211_WMM_IE_AP_QOSFO_PARAM_SET_CNT_MASK;
bool valid = true;
struct mwifiex_ie_t... | int mwifiex_ret_wmm_get_status(struct mwifiex_private *priv, const struct host_cmd_ds_command *resp) {
u8 *curr = (u8 *) &resp->params.get_wmm_status;
uint16_t resp_len = le16_to_cpu(resp->size), tlv_len;
int mask = IEEE80211_WMM_IE_AP_QOSFO_PARAM_SET_CNT_MASK;
bool valid = true;
struct mwifiex_ie_t... | int mwifiex_ret_wmm_get_status(struct mwifiex_private *priv, const struct host_cmd_ds_command *resp) {
u8 *curr = (u8 *) &resp->params.get_wmm_status;
uint16_t resp_len = le16_to_cpu(resp->size), tlv_len;
bool valid = true;
struct mwifiex_ie_types_data *tlv_hdr;
struct mwifiex_ie_types_wmm_queue_sta... | int mwifiex_ret_wmm_get_status(struct mwifiex_private *priv, const struct host_cmd_ds_command *resp) {
u8 *curr = (u8 *) &resp->params.get_wmm_status;
uint16_t resp_len = le16_to_cpu(resp->size), tlv_len;
bool valid = true;
struct mwifiex_ie_types_data *tlv_hdr;
struct mwifiex_ie_types_wmm_queue_sta... | int mwifiex_ret_wmm_get_status(struct mwifiex_private *priv, const struct host_cmd_ds_command *resp) {
while ((resp_len >= sizeof(tlv_hdr->header)) && valid) {
tlv_hdr = (struct mwifiex_ie_types_data *) curr;
tlv_len = le16_to_cpu(tlv_hdr->header.len);
if (resp_len < tlv_len + sizeof(tlv_hdr... | int mwifiex_ret_wmm_get_status(struct mwifiex_private *priv, const struct host_cmd_ds_command *resp) {
while ((resp_len >= sizeof(tlv_hdr->header)) && valid) {
tlv_hdr = (struct mwifiex_ie_types_data *) curr;
tlv_len = le16_to_cpu(tlv_hdr->header.len);
if (resp_len < tlv_len + sizeof(tlv_hdr... | int mwifiex_ret_wmm_get_status(struct mwifiex_private *priv, const struct host_cmd_ds_command *resp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while ((resp_len >= sizeof(tlv_hdr->header)) && valid) {
tlv_hdr = (struct mwifiex_ie_types_data *) curr;
tlv_len = le16_to_cpu(tlv_hdr->header.len... | int mwifiex_ret_wmm_get_status(struct mwifiex_private *priv, const struct host_cmd_ds_command *resp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while ((resp_len >= sizeof(tlv_hdr->header)) && valid) {
tlv_hdr = (struct mwifiex_ie_types_data *) curr;
tlv_len = le16_to_cpu(tlv_hdr->header.len... | int mwifiex_ret_wmm_get_status(struct mwifiex_private *priv, const struct host_cmd_ds_command *resp) {
while ((resp_len >= sizeof(tlv_hdr->header)) && valid) {
tlv_hdr = (struct mwifiex_ie_types_data *) curr;
tlv_len = le16_to_cpu(tlv_hdr->header.len);
if (resp_len < tlv_len + sizeof(tl... |
CVE-2020-12657 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | block/bfq-iosched.c | bfq_idle_slice_timer | static enum hrtimer_restart bfq_idle_slice_timer(struct hrtimer *timer) {
struct bfq_data *bfqd = container_of(timer, struct bfq_data, idle_slice_timer);
struct bfq_queue *bfqq = bfqd->in_service_queue;
if (bfqq) {
bfq_idle_slice_timer_body(bfqq);
}
return HRTIMER_NORESTART;
} | static enum hrtimer_restart bfq_idle_slice_timer(struct hrtimer *timer) {
struct bfq_data *bfqd = container_of(timer, struct bfq_data, idle_slice_timer);
struct bfq_queue *bfqq = bfqd->in_service_queue;
if (bfqq) {
bfq_idle_slice_timer_body(bfqd, bfqq);
}
return HRTIMER_NORESTART;
} | static enum hrtimer_restart bfq_idle_slice_timer(struct hrtimer *timer) {
struct bfq_data *bfqd = container_of(timer, struct bfq_data, idle_slice_timer);
struct bfq_queue *bfqq = bfqd->in_service_queue;
if (bfqq) {
bfq_idle_slice_timer_body(bfqq);
}
return HRTIMER_NORESTART;
} | static enum hrtimer_restart bfq_idle_slice_timer(struct hrtimer *timer) {
struct bfq_data *bfqd = container_of(timer, struct bfq_data, idle_slice_timer);
struct bfq_queue *bfqq = bfqd->in_service_queue;
if (bfqq) {
bfq_idle_slice_timer_body(bfqd, bfqq);
}
return HRTIMER_NORESTART;
} | static enum hrtimer_restart bfq_idle_slice_timer(struct hrtimer *timer) {
struct bfq_data *bfqd = container_of(timer, struct bfq_data, idle_slice_timer);
struct bfq_queue *bfqq = bfqd->in_service_queue;
if (bfqq) {
bfq_idle_slice_timer_body(bfqq);
}
return HRTIMER_NORESTART;
}
| static enum hrtimer_restart bfq_idle_slice_timer(struct hrtimer *timer) {
struct bfq_data *bfqd = container_of(timer, struct bfq_data, idle_slice_timer);
struct bfq_queue *bfqq = bfqd->in_service_queue;
if (bfqq) {
bfq_idle_slice_timer_body(bfqd, bfqq);
}
return HRTIMER_NORESTART;
}
| static enum hrtimer_restart bfq_idle_slice_timer(struct hrtimer *timer) {
struct bfq_data *bfqd = container_of(timer, struct bfq_data, idle_slice_timer);
struct bfq_queue *bfqq = bfqd->in_service_queue;
if (bfqq) {
bfq_idle_slice_timer_body(bfqq);
}
return HRTIMER_NORESTART;
}
| static enum hrtimer_restart bfq_idle_slice_timer(struct hrtimer *timer) {
struct bfq_data *bfqd = container_of(timer, struct bfq_data, idle_slice_timer);
struct bfq_queue *bfqq = bfqd->in_service_queue;
if (bfqq) {
bfq_idle_slice_timer_body(bfqd, bfqq);
}
return HRTIMER_NORESTART;
} | static enum hrtimer_restart bfq_idle_slice_timer(struct hrtimer *timer) {
struct bfq_data *bfqd = container_of(timer, struct bfq_data, idle_slice_timer);
struct bfq_queue *bfqq = bfqd->in_service_queue;
if (bfqq) {
- bfq_idle_slice_timer_body(bfqq);
+ bfq_idle_slice_timer_body(bfqd, bfqq);... |
CVE-2020-12657 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | block/bfq-iosched.c | bfq_idle_slice_timer_body | static void bfq_idle_slice_timer_body(struct bfq_queue *bfqq) {
struct bfq_data *bfqd = bfqq->bfqd;
enum bfqq_expiration reason;
unsigned long flags;
spin_lock_irqsave(&bfqd->lock, flags);
bfq_clear_bfqq_wait_request(bfqq);
if (bfqq != bfqd->in_service_queue) {
spin_unlock_irqrestore(&bf... | static void bfq_idle_slice_timer_body(struct bfq_data *bfqd, struct bfq_queue *bfqq) {
enum bfqq_expiration reason;
unsigned long flags;
spin_lock_irqsave(&bfqd->lock, flags);
if (bfqq != bfqd->in_service_queue) {
spin_unlock_irqrestore(&bfqd->lock, flags);
return;
}
bfq_clear_bf... | static void bfq_idle_slice_timer_body(struct bfq_queue *bfqq) {
struct bfq_data *bfqd = bfqq->bfqd;
enum bfqq_expiration reason;
unsigned long flags;
spin_lock_irqsave(&bfqd->lock, flags);
bfq_clear_bfqq_wait_request(bfqq);
if (bfqq != bfqd->in_service_queue) {
spin_unlock_irqrestore(&bf... | static void bfq_idle_slice_timer_body(struct bfq_data *bfqd, struct bfq_queue *bfqq) {
enum bfqq_expiration reason;
unsigned long flags;
spin_lock_irqsave(&bfqd->lock, flags);
if (bfqq != bfqd->in_service_queue) {
spin_unlock_irqrestore(&bfqd->lock, flags);
return;
}
bfq_clear_bf... | static void bfq_idle_slice_timer_body(struct bfq_queue *bfqq) {
struct bfq_data *bfqd = bfqq->bfqd;
enum bfqq_expiration reason;
spin_lock_irqsave(&bfqd->lock, flags);
bfq_clear_bfqq_wait_request(bfqq);
if (bfqq != bfqd->in_service_queue) {
spin_unlock_irqrestore(&bfqd->lock, flags);
... | static void bfq_idle_slice_timer_body(struct bfq_data *bfqd, struct bfq_queue *bfqq) {
enum bfqq_expiration reason;
spin_lock_irqsave(&bfqd->lock, flags);
if (bfqq != bfqd->in_service_queue) {
spin_unlock_irqrestore(&bfqd->lock, flags);
return;
}
bfq_clear_bfqq_wait_request(bfqq);
... | static void bfq_idle_slice_timer_body(struct bfq_queue *bfqq) {
struct bfq_data *bfqd = bfqq->bfqd;
enum bfqq_expiration reason;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
spin_lock_irqsave(&bfqd->lock, flags);
bfq_clear_bfqq_wait_request(bfqq);
if (bfqq != bfqd->in_service_queue) {
s... | static void bfq_idle_slice_timer_body(struct bfq_data *bfqd, struct bfq_queue *bfqq) {
enum bfqq_expiration reason;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
spin_lock_irqsave(&bfqd->lock, flags);
if (bfqq != bfqd->in_service_queue) {
spin_unlock_irqrestore(&bfqd->lock, flags);
retur... | -static void bfq_idle_slice_timer_body(struct bfq_queue *bfqq) {
- struct bfq_data *bfqd = bfqq->bfqd;
+static void bfq_idle_slice_timer_body(struct bfq_data *bfqd, struct bfq_queue *bfqq) {
enum bfqq_expiration reason;
spin_lock_irqsave(&bfqd->lock, flags);
- bfq_clear_bfqq_wait_request(bfqq);
if ... |
CVE-2020-12659 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/xdp/xdp_umem.c | xdp_umem_reg | static int xdp_umem_reg(struct xdp_umem *umem, struct xdp_umem_reg *mr) {
u32 chunk_size = mr->chunk_size, headroom = mr->headroom;
unsigned int chunks, chunks_per_page;
u64 addr = mr->addr, size = mr->len;
int size_chk, err, i;
if (chunk_size < XDP_UMEM_M_CHUNK_SIZE || chunk_size > PAGE_SIZE) {
... | static int xdp_umem_reg(struct xdp_umem *umem, struct xdp_umem_reg *mr) {
u32 chunk_size = mr->chunk_size, headroom = mr->headroom;
unsigned int chunks, chunks_per_page;
u64 addr = mr->addr, size = mr->len;
int err, i;
if (chunk_size < XDP_UMEM_M_CHUNK_SIZE || chunk_size > PAGE_SIZE) {
retur... | static int xdp_umem_reg(struct xdp_umem *umem, struct xdp_umem_reg *mr) {
bool unaligned_chunks = mr->flags & XDP_UMEM_UNALIGNED_CHUNK_FLAG;
u32 chunk_size = mr->chunk_size, headroom = mr->headroom;
unsigned int chunks, chunks_per_page;
u64 addr = mr->addr, size = mr->len;
int size_chk, err;
if ... | static int xdp_umem_reg(struct xdp_umem *umem, struct xdp_umem_reg *mr) {
bool unaligned_chunks = mr->flags & XDP_UMEM_UNALIGNED_CHUNK_FLAG;
u32 chunk_size = mr->chunk_size, headroom = mr->headroom;
unsigned int chunks, chunks_per_page;
u64 addr = mr->addr, size = mr->len;
int err;
if (chunk_siz... | static int xdp_umem_reg(struct xdp_umem *umem, struct xdp_umem_reg *mr) {
u32 chunk_size = mr->chunk_size, headroom = mr->headroom;
u64 addr = mr->addr, size = mr->len;
int size_chk, err, i;
if (chunk_size < XDP_UMEM_M_CHUNK_SIZE || chunk_size > PAGE_SIZE) {
return -EVAL;
}
if (!is_power... | static int xdp_umem_reg(struct xdp_umem *umem, struct xdp_umem_reg *mr) {
u32 chunk_size = mr->chunk_size, headroom = mr->headroom;
u64 addr = mr->addr, size = mr->len;
int err, i;
if (chunk_size < XDP_UMEM_M_CHUNK_SIZE || chunk_size > PAGE_SIZE) {
return -EVAL;
}
if (!is_power_of_2(chun... | static int xdp_umem_reg(struct xdp_umem *umem, struct xdp_umem_reg *mr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u32 chunk_size = mr->chunk_size, headroom = mr->headroom;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u64 addr = mr->addr, size = mr->len;
int size_chk, err;
if (chunk_size <... | static int xdp_umem_reg(struct xdp_umem *umem, struct xdp_umem_reg *mr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u32 chunk_size = mr->chunk_size, headroom = mr->headroom;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u64 addr = mr->addr, size = mr->len;
int err;
if (chunk_size < XDP_UMEM_... | static int xdp_umem_reg(struct xdp_umem *umem, struct xdp_umem_reg *mr) {
u32 chunk_size = mr->chunk_size, headroom = mr->headroom;
u64 addr = mr->addr, size = mr->len;
- int size_chk, err, i;
+ int err, i;
if (chunk_size < XDP_UMEM_M_CHUNK_SIZE || chunk_size > PAGE_SIZE) {
return -EVAL;
... |
CVE-2020-12768 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kvm/svm.c | svm_cpu_init | static int svm_cpu_init(int cpu) {
struct svm_cpu_data *sd;
int r;
sd = kzalloc(sizeof(struct svm_cpu_data), GFP_KERNEL);
if (!sd) {
return -ENOMEM;
}
sd->cpu = cpu;
r = -ENOMEM;
sd->save_area = alloc_page(GFP_KERNEL);
if (!sd->save_area) {
goto err_1;
}
if (s... | static int svm_cpu_init(int cpu) {
struct svm_cpu_data *sd;
sd = kzalloc(sizeof(struct svm_cpu_data), GFP_KERNEL);
if (!sd) {
return -ENOMEM;
}
sd->cpu = cpu;
sd->save_area = alloc_page(GFP_KERNEL);
if (!sd->save_area) {
goto free_cpu_data;
}
if (svm_sev_enabled()) {
... | static int svm_cpu_init(int cpu) {
struct svm_cpu_data *sd;
int r;
sd = kzalloc(sizeof(struct svm_cpu_data), GFP_KERNEL);
if (!sd) {
return -ENOMEM;
}
sd->cpu = cpu;
r = -ENOMEM;
sd->save_area = alloc_page(GFP_KERNEL);
if (!sd->save_area) {
goto err_1;
}
if (s... | static int svm_cpu_init(int cpu) {
struct svm_cpu_data *sd;
sd = kzalloc(sizeof(struct svm_cpu_data), GFP_KERNEL);
if (!sd) {
return -ENOMEM;
}
sd->cpu = cpu;
sd->save_area = alloc_page(GFP_KERNEL);
if (!sd->save_area) {
goto free_cpu_data;
}
if (svm_sev_enabled()) {
... | static int svm_cpu_init(int cpu) {
struct svm_cpu_data *sd;
int r;
sd = kzalloc(sizeof(struct svm_cpu_data), GFP_KERNEL);
if (!sd) {
return -ENOMEM;
}
sd->cpu = cpu;
r = -ENOMEM;
sd->save_area = alloc_page(GFP_KERNEL);
if (!sd->save_area) {
goto err_1;
}
if (s... | static int svm_cpu_init(int cpu) {
struct svm_cpu_data *sd;
sd = kzalloc(sizeof(struct svm_cpu_data), GFP_KERNEL);
if (!sd) {
return -ENOMEM;
}
sd->cpu = cpu;
sd->save_area = alloc_page(GFP_KERNEL);
if (!sd->save_area) {
goto free_cpu_data;
}
if (svm_sev_enabled()) {
... | static int svm_cpu_init(int cpu) {
struct svm_cpu_data *sd;
int r;
sd = kzalloc(sizeof(struct svm_cpu_data), GFP_KERNEL);
if (!sd) {
return -ENOMEM;
}
sd->cpu = cpu;
r = -ENOMEM;
sd->save_area = alloc_page(GFP_KERNEL);
if (!sd->save_area) {
goto err_1;
}
if (s... | static int svm_cpu_init(int cpu) {
struct svm_cpu_data *sd;
sd = kzalloc(sizeof(struct svm_cpu_data), GFP_KERNEL);
if (!sd) {
return -ENOMEM;
}
sd->cpu = cpu;
sd->save_area = alloc_page(GFP_KERNEL);
if (!sd->save_area) {
goto free_cpu_data;
}
if (svm_sev_enabled()) {
... | static int svm_cpu_init(int cpu) {
struct svm_cpu_data *sd;
- int r;
sd = kzalloc(sizeof(struct svm_cpu_data), GFP_KERNEL);
if (!sd) {
return -ENOMEM;
}
sd->cpu = cpu;
- r = -ENOMEM;
sd->save_area = alloc_page(GFP_KERNEL);
if (!sd->save_area) {
- goto err_1;
+ ... |
CVE-2020-12770 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/scsi/sg.c | sg_write | static ssize_t sg_write(struct file *filp, const char *buf, size_t count, loff_t * ppos) {
int mxsize, cmd_size, k;
int input_size, blocking;
unsigned char opcode;
Sg_device *sdp;
Sg_fd *sfp;
Sg_request *srp;
struct sg_header old_hdr;
sg_io_hdr_t *hp;
unsigned char cmnd[SG_MAX_CDB_SI... | static ssize_t sg_write(struct file *filp, const char *buf, size_t count, loff_t * ppos) {
int mxsize, cmd_size, k;
int input_size, blocking;
unsigned char opcode;
Sg_device *sdp;
Sg_fd *sfp;
Sg_request *srp;
struct sg_header old_hdr;
sg_io_hdr_t *hp;
unsigned char cmnd[SG_MAX_CDB_SI... | static ssize_t sg_write(struct file *filp, const char *buf, size_t count, loff_t * ppos) {
int mxsize, cmd_size, k;
int input_size, blocking;
unsigned char opcode;
Sg_device *sdp;
Sg_fd *sfp;
Sg_request *srp;
struct sg_header old_hdr;
sg_io_hdr_t *hp;
unsigned char cmnd[MAX_COMMAND_S... | static ssize_t sg_write(struct file *filp, const char *buf, size_t count, loff_t * ppos) {
int mxsize, cmd_size, k;
int input_size, blocking;
unsigned char opcode;
Sg_device *sdp;
Sg_fd *sfp;
Sg_request *srp;
struct sg_header old_hdr;
sg_io_hdr_t *hp;
unsigned char cmnd[MAX_COMMAND_S... | static ssize_t sg_write(struct file *filp, const char *buf, size_t count, loff_t * ppos) {
retval = sg_check_file_access(filp, __func__);
if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp))) {
return -ENXIO;
}
if (!(srp = sg_add_request(sfp))) {
return -EDOM;
}
... | static ssize_t sg_write(struct file *filp, const char *buf, size_t count, loff_t * ppos) {
retval = sg_check_file_access(filp, __func__);
if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp))) {
return -ENXIO;
}
if (!(srp = sg_add_request(sfp))) {
return -EDOM;
}
... | static ssize_t sg_write(struct file *filp, const char *buf, size_t count, loff_t * ppos) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
retval = sg_check_file_access(filp, __func__);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp))) {... | static ssize_t sg_write(struct file *filp, const char *buf, size_t count, loff_t * ppos) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
retval = sg_check_file_access(filp, __func__);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp))) {... | static ssize_t sg_write(struct file *filp, const char *buf, size_t count, loff_t * ppos) {
retval = sg_check_file_access(filp, __func__);
if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp))) {
return -ENXIO;
}
if (!(srp = sg_add_request(sfp))) {
return -EDOM;
... |
CVE-2020-12771 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/md/bcache/btree.c | btree_gc_coalesce | static int btree_gc_coalesce(struct btree *b, struct btree_op *op, struct gc_stat *gc, struct gc_merge_info *r) {
unsigned int i, nodes = 0, keys = 0, blocks;
struct btree *new_nodes[GC_MERGE_NODES];
struct keylist keylist;
struct closure cl;
struct bkey *k;
bch_keylist_init(&keylist);
if (b... | static int btree_gc_coalesce(struct btree *b, struct btree_op *op, struct gc_stat *gc, struct gc_merge_info *r) {
unsigned int i, nodes = 0, keys = 0, blocks;
struct btree *new_nodes[GC_MERGE_NODES];
struct keylist keylist;
struct closure cl;
struct bkey *k;
bch_keylist_init(&keylist);
if (b... | static int btree_gc_coalesce(struct btree *b, struct btree_op *op, struct gc_stat *gc, struct gc_merge_info *r) {
unsigned i, nodes = 0, keys = 0, blocks;
struct btree *new_nodes[GC_MERGE_NODES];
struct keylist keylist;
struct closure cl;
struct bkey *k;
bch_keylist_init(&keylist);
if (btree... | static int btree_gc_coalesce(struct btree *b, struct btree_op *op, struct gc_stat *gc, struct gc_merge_info *r) {
unsigned i, nodes = 0, keys = 0, blocks;
struct btree *new_nodes[GC_MERGE_NODES];
struct keylist keylist;
struct closure cl;
struct bkey *k;
bch_keylist_init(&keylist);
if (btree... | static int btree_gc_coalesce(struct btree *b, struct btree_op *op, struct gc_stat *gc, struct gc_merge_info *r) {
unsigned int i, nodes = 0, keys = 0, blocks;
if (btree_check_reserve(b, NULL)) {
return 0;
}
while (nodes < GC_MERGE_NODES && !IS_ERR_OR_NULL(r[nodes].b))
keys += r[nodes++].... | static int btree_gc_coalesce(struct btree *b, struct btree_op *op, struct gc_stat *gc, struct gc_merge_info *r) {
unsigned int i, nodes = 0, keys = 0, blocks;
if (btree_check_reserve(b, NULL)) {
return 0;
}
while (nodes < GC_MERGE_NODES && !IS_ERR_OR_NULL(r[nodes].b))
keys += r[nodes++].... | static int btree_gc_coalesce(struct btree *b, struct btree_op *op, struct gc_stat *gc, struct gc_merge_info *r) {
unsigned i, nodes = 0, keys = 0, blocks;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (btree_check_reserve(b, NULL)) {
return 0;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT ... | static int btree_gc_coalesce(struct btree *b, struct btree_op *op, struct gc_stat *gc, struct gc_merge_info *r) {
unsigned i, nodes = 0, keys = 0, blocks;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (btree_check_reserve(b, NULL)) {
return 0;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT ... | static int btree_gc_coalesce(struct btree *b, struct btree_op *op, struct gc_stat *gc, struct gc_merge_info *r) {
unsigned int i, nodes = 0, keys = 0, blocks;
if (btree_check_reserve(b, NULL)) {
return 0;
}
while (nodes < GC_MERGE_NODES && !IS_ERR_OR_NULL(r[nodes].b))
keys += r[no... |
CVE-2020-12826 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/exec.c | setup_new_exec | void setup_new_exec(struct linux_binprm * bprm) {
bprm->secureexec |= bprm->cap_elevated;
if (bprm->secureexec) {
current->pdeath_signal = 0;
if (bprm->rlim_stack.rlim_cur > _STK_LIM) {
bprm->rlim_stack.rlim_cur = _STK_LIM;
}
}
arch_pick_mmap_layout(current->mm, &bprm... | void setup_new_exec(struct linux_binprm * bprm) {
bprm->secureexec |= bprm->cap_elevated;
if (bprm->secureexec) {
current->pdeath_signal = 0;
if (bprm->rlim_stack.rlim_cur > _STK_LIM) {
bprm->rlim_stack.rlim_cur = _STK_LIM;
}
}
arch_pick_mmap_layout(current->mm, &bprm... | void setup_new_exec(struct linux_binprm * bprm) {
arch_pick_mmap_layout(current->mm);
current->sas_ss_sp = current->sas_ss_size = 0;
if (uid_eq(current_euid(), current_uid()) && gid_eq(current_egid(), current_gid())) {
set_dumpable(current->mm, SUID_DUMP_USER);
} else {
set_dumpable(curr... | void setup_new_exec(struct linux_binprm * bprm) {
arch_pick_mmap_layout(current->mm);
current->sas_ss_sp = current->sas_ss_size = 0;
if (uid_eq(current_euid(), current_uid()) && gid_eq(current_egid(), current_gid())) {
set_dumpable(current->mm, SUID_DUMP_USER);
} else {
set_dumpable(curr... | void setup_new_exec(struct linux_binprm * bprm) {
__set_task_comm(current, kbasename(bprm->filename), true);
current->mm->task_size = TASK_SIZE;
current->self_exec_id++;
flush_signal_handlers(current, 0);
}
| void setup_new_exec(struct linux_binprm * bprm) {
__set_task_comm(current, kbasename(bprm->filename), true);
current->mm->task_size = TASK_SIZE;
WRITE_ONCE(current->self_exec_id, current->self_exec_id + 1);
flush_signal_handlers(current, 0);
}
| void setup_new_exec(struct linux_binprm * bprm) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
__set_task_comm(current, kbasename(bprm->filename), true);
current->mm->task_size = TASK_SIZE;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
current->self_exec_id++;
flush_signal_handlers(current, 0);... | void setup_new_exec(struct linux_binprm * bprm) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
__set_task_comm(current, kbasename(bprm->filename), true);
current->mm->task_size = TASK_SIZE;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ACCESS_ONCE(current->self_exec_id) = current->self_exec_id + 1;... | void setup_new_exec(struct linux_binprm * bprm) {
__set_task_comm(current, kbasename(bprm->filename), true);
current->mm->task_size = TASK_SIZE;
- current->self_exec_id++;
+ WRITE_ONCE(current->self_exec_id, current->self_exec_id + 1);
flush_signal_handlers(current, 0);
} |
CVE-2020-12888 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/vfio/pci/vfio_pci.c | vfio_pci_ioctl | static long vfio_pci_ioctl(void *device_data, unsigned int cmd, unsigned long arg) {
struct vfio_pci_device *vdev = device_data;
unsigned long minsz;
if (cmd == VFIO_DEVICE_GET_FO) {
struct vfio_device_info info;
minsz = offsetofend(struct vfio_device_info, num_irqs);
if (copy_from_u... | static long vfio_pci_ioctl(void *device_data, unsigned int cmd, unsigned long arg) {
struct vfio_pci_device *vdev = device_data;
unsigned long minsz;
if (cmd == VFIO_DEVICE_GET_FO) {
struct vfio_device_info info;
minsz = offsetofend(struct vfio_device_info, num_irqs);
if (copy_from_u... | static long vfio_pci_ioctl(void *device_data, unsigned int cmd, unsigned long arg) {
struct vfio_pci_device *vdev = device_data;
unsigned long minsz;
if (cmd == VFIO_DEVICE_GET_FO) {
struct vfio_device_info info;
minsz = offsetofend(struct vfio_device_info, num_irqs);
if (copy_from_u... | static long vfio_pci_ioctl(void *device_data, unsigned int cmd, unsigned long arg) {
struct vfio_pci_device *vdev = device_data;
unsigned long minsz;
if (cmd == VFIO_DEVICE_GET_FO) {
struct vfio_device_info info;
minsz = offsetofend(struct vfio_device_info, num_irqs);
if (copy_from_u... | static long vfio_pci_ioctl(void *device_data, unsigned int cmd, unsigned long arg) {
struct vfio_pci_device *vdev = device_data;
if (cmd == VFIO_DEVICE_GET_FO) {
if (copy_from_user(&info, (void *)arg, minsz)) {
return -EFAULT;
}
if (info.argsz < minsz) {
return -E... | static long vfio_pci_ioctl(void *device_data, unsigned int cmd, unsigned long arg) {
struct vfio_pci_device *vdev = device_data;
if (cmd == VFIO_DEVICE_GET_FO) {
if (copy_from_user(&info, (void *)arg, minsz)) {
return -EFAULT;
}
if (info.argsz < minsz) {
return -E... | static long vfio_pci_ioctl(void *device_data, unsigned int cmd, unsigned long arg) {
struct vfio_pci_device *vdev = device_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (cmd == VFIO_DEVICE_GET_FO) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (copy_from_user(&info, (void *)arg, min... | static long vfio_pci_ioctl(void *device_data, unsigned int cmd, unsigned long arg) {
struct vfio_pci_device *vdev = device_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (cmd == VFIO_DEVICE_GET_FO) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (copy_from_user(&info, (void *)arg, min... | static long vfio_pci_ioctl(void *device_data, unsigned int cmd, unsigned long arg) {
struct vfio_pci_device *vdev = device_data;
if (cmd == VFIO_DEVICE_GET_FO) {
if (copy_from_user(&info, (void *)arg, minsz)) {
return -EFAULT;
}
if (info.argsz < minsz) {
r... |
CVE-2020-12888 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/vfio/pci/vfio_pci.c | vfio_pci_mmap_fault | static vm_fault_t vfio_pci_mmap_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
struct vfio_pci_device *vdev = vma->vm_private_data;
if (vfio_pci_add_vma(vdev, vma)) {
return VM_FAULT_OOM;
}
if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, vma->vm_end - vma->vm_sta... | static vm_fault_t vfio_pci_mmap_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
struct vfio_pci_device *vdev = vma->vm_private_data;
vm_fault_t ret = VM_FAULT_NOPAGE;
mutex_lock(&vdev->vma_lock);
down_read(&vdev->memory_lock);
if (!__vfio_pci_memory_enabled(vdev)) {
... | static int vfio_pci_mmap_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
struct vfio_pci_device *vdev = vma->vm_private_data;
if (vfio_pci_add_vma(vdev, vma)) {
return VM_FAULT_OOM;
}
if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, vma->vm_end - vma->vm_start, vma... | static int vfio_pci_mmap_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
struct vfio_pci_device *vdev = vma->vm_private_data;
int ret = VM_FAULT_NOPAGE;
mutex_lock(&vdev->vma_lock);
down_read(&vdev->memory_lock);
if (!__vfio_pci_memory_enabled(vdev)) {
ret = VM_FAULT... | static vm_fault_t vfio_pci_mmap_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
struct vfio_pci_device *vdev = vma->vm_private_data;
if (vfio_pci_add_vma(vdev, vma)) {
return VM_FAULT_OOM;
}
if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, vma->vm_end - vma->vm_sta... | static vm_fault_t vfio_pci_mmap_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
struct vfio_pci_device *vdev = vma->vm_private_data;
vm_fault_t ret = VM_FAULT_NOPAGE;
mutex_lock(&vdev->vma_lock);
down_read(&vdev->memory_lock);
if (!__vfio_pci_memory_enabled(vdev)) {
... | static int vfio_pci_mmap_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
struct vfio_pci_device *vdev = vma->vm_private_data;
if (vfio_pci_add_vma(vdev, vma)) {
return VM_FAULT_OOM;
}
if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, vma->vm_end - vma->vm_start, vma... | static int vfio_pci_mmap_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
struct vfio_pci_device *vdev = vma->vm_private_data;
int ret = VM_FAULT_NOPAGE;
mutex_lock(&vdev->vma_lock);
down_read(&vdev->memory_lock);
if (!__vfio_pci_memory_enabled(vdev)) {
ret = VM_FAULT... | static vm_fault_t vfio_pci_mmap_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
struct vfio_pci_device *vdev = vma->vm_private_data;
- if (vfio_pci_add_vma(vdev, vma)) {
- return VM_FAULT_OOM;
+ vm_fault_t ret = VM_FAULT_NOPAGE;
+ mutex_lock(&vdev->vma_lock);
+ down_re... |
CVE-2020-12888 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/vfio/pci/vfio_pci.c | vfio_pci_probe | static int vfio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) {
struct vfio_pci_device *vdev;
struct iommu_group *group;
int ret;
if (pdev->hdr_type != PCI_HEADER_TYPE_NORMAL) {
return -EVAL;
}
if (pci_num_vf(pdev)) {
pci_warn(pdev, "Cannot bind to PF with SR-IO... | static int vfio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) {
struct vfio_pci_device *vdev;
struct iommu_group *group;
int ret;
if (pdev->hdr_type != PCI_HEADER_TYPE_NORMAL) {
return -EVAL;
}
if (pci_num_vf(pdev)) {
pci_warn(pdev, "Cannot bind to PF with SR-IO... | static int vfio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) {
struct vfio_pci_device *vdev;
struct iommu_group *group;
int ret;
if (pdev->hdr_type != PCI_HEADER_TYPE_NORMAL) {
return -EVAL;
}
group = vfio_iommu_group_get(&pdev->dev);
if (!group) {
return -... | static int vfio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) {
struct vfio_pci_device *vdev;
struct iommu_group *group;
int ret;
if (pdev->hdr_type != PCI_HEADER_TYPE_NORMAL) {
return -EVAL;
}
group = vfio_iommu_group_get(&pdev->dev);
if (!group) {
return -... | static int vfio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) {
vdev = kzalloc(sizeof(*vdev), GFP_KERNEL);
if (!vdev) {
return -ENOMEM;
}
IT_LIST_HEAD(&vdev->vma_list);
ret = vfio_add_group_dev(&pdev->dev, &vfio_pci_ops, vdev);
}
| static int vfio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) {
vdev = kzalloc(sizeof(*vdev), GFP_KERNEL);
if (!vdev) {
return -ENOMEM;
}
IT_LIST_HEAD(&vdev->vma_list);
init_rwsem(&vdev->memory_lock);
ret = vfio_add_group_dev(&pdev->dev, &vfio_pci_ops, vdev);
}
| static int vfio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vdev = kzalloc(sizeof(*vdev), GFP_KERNEL);
if (!vdev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return -ENOMEM;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMME... | static int vfio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vdev = kzalloc(sizeof(*vdev), GFP_KERNEL);
if (!vdev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return -ENOMEM;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMME... | static int vfio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) {
vdev = kzalloc(sizeof(*vdev), GFP_KERNEL);
if (!vdev) {
return -ENOMEM;
}
IT_LIST_HEAD(&vdev->vma_list);
+ init_rwsem(&vdev->memory_lock);
ret = vfio_add_group_dev(&pdev->dev, &vfio_pci_ops, vdev);
} |
CVE-2020-12888 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/vfio/pci/vfio_pci_config.c | vfio_af_config_write | static int vfio_af_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
u8 *ctrl = vdev->vconfig + pos - offset + PCI_AF_CTRL;
count = vfio_default_config_write(vdev, pos, count, perm, offset, val);
if (count < 0) {
return count;
}
... | static int vfio_af_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
u8 *ctrl = vdev->vconfig + pos - offset + PCI_AF_CTRL;
count = vfio_default_config_write(vdev, pos, count, perm, offset, val);
if (count < 0) {
return count;
}
... | static int vfio_af_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
u8 *ctrl = vdev->vconfig + pos - offset + PCI_AF_CTRL;
count = vfio_default_config_write(vdev, pos, count, perm, offset, val);
if (count < 0) {
return count;
}
... | static int vfio_af_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
u8 *ctrl = vdev->vconfig + pos - offset + PCI_AF_CTRL;
count = vfio_default_config_write(vdev, pos, count, perm, offset, val);
if (count < 0) {
return count;
}
... | static int vfio_af_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
u8 *ctrl = vdev->vconfig + pos - offset + PCI_AF_CTRL;
count = vfio_default_config_write(vdev, pos, count, perm, offset, val);
if (*ctrl & PCI_AF_CTRL_FLR) {
if (!ret &... | static int vfio_af_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
u8 *ctrl = vdev->vconfig + pos - offset + PCI_AF_CTRL;
count = vfio_default_config_write(vdev, pos, count, perm, offset, val);
if (*ctrl & PCI_AF_CTRL_FLR) {
if (!ret &... | static int vfio_af_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
u8 *ctrl = vdev->vconfig + pos - offset + PCI_AF_CTRL;
count = vfio_default_config_write(vdev, pos, count, perm, offset, val);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int vfio_af_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
u8 *ctrl = vdev->vconfig + pos - offset + PCI_AF_CTRL;
count = vfio_default_config_write(vdev, pos, count, perm, offset, val);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int vfio_af_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
u8 *ctrl = vdev->vconfig + pos - offset + PCI_AF_CTRL;
count = vfio_default_config_write(vdev, pos, count, perm, offset, val);
if (*ctrl & PCI_AF_CTRL_FLR) {
if (!... |
CVE-2020-12888 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/vfio/pci/vfio_pci_config.c | vfio_basic_config_write | static int vfio_basic_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
struct pci_dev *pdev = vdev->pdev;
__le16 *virt_cmd;
u16 new_cmd = 0;
int ret;
virt_cmd = (__le16 *)&vdev->vconfig[PCI_COMMAND];
if (offset == PCI_COMMAND) {
... | static int vfio_basic_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
struct pci_dev *pdev = vdev->pdev;
__le16 *virt_cmd;
u16 new_cmd = 0;
int ret;
virt_cmd = (__le16 *)&vdev->vconfig[PCI_COMMAND];
if (offset == PCI_COMMAND) {
... | static int vfio_basic_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
struct pci_dev *pdev = vdev->pdev;
__le16 *virt_cmd;
u16 new_cmd = 0;
int ret;
virt_cmd = (__le16 *)&vdev->vconfig[PCI_COMMAND];
if (offset == PCI_COMMAND) {
... | static int vfio_basic_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
struct pci_dev *pdev = vdev->pdev;
__le16 *virt_cmd;
u16 new_cmd = 0;
int ret;
virt_cmd = (__le16 *)&vdev->vconfig[PCI_COMMAND];
if (offset == PCI_COMMAND) {
... | static int vfio_basic_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
struct pci_dev *pdev = vdev->pdev;
if (offset == PCI_COMMAND) {
ret = pci_user_read_config_word(pdev, PCI_COMMAND, &phys_cmd);
new_cmd = le32_to_cpu(val);
... | static int vfio_basic_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
struct pci_dev *pdev = vdev->pdev;
if (offset == PCI_COMMAND) {
ret = pci_user_read_config_word(pdev, PCI_COMMAND, &phys_cmd);
new_cmd = le32_to_cpu(val);
... | static int vfio_basic_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
struct pci_dev *pdev = vdev->pdev;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (offset == PCI_COMMAND) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret =... | static int vfio_basic_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
struct pci_dev *pdev = vdev->pdev;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (offset == PCI_COMMAND) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret =... | static int vfio_basic_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
struct pci_dev *pdev = vdev->pdev;
if (offset == PCI_COMMAND) {
ret = pci_user_read_config_word(pdev, PCI_COMMAND, &phys_cmd);
new_cmd = le32_to_cpu(val);
+... |
CVE-2020-12888 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/vfio/pci/vfio_pci_config.c | vfio_exp_config_write | static int vfio_exp_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
__le16 *ctrl = (__le16 *)(vdev->vconfig + pos - offset + PCI_EXP_DEVCTL);
int readrq = le16_to_cpu(*ctrl) & PCI_EXP_DEVCTL_READRQ;
count = vfio_default_config_write(vdev, pos,... | static int vfio_exp_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
__le16 *ctrl = (__le16 *)(vdev->vconfig + pos - offset + PCI_EXP_DEVCTL);
int readrq = le16_to_cpu(*ctrl) & PCI_EXP_DEVCTL_READRQ;
count = vfio_default_config_write(vdev, pos,... | static int vfio_exp_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
__le16 *ctrl = (__le16 *)(vdev->vconfig + pos - offset + PCI_EXP_DEVCTL);
int readrq = le16_to_cpu(*ctrl) & PCI_EXP_DEVCTL_READRQ;
count = vfio_default_config_write(vdev, pos,... | static int vfio_exp_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
__le16 *ctrl = (__le16 *)(vdev->vconfig + pos - offset + PCI_EXP_DEVCTL);
int readrq = le16_to_cpu(*ctrl) & PCI_EXP_DEVCTL_READRQ;
count = vfio_default_config_write(vdev, pos,... | static int vfio_exp_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
__le16 *ctrl = (__le16 *)(vdev->vconfig + pos - offset + PCI_EXP_DEVCTL);
count = vfio_default_config_write(vdev, pos, count, perm, offset, val);
if (*ctrl & cpu_to_le16(PCI_E... | static int vfio_exp_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
__le16 *ctrl = (__le16 *)(vdev->vconfig + pos - offset + PCI_EXP_DEVCTL);
count = vfio_default_config_write(vdev, pos, count, perm, offset, val);
if (*ctrl & cpu_to_le16(PCI_E... | static int vfio_exp_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
__le16 *ctrl = (__le16 *)(vdev->vconfig + pos - offset + PCI_EXP_DEVCTL);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
count = vfio_default_config_write(vdev, pos, count, per... | static int vfio_exp_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
__le16 *ctrl = (__le16 *)(vdev->vconfig + pos - offset + PCI_EXP_DEVCTL);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
count = vfio_default_config_write(vdev, pos, count, per... | static int vfio_exp_config_write(struct vfio_pci_device *vdev, int pos, int count, struct perm_bits *perm, int offset, __le32 val) {
__le16 *ctrl = (__le16 *)(vdev->vconfig + pos - offset + PCI_EXP_DEVCTL);
count = vfio_default_config_write(vdev, pos, count, perm, offset, val);
if (*ctrl & cpu_to_le16(P... |
CVE-2020-12888 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/vfio/pci/vfio_pci_intrs.c | vfio_msi_disable | static void vfio_msi_disable(struct vfio_pci_device *vdev, bool msix) {
struct pci_dev *pdev = vdev->pdev;
int i;
for (i = 0; i < vdev->num_ctx; i++) {
vfio_virqfd_disable(&vdev->ctx[i].unmask);
vfio_virqfd_disable(&vdev->ctx[i].mask);
}
vfio_msi_set_block(vdev, 0, vdev->num_ctx, NUL... | static void vfio_msi_disable(struct vfio_pci_device *vdev, bool msix) {
struct pci_dev *pdev = vdev->pdev;
int i;
u16 cmd;
for (i = 0; i < vdev->num_ctx; i++) {
vfio_virqfd_disable(&vdev->ctx[i].unmask);
vfio_virqfd_disable(&vdev->ctx[i].mask);
}
vfio_msi_set_block(vdev, 0, vdev-... | static void vfio_msi_disable(struct vfio_pci_device *vdev, bool msix) {
struct pci_dev *pdev = vdev->pdev;
int i;
for (i = 0; i < vdev->num_ctx; i++) {
vfio_virqfd_disable(&vdev->ctx[i].unmask);
vfio_virqfd_disable(&vdev->ctx[i].mask);
}
vfio_msi_set_block(vdev, 0, vdev->num_ctx, NUL... | static void vfio_msi_disable(struct vfio_pci_device *vdev, bool msix) {
struct pci_dev *pdev = vdev->pdev;
int i;
u16 cmd;
for (i = 0; i < vdev->num_ctx; i++) {
vfio_virqfd_disable(&vdev->ctx[i].unmask);
vfio_virqfd_disable(&vdev->ctx[i].mask);
}
vfio_msi_set_block(vdev, 0, vdev-... | static void vfio_msi_disable(struct vfio_pci_device *vdev, bool msix) {
int i;
for (i = 0; i < vdev->num_ctx; i++) {
}
vfio_msi_set_block(vdev, 0, vdev->num_ctx, NULL, msix);
pci_free_irq_vectors(pdev);
kfree(vdev->ctx);
}
| static void vfio_msi_disable(struct vfio_pci_device *vdev, bool msix) {
int i;
u16 cmd;
for (i = 0; i < vdev->num_ctx; i++) {
}
vfio_msi_set_block(vdev, 0, vdev->num_ctx, NULL, msix);
cmd = vfio_pci_memory_lock_and_enable(vdev);
pci_free_irq_vectors(pdev);
vfio_pci_memory_unlock_and_rest... | static void vfio_msi_disable(struct vfio_pci_device *vdev, bool msix) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int i;
for (i = 0; i < vdev->num_ctx; i++) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
vfio_msi_set_block(vdev, 0, vdev->num_ctx, NULL, msix);
pci_free_irq_vectors(pdev... | static void vfio_msi_disable(struct vfio_pci_device *vdev, bool msix) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int i;
u16 cmd;
for (i = 0; i < vdev->num_ctx; i++) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
vfio_msi_set_block(vdev, 0, vdev->num_ctx, NULL, msix);
cmd = vfio_p... | static void vfio_msi_disable(struct vfio_pci_device *vdev, bool msix) {
int i;
+ u16 cmd;
for (i = 0; i < vdev->num_ctx; i++) {
}
vfio_msi_set_block(vdev, 0, vdev->num_ctx, NULL, msix);
+ cmd = vfio_pci_memory_lock_and_enable(vdev);
pci_free_irq_vectors(pdev);
+ vfio_pci_memory_unlock... |
CVE-2020-12888 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/vfio/pci/vfio_pci_intrs.c | vfio_msi_enable | static int vfio_msi_enable(struct vfio_pci_device *vdev, int nvec, bool msix) {
struct pci_dev *pdev = vdev->pdev;
unsigned int flag = msix ? PCI_IRQ_MSIX : PCI_IRQ_MSI;
int ret;
if (!is_irq_none(vdev)) {
return -EVAL;
}
vdev->ctx = kcalloc(nvec, sizeof(struct vfio_pci_irq_ctx), GFP_KERN... | static int vfio_msi_enable(struct vfio_pci_device *vdev, int nvec, bool msix) {
struct pci_dev *pdev = vdev->pdev;
unsigned int flag = msix ? PCI_IRQ_MSIX : PCI_IRQ_MSI;
int ret;
u16 cmd;
if (!is_irq_none(vdev)) {
return -EVAL;
}
vdev->ctx = kcalloc(nvec, sizeof(struct vfio_pci_irq_c... | static int vfio_msi_enable(struct vfio_pci_device *vdev, int nvec, bool msix) {
struct pci_dev *pdev = vdev->pdev;
unsigned int flag = msix ? PCI_IRQ_MSIX : PCI_IRQ_MSI;
int ret;
if (!is_irq_none(vdev)) {
return -EVAL;
}
vdev->ctx = kcalloc(nvec, sizeof(struct vfio_pci_irq_ctx), GFP_KERN... | static int vfio_msi_enable(struct vfio_pci_device *vdev, int nvec, bool msix) {
struct pci_dev *pdev = vdev->pdev;
unsigned int flag = msix ? PCI_IRQ_MSIX : PCI_IRQ_MSI;
int ret;
u16 cmd;
if (!is_irq_none(vdev)) {
return -EVAL;
}
vdev->ctx = kcalloc(nvec, sizeof(struct vfio_pci_irq_c... | static int vfio_msi_enable(struct vfio_pci_device *vdev, int nvec, bool msix) {
int ret;
if (!is_irq_none(vdev)) {
return -EVAL;
}
ret = pci_alloc_irq_vectors(pdev, 1, nvec, flag);
if (ret < nvec) {
if (ret > 0) {
pci_free_irq_vectors(pdev);
}
kfree(vdev->... | static int vfio_msi_enable(struct vfio_pci_device *vdev, int nvec, bool msix) {
int ret;
u16 cmd;
if (!is_irq_none(vdev)) {
return -EVAL;
}
cmd = vfio_pci_memory_lock_and_enable(vdev);
ret = pci_alloc_irq_vectors(pdev, 1, nvec, flag);
if (ret < nvec) {
if (ret > 0) {
... | static int vfio_msi_enable(struct vfio_pci_device *vdev, int nvec, bool msix) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int ret;
if (!is_irq_none(vdev)) {
return -EVAL;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret = pci_alloc_irq_vectors(pdev, 1, nvec, flag);
if (ret < n... | static int vfio_msi_enable(struct vfio_pci_device *vdev, int nvec, bool msix) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int ret;
u16 cmd;
if (!is_irq_none(vdev)) {
return -EVAL;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
cmd = vfio_pci_memory_lock_and_enable(vdev);
ret... | static int vfio_msi_enable(struct vfio_pci_device *vdev, int nvec, bool msix) {
int ret;
+ u16 cmd;
if (!is_irq_none(vdev)) {
return -EVAL;
}
+ cmd = vfio_pci_memory_lock_and_enable(vdev);
ret = pci_alloc_irq_vectors(pdev, 1, nvec, flag);
if (ret < nvec) {
if (ret > 0) ... |
CVE-2020-12888 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/vfio/pci/vfio_pci_intrs.c | vfio_msi_set_vector_signal | static int vfio_msi_set_vector_signal(struct vfio_pci_device *vdev, int vector, int fd, bool msix) {
struct pci_dev *pdev = vdev->pdev;
struct eventfd_ctx *trigger;
int irq, ret;
if (vector < 0 || vector >= vdev->num_ctx) {
return -EVAL;
}
irq = pci_irq_vector(pdev, vector);
if (vdev... | static int vfio_msi_set_vector_signal(struct vfio_pci_device *vdev, int vector, int fd, bool msix) {
struct pci_dev *pdev = vdev->pdev;
struct eventfd_ctx *trigger;
int irq, ret;
u16 cmd;
if (vector < 0 || vector >= vdev->num_ctx) {
return -EVAL;
}
irq = pci_irq_vector(pdev, vector);... | static int vfio_msi_set_vector_signal(struct vfio_pci_device *vdev, int vector, int fd, bool msix) {
struct pci_dev *pdev = vdev->pdev;
struct eventfd_ctx *trigger;
int irq, ret;
if (vector < 0 || vector >= vdev->num_ctx) {
return -EVAL;
}
irq = pci_irq_vector(pdev, vector);
if (vdev... | static int vfio_msi_set_vector_signal(struct vfio_pci_device *vdev, int vector, int fd, bool msix) {
struct pci_dev *pdev = vdev->pdev;
struct eventfd_ctx *trigger;
int irq, ret;
u16 cmd;
if (vector < 0 || vector >= vdev->num_ctx) {
return -EVAL;
}
irq = pci_irq_vector(pdev, vector);... | static int vfio_msi_set_vector_signal(struct vfio_pci_device *vdev, int vector, int fd, bool msix) {
int irq, ret;
if (vector < 0 || vector >= vdev->num_ctx) {
return -EVAL;
}
if (vdev->ctx[vector].trigger) {
irq_bypass_unregister_producer(&vdev->ctx[vector].producer);
free_irq(i... | static int vfio_msi_set_vector_signal(struct vfio_pci_device *vdev, int vector, int fd, bool msix) {
int irq, ret;
u16 cmd;
if (vector < 0 || vector >= vdev->num_ctx) {
return -EVAL;
}
if (vdev->ctx[vector].trigger) {
irq_bypass_unregister_producer(&vdev->ctx[vector].producer);
... | static int vfio_msi_set_vector_signal(struct vfio_pci_device *vdev, int vector, int fd, bool msix) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int irq, ret;
if (vector < 0 || vector >= vdev->num_ctx) {
return -EVAL;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (vdev->ctx[vector... | static int vfio_msi_set_vector_signal(struct vfio_pci_device *vdev, int vector, int fd, bool msix) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int irq, ret;
u16 cmd;
if (vector < 0 || vector >= vdev->num_ctx) {
return -EVAL;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (vde... | static int vfio_msi_set_vector_signal(struct vfio_pci_device *vdev, int vector, int fd, bool msix) {
int irq, ret;
+ u16 cmd;
if (vector < 0 || vector >= vdev->num_ctx) {
return -EVAL;
}
if (vdev->ctx[vector].trigger) {
irq_bypass_unregister_producer(&vdev->ctx[vector].producer... |
CVE-2020-13143 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/usb/gadget/configfs.c | gadget_dev_desc_UDC_store | static ssize_t gadget_dev_desc_UDC_store(struct config_item *item, const char *page, size_t len) {
struct gadget_info *gi = to_gadget_info(item);
char *name;
int ret;
name = kstrdup(page, GFP_KERNEL);
if (!name) {
return -ENOMEM;
}
if (name[len - 1] == '\n') {
name[len - 1] =... | static ssize_t gadget_dev_desc_UDC_store(struct config_item *item, const char *page, size_t len) {
struct gadget_info *gi = to_gadget_info(item);
char *name;
int ret;
if (strlen(page) < len) {
return -EOVERFLOW;
}
name = kstrdup(page, GFP_KERNEL);
if (!name) {
return -ENOMEM;... | static ssize_t gadget_dev_desc_UDC_store(struct gadget_info *gi, const char *page, size_t len) {
char *name;
int ret;
name = kstrdup(page, GFP_KERNEL);
if (!name) {
return -ENOMEM;
}
if (name[len - 1] == '\n') {
name[len - 1] = '\0';
}
mutex_lock(&gi->lock);
if (!strl... | static ssize_t gadget_dev_desc_UDC_store(struct gadget_info *gi, const char *page, size_t len) {
char *name;
int ret;
if (strlen(page) < len) {
return -EOVERFLOW;
}
name = kstrdup(page, GFP_KERNEL);
if (!name) {
return -ENOMEM;
}
if (name[len - 1] == '\n') {
name[... | static ssize_t gadget_dev_desc_UDC_store(struct config_item *item, const char *page, size_t len) {
struct gadget_info *gi = to_gadget_info(item);
int ret;
name = kstrdup(page, GFP_KERNEL);
if (!name) {
return -ENOMEM;
}
if (name[len - 1] == '\n') {
name[len - 1] = '\0';
}
... | static ssize_t gadget_dev_desc_UDC_store(struct config_item *item, const char *page, size_t len) {
struct gadget_info *gi = to_gadget_info(item);
int ret;
if (strlen(page) < len) {
return -EOVERFLOW;
}
name = kstrdup(page, GFP_KERNEL);
if (!name) {
return -ENOMEM;
}
if (n... | static ssize_t gadget_dev_desc_UDC_store(struct gadget_info *gi, const char *page, size_t len) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int ret;
name = kstrdup(page, GFP_KERNEL);
if (!name) {
return -ENOMEM;
}
if (name[len - 1] == '\n') {
name[len - 1] = '\0';
}
/*... | static ssize_t gadget_dev_desc_UDC_store(struct gadget_info *gi, const char *page, size_t len) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int ret;
if (strlen(page) < len) {
return -EOVERFLOW;
}
name = kstrdup(page, GFP_KERNEL);
if (!name) {
return -ENOMEM;
}
if (name... | static ssize_t gadget_dev_desc_UDC_store(struct config_item *item, const char *page, size_t len) {
struct gadget_info *gi = to_gadget_info(item);
int ret;
+ if (strlen(page) < len) {
+ return -EOVERFLOW;
+ }
name = kstrdup(page, GFP_KERNEL);
if (!name) {
return -ENOMEM;
}... |
CVE-2020-13974 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/tty/vt/keyboard.c | k_ascii | static void k_ascii(struct vc_data *vc, unsigned char value, char up_flag) {
int base;
if (up_flag) {
return;
}
if (value < 10) {
base = 10;
} else {
value -= 10;
base = 16;
}
if (npadch == -1) {
npadch = value;
} else {
npadch = npadch * b... | static void k_ascii(struct vc_data *vc, unsigned char value, char up_flag) {
unsigned int base;
if (up_flag) {
return;
}
if (value < 10) {
base = 10;
} else {
value -= 10;
base = 16;
}
if (!npadch_active) {
npadch_value = 0;
npadch_active = tru... | static void k_ascii(struct vc_data *vc, unsigned char value, char up_flag) {
int base;
if (up_flag) {
return;
}
if (value < 10) {
base = 10;
} else {
value -= 10;
base = 16;
}
if (npadch == -1) {
npadch = value;
} else {
npadch = npadch * b... | static void k_ascii(struct vc_data *vc, unsigned char value, char up_flag) {
unsigned int base;
if (up_flag) {
return;
}
if (value < 10) {
base = 10;
} else {
value -= 10;
base = 16;
}
if (!npadch_active) {
npadch_value = 0;
npadch_active = tru... | static void k_ascii(struct vc_data *vc, unsigned char value, char up_flag) {
int base;
if (up_flag) {
return;
}
if (value < 10) {
base = 10;
} else {
value -= 10;
base = 16;
}
if (npadch == -1) {
npadch = value;
} else {
npadch = npadch * b... | static void k_ascii(struct vc_data *vc, unsigned char value, char up_flag) {
unsigned int base;
if (up_flag) {
return;
}
if (value < 10) {
base = 10;
} else {
value -= 10;
base = 16;
}
if (!npadch_active) {
npadch_value = 0;
npadch_active = tru... | static void k_ascii(struct vc_data *vc, unsigned char value, char up_flag) {
int base;
if (up_flag) {
return;
}
if (value < 10) {
base = 10;
} else {
value -= 10;
base = 16;
}
if (npadch == -1) {
npadch = value;
} else {
npadch = npadch * b... | static void k_ascii(struct vc_data *vc, unsigned char value, char up_flag) {
unsigned int base;
if (up_flag) {
return;
}
if (value < 10) {
base = 10;
} else {
value -= 10;
base = 16;
}
if (!npadch_active) {
npadch_value = 0;
npadch_active = tru... | static void k_ascii(struct vc_data *vc, unsigned char value, char up_flag) {
- int base;
+ unsigned int base;
if (up_flag) {
return;
}
if (value < 10) {
base = 10;
} else {
value -= 10;
base = 16;
}
- if (npadch == -1) {
- npadch = value;
- ... |
CVE-2020-13974 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/tty/vt/keyboard.c | k_shift | static void k_shift(struct vc_data *vc, unsigned char value, char up_flag) {
int old_state = shift_state;
if (rep) {
return;
}
if (value == KVAL(K_CAPSSHIFT)) {
value = KVAL(K_SHIFT);
if (!up_flag) {
clr_vc_kbd_led(kbd, VC_CAPSLOCK);
}
}
if (up_flag) {... | static void k_shift(struct vc_data *vc, unsigned char value, char up_flag) {
int old_state = shift_state;
if (rep) {
return;
}
if (value == KVAL(K_CAPSSHIFT)) {
value = KVAL(K_SHIFT);
if (!up_flag) {
clr_vc_kbd_led(kbd, VC_CAPSLOCK);
}
}
if (up_flag) {... | static void k_shift(struct vc_data *vc, unsigned char value, char up_flag) {
int old_state = shift_state;
if (rep) {
return;
}
if (value == KVAL(K_CAPSSHIFT)) {
value = KVAL(K_SHIFT);
if (!up_flag) {
clr_vc_kbd_led(kbd, VC_CAPSLOCK);
}
}
if (up_flag) {... | static void k_shift(struct vc_data *vc, unsigned char value, char up_flag) {
int old_state = shift_state;
if (rep) {
return;
}
if (value == KVAL(K_CAPSSHIFT)) {
value = KVAL(K_SHIFT);
if (!up_flag) {
clr_vc_kbd_led(kbd, VC_CAPSLOCK);
}
}
if (up_flag) {... | static void k_shift(struct vc_data *vc, unsigned char value, char up_flag) {
int old_state = shift_state;
if (value == KVAL(K_CAPSSHIFT)) {
value = KVAL(K_SHIFT);
}
if (shift_down[value]) {
shift_state |= (1 << value);
} else {
shift_state &= ~(1 << value);
}
if (up_f... | static void k_shift(struct vc_data *vc, unsigned char value, char up_flag) {
int old_state = shift_state;
if (value == KVAL(K_CAPSSHIFT)) {
value = KVAL(K_SHIFT);
}
if (shift_down[value]) {
shift_state |= (1 << value);
} else {
shift_state &= ~(1 << value);
}
if (up_f... | static void k_shift(struct vc_data *vc, unsigned char value, char up_flag) {
int old_state = shift_state;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (value == KVAL(K_CAPSSHIFT)) {
value = KVAL(K_SHIFT);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
/* PLACEHOLDER: DO NOT DELETE T... | static void k_shift(struct vc_data *vc, unsigned char value, char up_flag) {
int old_state = shift_state;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (value == KVAL(K_CAPSSHIFT)) {
value = KVAL(K_SHIFT);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
/* PLACEHOLDER: DO NOT DELETE T... | static void k_shift(struct vc_data *vc, unsigned char value, char up_flag) {
int old_state = shift_state;
if (value == KVAL(K_CAPSSHIFT)) {
value = KVAL(K_SHIFT);
}
if (shift_down[value]) {
shift_state |= (1 << value);
} else {
shift_state &= ~(1 << value);
}
- ... |
CVE-2020-14314 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ext4/namei.c | do_split | static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir, struct buffer_head **bh,struct dx_frame *frame, struct dx_hash_info *hinfo) {
unsigned blocksize = dir->i_sb->s_blocksize;
unsigned count, continued;
struct buffer_head *bh2;
ext4_lblk_t newblock;
u32 hash2;
struct dx_... | static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir, struct buffer_head **bh,struct dx_frame *frame, struct dx_hash_info *hinfo) {
unsigned blocksize = dir->i_sb->s_blocksize;
unsigned count, continued;
struct buffer_head *bh2;
ext4_lblk_t newblock;
u32 hash2;
struct dx_... | static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir, struct buffer_head **bh,struct dx_frame *frame, struct dx_hash_info *hinfo) {
unsigned blocksize = dir->i_sb->s_blocksize;
unsigned count, continued;
struct buffer_head *bh2;
ext4_lblk_t newblock;
u32 hash2;
struct dx_... | static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir, struct buffer_head **bh,struct dx_frame *frame, struct dx_hash_info *hinfo) {
unsigned blocksize = dir->i_sb->s_blocksize;
unsigned count, continued;
struct buffer_head *bh2;
ext4_lblk_t newblock;
u32 hash2;
struct dx_... | static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir, struct buffer_head **bh,struct dx_frame *frame, struct dx_hash_info *hinfo) {
unsigned blocksize = dir->i_sb->s_blocksize;
char *data1 = (*bh)->b_data, *data2;
bh2 = ext4_append(handle, dir, &newblock);
if (IS_ERR(bh2)) {
... | static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir, struct buffer_head **bh,struct dx_frame *frame, struct dx_hash_info *hinfo) {
unsigned blocksize = dir->i_sb->s_blocksize;
char *data1 = (*bh)->b_data, *data2;
bh2 = ext4_append(handle, dir, &newblock);
if (IS_ERR(bh2)) {
... | static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir, struct buffer_head **bh,struct dx_frame *frame, struct dx_hash_info *hinfo) {
unsigned blocksize = dir->i_sb->s_blocksize;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
char *data1 = (*bh)->b_data, *data2;
/* PLACEHOLDER: DO N... | static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir, struct buffer_head **bh,struct dx_frame *frame, struct dx_hash_info *hinfo) {
unsigned blocksize = dir->i_sb->s_blocksize;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
char *data1 = (*bh)->b_data, *data2;
/* PLACEHOLDER: DO N... | static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir, struct buffer_head **bh,struct dx_frame *frame, struct dx_hash_info *hinfo) {
unsigned blocksize = dir->i_sb->s_blocksize;
char *data1 = (*bh)->b_data, *data2;
bh2 = ext4_append(handle, dir, &newblock);
if (IS_ERR(bh2)) {... |
CVE-2020-14331 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/video/console/vgacon.c | vgacon_scrollback_update | static void vgacon_scrollback_update(struct vc_data *c, int t, int count) {
void *p;
if (!vgacon_scrollback_cur->data || !vgacon_scrollback_cur->size || c->vc_num != fg_console) {
return;
}
p = (void *) (c->vc_origin + t * c->vc_size_row);
while (count--) {
scr_memcpyw(vgacon_scrollb... | static void vgacon_scrollback_update(struct vc_data *c, int t, int count) {
void *p;
if (!vgacon_scrollback_cur->data || !vgacon_scrollback_cur->size || c->vc_num != fg_console) {
return;
}
p = (void *) (c->vc_origin + t * c->vc_size_row);
while (count--) {
if ((vgacon_scrollback_cur... | static void vgacon_scrollback_update(struct vc_data *c, int t, int count) {
void *p;
if (!vgacon_scrollback_size || c->vc_num != fg_console) {
return;
}
p = (void *) (c->vc_origin + t * c->vc_size_row);
while (count--) {
scr_memcpyw(vgacon_scrollback + vgacon_scrollback_tail, p, c->v... | static void vgacon_scrollback_update(struct vc_data *c, int t, int count) {
void *p;
if (!vgacon_scrollback_size || c->vc_num != fg_console) {
return;
}
p = (void *) (c->vc_origin + t * c->vc_size_row);
while (count--) {
if ((vgacon_scrollback_tail + c->vc_size_row) > vgacon_scrollba... | static void vgacon_scrollback_update(struct vc_data *c, int t, int count) {
if (!vgacon_scrollback_cur->data || !vgacon_scrollback_cur->size || c->vc_num != fg_console) {
return;
}
p = (void *) (c->vc_origin + t * c->vc_size_row);
while (count--) {
scr_memcpyw(vgacon_scrollback_cur->data... | static void vgacon_scrollback_update(struct vc_data *c, int t, int count) {
if (!vgacon_scrollback_cur->data || !vgacon_scrollback_cur->size || c->vc_num != fg_console) {
return;
}
p = (void *) (c->vc_origin + t * c->vc_size_row);
while (count--) {
if ((vgacon_scrollback_cur->tail + c->v... | static void vgacon_scrollback_update(struct vc_data *c, int t, int count) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!vgacon_scrollback_size || c->vc_num != fg_console) {
return;
}
p = (void *) (c->vc_origin + t * c->vc_size_row);
while (count--) {
scr_memcpyw(vgacon_scrollb... | static void vgacon_scrollback_update(struct vc_data *c, int t, int count) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!vgacon_scrollback_size || c->vc_num != fg_console) {
return;
}
p = (void *) (c->vc_origin + t * c->vc_size_row);
while (count--) {
if ((vgacon_scrollback_tai... | static void vgacon_scrollback_update(struct vc_data *c, int t, int count) {
if (!vgacon_scrollback_cur->data || !vgacon_scrollback_cur->size || c->vc_num != fg_console) {
return;
}
p = (void *) (c->vc_origin + t * c->vc_size_row);
while (count--) {
+ if ((vgacon_scrollback_cur->tail... |
CVE-2020-14351 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/events/core.c | perf_mmap_close | static void perf_mmap_close(struct vm_area_struct *vma) {
struct perf_event *event = vma->vm_file->private_data;
struct perf_buffer *rb = ring_buffer_get(event);
struct user_struct *mmap_user = rb->mmap_user;
int mmap_locked = rb->mmap_locked;
unsigned long size = perf_data_size(rb);
if (event->... | static void perf_mmap_close(struct vm_area_struct *vma) {
struct perf_event *event = vma->vm_file->private_data;
struct perf_buffer *rb = ring_buffer_get(event);
struct user_struct *mmap_user = rb->mmap_user;
int mmap_locked = rb->mmap_locked;
unsigned long size = perf_data_size(rb);
bool detach... | static void perf_mmap_close(struct vm_area_struct *vma) {
struct perf_event *event = vma->vm_file->private_data;
struct ring_buffer *rb = ring_buffer_get(event);
struct user_struct *mmap_user = rb->mmap_user;
int mmap_locked = rb->mmap_locked;
unsigned long size = perf_data_size(rb);
if (event->... | static void perf_mmap_close(struct vm_area_struct *vma) {
struct perf_event *event = vma->vm_file->private_data;
struct ring_buffer *rb = ring_buffer_get(event);
struct user_struct *mmap_user = rb->mmap_user;
int mmap_locked = rb->mmap_locked;
unsigned long size = perf_data_size(rb);
bool detach... | static void perf_mmap_close(struct vm_area_struct *vma) {
struct perf_event *event = vma->vm_file->private_data;
struct perf_buffer *rb = ring_buffer_get(event);
unsigned long size = perf_data_size(rb);
if (event->pmu->event_unmapped) {
event->pmu->event_unmapped(event, vma->vm_mm);
}
if... | static void perf_mmap_close(struct vm_area_struct *vma) {
struct perf_event *event = vma->vm_file->private_data;
struct perf_buffer *rb = ring_buffer_get(event);
unsigned long size = perf_data_size(rb);
bool detach_rest = false;
if (event->pmu->event_unmapped) {
event->pmu->event_unmapped(ev... | static void perf_mmap_close(struct vm_area_struct *vma) {
struct perf_event *event = vma->vm_file->private_data;
struct ring_buffer *rb = ring_buffer_get(event);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned long size = perf_data_size(rb);
if (event->pmu->event_unmapped) {
event->pm... | static void perf_mmap_close(struct vm_area_struct *vma) {
struct perf_event *event = vma->vm_file->private_data;
struct ring_buffer *rb = ring_buffer_get(event);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned long size = perf_data_size(rb);
bool detach_rest = false;
if (event->pmu->event... | static void perf_mmap_close(struct vm_area_struct *vma) {
struct perf_event *event = vma->vm_file->private_data;
struct perf_buffer *rb = ring_buffer_get(event);
unsigned long size = perf_data_size(rb);
+ bool detach_rest = false;
if (event->pmu->event_unmapped) {
event->pmu->event_unma... |
CVE-2020-14353 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | security/keys/key.c | key_alloc | struct key *key_alloc(struct key_type *type, const char *desc, kuid_t uid, kgid_t gid, const struct cred *cred, key_perm_t perm, unsigned long flags) {
struct key_user *user = NULL;
struct key *key;
size_t desclen, quotalen;
int ret;
key = ERR_PTR(-EVAL);
if (!desc || !*desc) {
goto erro... | struct key *key_alloc(struct key_type *type, const char *desc, kuid_t uid, kgid_t gid, const struct cred *cred, key_perm_t perm, unsigned long flags) {
struct key_user *user = NULL;
struct key *key;
size_t desclen, quotalen;
int ret;
key = ERR_PTR(-EVAL);
if (!desc || !*desc) {
goto erro... | struct key *key_alloc(struct key_type *type, const char *desc, kuid_t uid, kgid_t gid, const struct cred *cred, key_perm_t perm, unsigned long flags) {
struct key_user *user = NULL;
struct key *key;
size_t desclen, quotalen;
int ret;
key = ERR_PTR(-EVAL);
if (!desc || !*desc) {
goto erro... | struct key *key_alloc(struct key_type *type, const char *desc, kuid_t uid, kgid_t gid, const struct cred *cred, key_perm_t perm, unsigned long flags) {
struct key_user *user = NULL;
struct key *key;
size_t desclen, quotalen;
int ret;
key = ERR_PTR(-EVAL);
if (!desc || !*desc) {
goto erro... | struct key *key_alloc(struct key_type *type, const char *desc, kuid_t uid, kgid_t gid, const struct cred *cred, key_perm_t perm, unsigned long flags) {
if (!(flags & KEY_ALLOC_NOT__QUOTA)) {
}
key = kmem_cache_zalloc(key_jar, GFP_KERNEL);
if (!key) {
goto no_memory_2;
}
if (!(flags & KEY... | struct key *key_alloc(struct key_type *type, const char *desc, kuid_t uid, kgid_t gid, const struct cred *cred, key_perm_t perm, unsigned long flags) {
if (!(flags & KEY_ALLOC_NOT__QUOTA)) {
}
key = kmem_cache_zalloc(key_jar, GFP_KERNEL);
if (!key) {
goto no_memory_2;
}
if (!(flags & KEY... | struct key *key_alloc(struct key_type *type, const char *desc, kuid_t uid, kgid_t gid, const struct cred *cred, key_perm_t perm, unsigned long flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!(flags & KEY_ALLOC_NOT__QUOTA)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
key = kmem_cach... | struct key *key_alloc(struct key_type *type, const char *desc, kuid_t uid, kgid_t gid, const struct cred *cred, key_perm_t perm, unsigned long flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!(flags & KEY_ALLOC_NOT__QUOTA)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
key = kmem_cach... | struct key *key_alloc(struct key_type *type, const char *desc, kuid_t uid, kgid_t gid, const struct cred *cred, key_perm_t perm, unsigned long flags) {
if (!(flags & KEY_ALLOC_NOT__QUOTA)) {
}
key = kmem_cache_zalloc(key_jar, GFP_KERNEL);
if (!key) {
goto no_memory_2;
}
if (!(fla... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.