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-2022-40307 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/firmware/efi/capsule-loader.c | efi_capsule_release | static int efi_capsule_release(struct inode *inode, struct file *file) {
struct capsule_info *cap_info = file->private_data;
kfree(cap_info->pages);
kfree(cap_info->phys);
kfree(file->private_data);
file->private_data = NULL;
return 0;
} | static int efi_capsule_release(struct inode *inode, struct file *file) {
struct capsule_info *cap_info = file->private_data;
if (cap_info->index > 0 && (cap_info->header.headersize == 0 || cap_info->count < cap_info->total_size)) {
pr_err("capsule upload not complete\n");
efi_free_all_buff_pages... | static int efi_capsule_release(struct inode *inode, struct file *file) {
struct capsule_info *cap_info = file->private_data;
kfree(cap_info->pages);
kfree(cap_info->phys);
kfree(file->private_data);
file->private_data = NULL;
return 0;
} | static int efi_capsule_release(struct inode *inode, struct file *file) {
struct capsule_info *cap_info = file->private_data;
if (cap_info->index > 0 && (cap_info->header.headersize == 0 || cap_info->count < cap_info->total_size)) {
pr_err("capsule upload not complete\n");
efi_free_all_buff_pages... | static int efi_capsule_release(struct inode *inode, struct file *file) {
struct capsule_info *cap_info = file->private_data;
kfree(cap_info->pages);
kfree(cap_info->phys);
kfree(file->private_data);
file->private_data = NULL;
return 0;
}
| static int efi_capsule_release(struct inode *inode, struct file *file) {
struct capsule_info *cap_info = file->private_data;
if (cap_info->index > 0 && (cap_info->header.headersize == 0 || cap_info->count < cap_info->total_size)) {
pr_err("capsule upload not complete\n");
efi_free_all_buff_pages... | static int efi_capsule_release(struct inode *inode, struct file *file) {
struct capsule_info *cap_info = file->private_data;
kfree(cap_info->pages);
kfree(cap_info->phys);
kfree(file->private_data);
file->private_data = NULL;
return 0;
}
| static int efi_capsule_release(struct inode *inode, struct file *file) {
struct capsule_info *cap_info = file->private_data;
if (cap_info->index > 0 && (cap_info->header.headersize == 0 || cap_info->count < cap_info->total_size)) {
pr_err("capsule upload not complete\n");
efi_free_all_buff_pages... | static int efi_capsule_release(struct inode *inode, struct file *file) {
struct capsule_info *cap_info = file->private_data;
+ if (cap_info->index > 0 && (cap_info->header.headersize == 0 || cap_info->count < cap_info->total_size)) {
+ pr_err("capsule upload not complete\n");
+ efi_free_all_buff_... |
CVE-2022-40768 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/scsi/stex.c | stex_queuecommand_lck | static int stex_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) {
struct st_hba *hba;
struct Scsi_Host *host;
unsigned int id, lun;
struct req_msg *req;
u16 tag;
host = cmd->device->host;
id = cmd->device->id;
lun = cmd->device->lun;
hba = (struct st_hba *) ... | static int stex_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) {
struct st_hba *hba;
struct Scsi_Host *host;
unsigned int id, lun;
struct req_msg *req;
u16 tag;
host = cmd->device->host;
id = cmd->device->id;
lun = cmd->device->lun;
hba = (struct st_hba *) ... | static int stex_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) {
struct st_hba *hba;
struct Scsi_Host *host;
unsigned int id, lun;
struct req_msg *req;
u16 tag;
host = cmd->device->host;
id = cmd->device->id;
lun = cmd->device->lun;
hba = (struct st_hba *) ... | static int stex_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) {
struct st_hba *hba;
struct Scsi_Host *host;
unsigned int id, lun;
struct req_msg *req;
u16 tag;
host = cmd->device->host;
id = cmd->device->id;
lun = cmd->device->lun;
hba = (struct st_hba *) ... | static int stex_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) {
host = cmd->device->host;
switch (cmd->cmnd[0]) {
case PASSTHRU_CMD:
if (cmd->cmnd[1] == PASSTHRU_GET_DRVVER) {
struct st_drvver ver;
size_t cp_len = sizeof(ver);
ver.major... | static int stex_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) {
host = cmd->device->host;
switch (cmd->cmnd[0]) {
case PASSTHRU_CMD:
if (cmd->cmnd[1] == PASSTHRU_GET_DRVVER) {
const struct st_drvver ver = {
.major = ST_VER_MAJOR, .minor = ST_VE... | static int stex_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
host = cmd->device->host;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (cmd->cmnd[0]) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case PASSTHRU_CM... | static int stex_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
host = cmd->device->host;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (cmd->cmnd[0]) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case PASSTHRU_CM... | static int stex_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) {
host = cmd->device->host;
switch (cmd->cmnd[0]) {
case PASSTHRU_CMD:
if (cmd->cmnd[1] == PASSTHRU_GET_DRVVER) {
- struct st_drvver ver;
+ const struct st_drvver ver = {
+ ... |
CVE-2022-40768 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | include/scsi/scsi_cmnd.h | scsi_sg_copy_from_buffer | static inline int scsi_sg_copy_from_buffer(struct scsi_cmnd *cmd, void *buf, int buflen) {
return sg_copy_from_buffer(scsi_sglist(cmd), scsi_sg_count(cmd), buf, buflen);
} | static inline int scsi_sg_copy_from_buffer(struct scsi_cmnd *cmd, const void *buf, int buflen) {
return sg_copy_from_buffer(scsi_sglist(cmd), scsi_sg_count(cmd), buf, buflen);
} | static inline int scsi_sg_copy_from_buffer(struct scsi_cmnd *cmd, void *buf, int buflen) {
return sg_copy_from_buffer(scsi_sglist(cmd), scsi_sg_count(cmd), buf, buflen);
} | static inline int scsi_sg_copy_from_buffer(struct scsi_cmnd *cmd, const void *buf, int buflen) {
return sg_copy_from_buffer(scsi_sglist(cmd), scsi_sg_count(cmd), buf, buflen);
} | static inline int scsi_sg_copy_from_buffer(struct scsi_cmnd *cmd, void *buf, int buflen) {
return sg_copy_from_buffer(scsi_sglist(cmd), scsi_sg_count(cmd), buf, buflen);
}
| static inline int scsi_sg_copy_from_buffer(struct scsi_cmnd *cmd, const void *buf, int buflen) {
return sg_copy_from_buffer(scsi_sglist(cmd), scsi_sg_count(cmd), buf, buflen);
}
| static inline int scsi_sg_copy_from_buffer(struct scsi_cmnd *cmd, void *buf, int buflen) {
return sg_copy_from_buffer(scsi_sglist(cmd), scsi_sg_count(cmd), buf, buflen);
}
| static inline int scsi_sg_copy_from_buffer(struct scsi_cmnd *cmd, const void *buf, int buflen) {
return sg_copy_from_buffer(scsi_sglist(cmd), scsi_sg_count(cmd), buf, buflen);
} | -static inline int scsi_sg_copy_from_buffer(struct scsi_cmnd *cmd, void *buf, int buflen) {
+static inline int scsi_sg_copy_from_buffer(struct scsi_cmnd *cmd, const void *buf, int buflen) {
return sg_copy_from_buffer(scsi_sglist(cmd), scsi_sg_count(cmd), buf, buflen);
} |
CVE-2022-4095 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/staging/rtl8712/rtl8712_cmd.c | cmd_hdl_filter | static struct cmd_obj *cmd_hdl_filter(struct _adapter *padapter, struct cmd_obj *pcmd) {
struct cmd_obj *pcmd_r;
if (!pcmd) {
return pcmd;
}
pcmd_r = NULL;
switch (pcmd->cmdcode) {
case GEN_CMD_CODE(_Read_MACREG):
read_macreg_hdl(padapter, (u8 *)pcmd);
pcmd_r = pcmd;
... | static struct cmd_obj *cmd_hdl_filter(struct _adapter *padapter, struct cmd_obj *pcmd) {
struct cmd_obj *pcmd_r;
if (!pcmd) {
return pcmd;
}
pcmd_r = NULL;
switch (pcmd->cmdcode) {
case GEN_CMD_CODE(_Read_BBREG):
read_bbreg_hdl(padapter, (u8 *)pcmd);
break;
case GEN_C... | static struct cmd_obj *cmd_hdl_filter(struct _adapter *padapter, struct cmd_obj *pcmd) {
struct cmd_obj *pcmd_r;
if (!pcmd) {
return pcmd;
}
pcmd_r = NULL;
switch (pcmd->cmdcode) {
case GEN_CMD_CODE(_Read_MACREG):
read_macreg_hdl(padapter, (u8 *)pcmd);
pcmd_r = pcmd;
... | static struct cmd_obj *cmd_hdl_filter(struct _adapter *padapter, struct cmd_obj *pcmd) {
struct cmd_obj *pcmd_r;
if (!pcmd) {
return pcmd;
}
pcmd_r = NULL;
switch (pcmd->cmdcode) {
case GEN_CMD_CODE(_Read_BBREG):
read_bbreg_hdl(padapter, (u8 *)pcmd);
break;
case GEN_C... | static struct cmd_obj *cmd_hdl_filter(struct _adapter *padapter, struct cmd_obj *pcmd) {
if (!pcmd) {
return pcmd;
}
switch (pcmd->cmdcode) {
case GEN_CMD_CODE(_Read_MACREG):
read_macreg_hdl(padapter, (u8 *)pcmd);
pcmd_r = pcmd;
break;
case GEN_CMD_CODE(_Write_MACREG)... | static struct cmd_obj *cmd_hdl_filter(struct _adapter *padapter, struct cmd_obj *pcmd) {
if (!pcmd) {
return pcmd;
}
switch (pcmd->cmdcode) {
case GEN_CMD_CODE(_Read_BBREG):
break;
}
return pcmd_r;
}
| static struct cmd_obj *cmd_hdl_filter(struct _adapter *padapter, struct cmd_obj *pcmd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!pcmd) {
return pcmd;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (pcmd->cmdcode) {
case GEN_CMD_CODE(_Read_MACREG):
read_macreg_h... | static struct cmd_obj *cmd_hdl_filter(struct _adapter *padapter, struct cmd_obj *pcmd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!pcmd) {
return pcmd;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (pcmd->cmdcode) {
case GEN_CMD_CODE(_Read_BBREG):
/* PLACEHOLDER: DO... | static struct cmd_obj *cmd_hdl_filter(struct _adapter *padapter, struct cmd_obj *pcmd) {
if (!pcmd) {
return pcmd;
}
switch (pcmd->cmdcode) {
- case GEN_CMD_CODE(_Read_MACREG):
- read_macreg_hdl(padapter, (u8 *)pcmd);
- pcmd_r = pcmd;
- break;
- case GEN_CMD_CODE(_Wri... |
CVE-2022-40982 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kernel/cpu/bugs.c | cpu_select_mitigations | void cpu_select_mitigations(void) {
if (cpu_feature_enabled(X86_FEATURE_MSR_SPEC_CTRL)) {
rdmsrl(MSR_IA32_SPEC_CTRL, x86_spec_ctrl_base);
x86_spec_ctrl_base &= ~SPEC_CTRL_MITIGATIONS_MASK;
}
spectre_v1_select_mitigation();
spectre_v2_select_mitigation();
retbleed_select_mitigation();... | void cpu_select_mitigations(void) {
if (cpu_feature_enabled(X86_FEATURE_MSR_SPEC_CTRL)) {
rdmsrl(MSR_IA32_SPEC_CTRL, x86_spec_ctrl_base);
x86_spec_ctrl_base &= ~SPEC_CTRL_MITIGATIONS_MASK;
}
spectre_v1_select_mitigation();
spectre_v2_select_mitigation();
retbleed_select_mitigation();... | void cpu_select_mitigations(void) {
if (cpu_feature_enabled(X86_FEATURE_MSR_SPEC_CTRL)) {
rdmsrl(MSR_IA32_SPEC_CTRL, x86_spec_ctrl_base);
x86_spec_ctrl_base &= ~SPEC_CTRL_MITIGATIONS_MASK;
}
spectre_v1_select_mitigation();
spectre_v2_select_mitigation();
retbleed_select_mitigation();... | void cpu_select_mitigations(void) {
if (cpu_feature_enabled(X86_FEATURE_MSR_SPEC_CTRL)) {
rdmsrl(MSR_IA32_SPEC_CTRL, x86_spec_ctrl_base);
x86_spec_ctrl_base &= ~SPEC_CTRL_MITIGATIONS_MASK;
}
spectre_v1_select_mitigation();
spectre_v2_select_mitigation();
retbleed_select_mitigation();... | void cpu_select_mitigations(void) {
srbds_select_mitigation();
}
| void cpu_select_mitigations(void) {
srbds_select_mitigation();
gds_select_mitigation();
}
| void cpu_select_mitigations(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
srbds_select_mitigation();
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| void cpu_select_mitigations(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
srbds_select_mitigation();
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
gds_select_mitigation();
} | void cpu_select_mitigations(void) {
srbds_select_mitigation();
+ gds_select_mitigation();
} |
CVE-2022-40982 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kernel/cpu/bugs.c | cpu_show_common | static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr, char *buf, unsigned int bug) {
if (!boot_cpu_has_bug(bug)) {
return sprintf(buf, "Not affected\n");
}
switch (bug) {
case X86_BUG_CPU_MELTDOWN:
if (boot_cpu_has(X86_FEATURE_PTI)) {
return sprint... | static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr, char *buf, unsigned int bug) {
if (!boot_cpu_has_bug(bug)) {
return sprintf(buf, "Not affected\n");
}
switch (bug) {
case X86_BUG_CPU_MELTDOWN:
if (boot_cpu_has(X86_FEATURE_PTI)) {
return sprint... | static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr, char *buf, unsigned int bug) {
if (!boot_cpu_has_bug(bug)) {
return sysfs_emit(buf, "Not affected\n");
}
switch (bug) {
case X86_BUG_CPU_MELTDOWN:
if (boot_cpu_has(X86_FEATURE_PTI)) {
return sys... | static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr, char *buf, unsigned int bug) {
if (!boot_cpu_has_bug(bug)) {
return sysfs_emit(buf, "Not affected\n");
}
switch (bug) {
case X86_BUG_CPU_MELTDOWN:
if (boot_cpu_has(X86_FEATURE_PTI)) {
return sys... | static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr, char *buf, unsigned int bug) {
switch (bug) {
default:
break;
}
}
| static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr, char *buf, unsigned int bug) {
switch (bug) {
case X86_BUG_GDS:
return gds_show_state(buf);
default:
break;
}
}
| static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr, char *buf, unsigned int bug) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (bug) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
default:
break;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr, char *buf, unsigned int bug) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (bug) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case X86_BUG_GDS:
return gds_show_state(buf);
default:
break;
... | static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr, char *buf, unsigned int bug) {
switch (bug) {
+ case X86_BUG_GDS:
+ return gds_show_state(buf);
default:
break;
}
} |
CVE-2022-40982 | 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(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(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(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(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(cpu_vuln_whitelist, NO_SPECULATION)) {
return;
}
if (ia32_cap & ARCH_CAP_IBRS_ALL) {
setup_force_cpu_cap(X86_FEATURE_IBRS_ENHANCED);
}
if (!cpu_matches(cpu_vuln_whitelist... | 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_SPECULATION)) {
return;
}
if (ia32_cap & ARCH_CAP_IBRS_ALL) {
setup_force_cpu_cap(X86_FEATURE_IBRS_ENHANCED);
}
if (!cpu_matches(cpu_vuln_whitelist... | static void cpu_set_bug_bits(struct cpuinfo_x86 *c) {
u64 ia32_cap = x86_read_arch_cap_msr();
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (cpu_matches(cpu_vuln_whitelist, NO_SPECULATION)) {
return;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if ((ia32_cap & ARCH_CAP_IBRS_ALL) ||... | static void cpu_set_bug_bits(struct cpuinfo_x86 *c) {
u64 ia32_cap = x86_read_arch_cap_msr();
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (cpu_matches(cpu_vuln_whitelist, NO_SPECULATION)) {
return;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if ((ia32_cap & ARCH_CAP_IBRS_ALL) ||... | 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_SPECULATION)) {
return;
}
if (ia32_cap & ARCH_CAP_IBRS_ALL) {
setup_force_cpu_cap(X86_FEATURE_IBRS_ENHANCED);
}
if (!cpu_matches(cpu_vuln_... |
CVE-2022-40982 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kernel/cpu/common.c | identify_secondary_cpu | void identify_secondary_cpu(struct cpuinfo_x86 *c) {
BUG_ON(c == &boot_cpu_data);
identify_cpu(c);
enable_sep_cpu();
mtrr_ap_init();
validate_apic_and_package_id(c);
x86_spec_ctrl_setup_ap();
update_srbds_msr();
} | void identify_secondary_cpu(struct cpuinfo_x86 *c) {
BUG_ON(c == &boot_cpu_data);
identify_cpu(c);
enable_sep_cpu();
mtrr_ap_init();
validate_apic_and_package_id(c);
x86_spec_ctrl_setup_ap();
update_srbds_msr();
if (boot_cpu_has_bug(X86_BUG_GDS)) {
update_gds_msr();
}
} | void identify_secondary_cpu(struct cpuinfo_x86 *c) {
BUG_ON(c == &boot_cpu_data);
identify_cpu(c);
enable_sep_cpu();
validate_apic_and_package_id(c);
x86_spec_ctrl_setup_ap();
update_srbds_msr();
tsx_ap_init();
} | void identify_secondary_cpu(struct cpuinfo_x86 *c) {
BUG_ON(c == &boot_cpu_data);
identify_cpu(c);
enable_sep_cpu();
validate_apic_and_package_id(c);
x86_spec_ctrl_setup_ap();
update_srbds_msr();
if (boot_cpu_has_bug(X86_BUG_GDS)) {
update_gds_msr();
}
tsx_ap_init();
} | void identify_secondary_cpu(struct cpuinfo_x86 *c) {
BUG_ON(c == &boot_cpu_data);
identify_cpu(c);
enable_sep_cpu();
mtrr_ap_init();
validate_apic_and_package_id(c);
x86_spec_ctrl_setup_ap();
update_srbds_msr();
}
| void identify_secondary_cpu(struct cpuinfo_x86 *c) {
BUG_ON(c == &boot_cpu_data);
identify_cpu(c);
enable_sep_cpu();
mtrr_ap_init();
validate_apic_and_package_id(c);
x86_spec_ctrl_setup_ap();
update_srbds_msr();
if (boot_cpu_has_bug(X86_BUG_GDS)) {
update_gds_msr();
}
}
| void identify_secondary_cpu(struct cpuinfo_x86 *c) {
BUG_ON(c == &boot_cpu_data);
identify_cpu(c);
enable_sep_cpu();
validate_apic_and_package_id(c);
x86_spec_ctrl_setup_ap();
update_srbds_msr();
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| void identify_secondary_cpu(struct cpuinfo_x86 *c) {
BUG_ON(c == &boot_cpu_data);
identify_cpu(c);
enable_sep_cpu();
validate_apic_and_package_id(c);
x86_spec_ctrl_setup_ap();
update_srbds_msr();
if (boot_cpu_has_bug(X86_BUG_GDS)) {
update_gds_msr();
}
/* PLACEHOLDER: DO NOT ... | void identify_secondary_cpu(struct cpuinfo_x86 *c) {
BUG_ON(c == &boot_cpu_data);
identify_cpu(c);
enable_sep_cpu();
mtrr_ap_init();
validate_apic_and_package_id(c);
x86_spec_ctrl_setup_ap();
update_srbds_msr();
+ if (boot_cpu_has_bug(X86_BUG_GDS)) {
+ update_gds_msr();
+ ... |
CVE-2022-41218 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/dvb-core/dmxdev.c | dvb_demux_open | static int dvb_demux_open(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dmxdev *dmxdev = dvbdev->priv;
int i;
struct dmxdev_filter *dmxdevfilter;
if (!dmxdev->filter) {
return -EVAL;
}
if (mutex_lock_interruptible(&dmxdev->mutex)) {
... | static int dvb_demux_open(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dmxdev *dmxdev = dvbdev->priv;
int i;
struct dmxdev_filter *dmxdevfilter;
if (!dmxdev->filter) {
return -EVAL;
}
if (mutex_lock_interruptible(&dmxdev->mutex)) {
... | static int dvb_demux_open(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dmxdev *dmxdev = dvbdev->priv;
int i;
struct dmxdev_filter *dmxdevfilter;
if (!dmxdev->filter) {
return -EVAL;
}
if (mutex_lock_interruptible(&dmxdev->mutex)) {
... | static int dvb_demux_open(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dmxdev *dmxdev = dvbdev->priv;
int i;
struct dmxdev_filter *dmxdevfilter;
if (!dmxdev->filter) {
return -EVAL;
}
if (mutex_lock_interruptible(&dmxdev->mutex)) {
... | static int dvb_demux_open(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dmxdev *dmxdev = dvbdev->priv;
if (mutex_lock_interruptible(&dmxdev->mutex)) {
return -ERESTARTSYS;
}
for (i = 0; i < dmxdev->filternum; i++)
if (dmxdev->filter[... | static int dvb_demux_open(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dmxdev *dmxdev = dvbdev->priv;
if (mutex_lock_interruptible(&dmxdev->mutex)) {
return -ERESTARTSYS;
}
if (dmxdev->exit) {
mutex_unlock(&dmxdev->mutex);
r... | static int dvb_demux_open(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dmxdev *dmxdev = dvbdev->priv;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (mutex_lock_interruptible(&dmxdev->mutex)) {
return -ERESTARTSYS;
}
for (i = 0; i < d... | static int dvb_demux_open(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dmxdev *dmxdev = dvbdev->priv;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (mutex_lock_interruptible(&dmxdev->mutex)) {
return -ERESTARTSYS;
}
if (dmxdev->exit)... | static int dvb_demux_open(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dmxdev *dmxdev = dvbdev->priv;
if (mutex_lock_interruptible(&dmxdev->mutex)) {
return -ERESTARTSYS;
}
+ if (dmxdev->exit) {
+ mutex_unlock(&dmxdev->mutex);
+... |
CVE-2022-41218 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/dvb-core/dmxdev.c | dvb_dmxdev_release | void dvb_dmxdev_release(struct dmxdev *dmxdev) {
dmxdev->exit = 1;
if (dmxdev->dvbdev->users > 1) {
wait_event(dmxdev->dvbdev->wait_queue, dmxdev->dvbdev->users == 1);
}
if (dmxdev->dvr_dvbdev->users > 1) {
wait_event(dmxdev->dvr_dvbdev->wait_queue, dmxdev->dvr_dvbdev->users == 1);
}... | void dvb_dmxdev_release(struct dmxdev *dmxdev) {
mutex_lock(&dmxdev->mutex);
dmxdev->exit = 1;
mutex_unlock(&dmxdev->mutex);
if (dmxdev->dvbdev->users > 1) {
wait_event(dmxdev->dvbdev->wait_queue, dmxdev->dvbdev->users == 1);
}
if (dmxdev->dvr_dvbdev->users > 1) {
wait_event(dmxd... | void dvb_dmxdev_release(struct dmxdev *dmxdev) {
dmxdev->exit = 1;
if (dmxdev->dvbdev->users > 1) {
wait_event(dmxdev->dvbdev->wait_queue, dmxdev->dvbdev->users == 1);
}
if (dmxdev->dvr_dvbdev->users > 1) {
wait_event(dmxdev->dvr_dvbdev->wait_queue, dmxdev->dvr_dvbdev->users == 1);
}... | void dvb_dmxdev_release(struct dmxdev *dmxdev) {
mutex_lock(&dmxdev->mutex);
dmxdev->exit = 1;
mutex_unlock(&dmxdev->mutex);
if (dmxdev->dvbdev->users > 1) {
wait_event(dmxdev->dvbdev->wait_queue, dmxdev->dvbdev->users == 1);
}
if (dmxdev->dvr_dvbdev->users > 1) {
wait_event(dmxd... | void dvb_dmxdev_release(struct dmxdev *dmxdev) {
dmxdev->exit = 1;
}
| void dvb_dmxdev_release(struct dmxdev *dmxdev) {
mutex_lock(&dmxdev->mutex);
dmxdev->exit = 1;
mutex_unlock(&dmxdev->mutex);
}
| void dvb_dmxdev_release(struct dmxdev *dmxdev) {
dmxdev->exit = 1;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| void dvb_dmxdev_release(struct dmxdev *dmxdev) {
mutex_lock(&dmxdev->mutex);
dmxdev->exit = 1;
mutex_unlock(&dmxdev->mutex);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | void dvb_dmxdev_release(struct dmxdev *dmxdev) {
+ mutex_lock(&dmxdev->mutex);
dmxdev->exit = 1;
+ mutex_unlock(&dmxdev->mutex);
} |
CVE-2022-41222 | 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, old_end;
struct mmu_notifier_range range;
pmd_t *old_pmd, *new_pmd;
old_end = old_addr + len;
fl... | 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, old_end;
struct mmu_notifier_range range;
pmd_t *old_pmd, *new_pmd;
old_end = old_addr + len;
fl... | 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;
if (!len) {
return... | 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;
if (!len) {
return... | 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) {
old_end = old_addr + len;
flush_cache_range(vma, old_addr, old_end);
mmu_notifier_range_init(&range, MMU_NOTIFY_UNMAP, 0, vma,... | 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) {
old_end = old_addr + len;
flush_cache_range(vma, old_addr, old_end);
mmu_notifier_range_init(&range, MMU_NOTIFY_UNMAP, 0, vma,... | 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 */
old_end = old_addr + len;
flush_cache_range(vma, old_addr, old_end);
mmu_not... | 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 */
old_end = old_addr + len;
flush_cache_range(vma, old_addr, old_end);
mmu_not... | 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) {
old_end = old_addr + len;
flush_cache_range(vma, old_addr, old_end);
mmu_notifier_range_init(&range, MMU_NOTIFY_UNMAP, 0, ... |
CVE-2022-4129 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/l2tp/l2tp_core.c | l2tp_tunnel_destruct | static void l2tp_tunnel_destruct(struct sock *sk) {
struct l2tp_tunnel *tunnel = l2tp_sk_to_tunnel(sk);
if (!tunnel) {
goto end;
}
switch (tunnel->encap) {
case L2TP_ENCAPTYPE_UDP:
(udp_sk(sk))->encap_type = 0;
(udp_sk(sk))->encap_rcv = NULL;
(udp_sk(sk))->encap_destr... | static void l2tp_tunnel_destruct(struct sock *sk) {
struct l2tp_tunnel *tunnel = l2tp_sk_to_tunnel(sk);
if (!tunnel) {
goto end;
}
switch (tunnel->encap) {
case L2TP_ENCAPTYPE_UDP:
(udp_sk(sk))->encap_type = 0;
(udp_sk(sk))->encap_rcv = NULL;
(udp_sk(sk))->encap_destr... | static void l2tp_tunnel_destruct(struct sock *sk) {
struct l2tp_tunnel *tunnel = l2tp_tunnel(sk);
if (tunnel == NULL) {
goto end;
}
l2tp_info(tunnel, L2TP_MSG_CONTROL, "%s: closing...\n", tunnel->name);
switch (tunnel->encap) {
case L2TP_ENCAPTYPE_UDP:
(udp_sk(sk))->encap_type = ... | static void l2tp_tunnel_destruct(struct sock *sk) {
struct l2tp_tunnel *tunnel = l2tp_tunnel(sk);
if (tunnel == NULL) {
goto end;
}
l2tp_info(tunnel, L2TP_MSG_CONTROL, "%s: closing...\n", tunnel->name);
switch (tunnel->encap) {
case L2TP_ENCAPTYPE_UDP:
(udp_sk(sk))->encap_type = ... | static void l2tp_tunnel_destruct(struct sock *sk) {
struct l2tp_tunnel *tunnel = l2tp_sk_to_tunnel(sk);
switch (tunnel->encap) {
case L2TP_ENCAPTYPE_UDP:
(udp_sk(sk))->encap_type = 0;
(udp_sk(sk))->encap_rcv = NULL;
(udp_sk(sk))->encap_destroy = NULL;
break;
}
sk->sk_... | static void l2tp_tunnel_destruct(struct sock *sk) {
struct l2tp_tunnel *tunnel = l2tp_sk_to_tunnel(sk);
switch (tunnel->encap) {
case L2TP_ENCAPTYPE_UDP:
(udp_sk(sk))->encap_type = 0;
(udp_sk(sk))->encap_rcv = NULL;
(udp_sk(sk))->encap_destroy = NULL;
break;
}
write_l... | static void l2tp_tunnel_destruct(struct sock *sk) {
struct l2tp_tunnel *tunnel = l2tp_tunnel(sk);
if (tunnel == NULL) {
goto end;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (tunnel->encap) {
case L2TP_ENCAPTYPE_UDP:
(udp_sk(sk))->encap_type = 0;
(udp_sk(sk))->... | static void l2tp_tunnel_destruct(struct sock *sk) {
struct l2tp_tunnel *tunnel = l2tp_tunnel(sk);
if (tunnel == NULL) {
goto end;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (tunnel->encap) {
case L2TP_ENCAPTYPE_UDP:
(udp_sk(sk))->encap_type = 0;
(udp_sk(sk))->... | static void l2tp_tunnel_destruct(struct sock *sk) {
struct l2tp_tunnel *tunnel = l2tp_sk_to_tunnel(sk);
switch (tunnel->encap) {
case L2TP_ENCAPTYPE_UDP:
(udp_sk(sk))->encap_type = 0;
(udp_sk(sk))->encap_rcv = NULL;
(udp_sk(sk))->encap_destroy = NULL;
break;
}
+ ... |
CVE-2022-4129 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/l2tp/l2tp_core.c | l2tp_tunnel_register | int l2tp_tunnel_register(struct l2tp_tunnel *tunnel, struct net *net, struct l2tp_tunnel_cfg *cfg) {
struct l2tp_tunnel *tunnel_walk;
struct l2tp_net *pn;
struct socket *sock;
struct sock *sk;
int ret;
if (tunnel->fd < 0) {
ret = l2tp_tunnel_sock_create(net, tunnel->tunnel_id, tunnel->pe... | int l2tp_tunnel_register(struct l2tp_tunnel *tunnel, struct net *net, struct l2tp_tunnel_cfg *cfg) {
struct l2tp_tunnel *tunnel_walk;
struct l2tp_net *pn;
struct socket *sock;
struct sock *sk;
int ret;
if (tunnel->fd < 0) {
ret = l2tp_tunnel_sock_create(net, tunnel->tunnel_id, tunnel->pe... | int l2tp_tunnel_register(struct l2tp_tunnel *tunnel, struct net *net, struct l2tp_tunnel_cfg *cfg) {
struct l2tp_tunnel *tunnel_walk;
struct l2tp_net *pn;
struct socket *sock;
struct sock *sk;
int ret;
if (tunnel->fd < 0) {
ret = l2tp_tunnel_sock_create(net, tunnel->tunnel_id, tunnel->pe... | int l2tp_tunnel_register(struct l2tp_tunnel *tunnel, struct net *net, struct l2tp_tunnel_cfg *cfg) {
struct l2tp_tunnel *tunnel_walk;
struct l2tp_net *pn;
struct socket *sock;
struct sock *sk;
int ret;
if (tunnel->fd < 0) {
ret = l2tp_tunnel_sock_create(net, tunnel->tunnel_id, tunnel->pe... | int l2tp_tunnel_register(struct l2tp_tunnel *tunnel, struct net *net, struct l2tp_tunnel_cfg *cfg) {
if (tunnel->fd < 0) {
ret = l2tp_tunnel_sock_create(net, tunnel->tunnel_id, tunnel->peer_tunnel_id, cfg, &sock);
if (ret < 0) {
goto err;
}
} else {
sock = sockfd_look... | int l2tp_tunnel_register(struct l2tp_tunnel *tunnel, struct net *net, struct l2tp_tunnel_cfg *cfg) {
if (tunnel->fd < 0) {
ret = l2tp_tunnel_sock_create(net, tunnel->tunnel_id, tunnel->peer_tunnel_id, cfg, &sock);
if (ret < 0) {
goto err;
}
} else {
sock = sockfd_look... | int l2tp_tunnel_register(struct l2tp_tunnel *tunnel, struct net *net, struct l2tp_tunnel_cfg *cfg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (tunnel->fd < 0) {
ret = l2tp_tunnel_sock_create(net, tunnel->tunnel_id, tunnel->peer_tunnel_id, cfg, &sock);
if (ret < 0) {
goto err;... | int l2tp_tunnel_register(struct l2tp_tunnel *tunnel, struct net *net, struct l2tp_tunnel_cfg *cfg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (tunnel->fd < 0) {
ret = l2tp_tunnel_sock_create(net, tunnel->tunnel_id, tunnel->peer_tunnel_id, cfg, &sock);
if (ret < 0) {
goto err;... | int l2tp_tunnel_register(struct l2tp_tunnel *tunnel, struct net *net, struct l2tp_tunnel_cfg *cfg) {
if (tunnel->fd < 0) {
ret = l2tp_tunnel_sock_create(net, tunnel->tunnel_id, tunnel->peer_tunnel_id, cfg, &sock);
if (ret < 0) {
goto err;
}
} else {
sock = soc... |
CVE-2022-41674 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/wireless/scan.c | cfg80211_update_notlisted_nontrans | static void cfg80211_update_notlisted_nontrans(struct wiphy *wiphy, struct cfg80211_bss *nontrans_bss, struct ieee80211_mgmt *mgmt, size_t len) {
u8 *ie, *new_ie, *pos;
const u8 *nontrans_ssid, *trans_ssid, *mbssid;
size_t ielen = len - offsetof(struct ieee80211_mgmt, u.probe_resp.variable);
size_t new_... | static void cfg80211_update_notlisted_nontrans(struct wiphy *wiphy, struct cfg80211_bss *nontrans_bss, struct ieee80211_mgmt *mgmt, size_t len) {
u8 *ie, *new_ie, *pos;
const u8 *nontrans_ssid, *trans_ssid, *mbssid;
size_t ielen = len - offsetof(struct ieee80211_mgmt, u.probe_resp.variable);
size_t new_... | static void cfg80211_update_notlisted_nontrans(struct wiphy *wiphy, struct cfg80211_bss *nontrans_bss, struct ieee80211_mgmt *mgmt, size_t len) {
u8 *ie, *new_ie, *pos;
const struct element *nontrans_ssid;
const u8 *trans_ssid, *mbssid;
size_t ielen = len - offsetof(struct ieee80211_mgmt, u.probe_resp.v... | static void cfg80211_update_notlisted_nontrans(struct wiphy *wiphy, struct cfg80211_bss *nontrans_bss, struct ieee80211_mgmt *mgmt, size_t len) {
u8 *ie, *new_ie, *pos;
const struct element *nontrans_ssid;
const u8 *trans_ssid, *mbssid;
size_t ielen = len - offsetof(struct ieee80211_mgmt, u.probe_resp.v... | static void cfg80211_update_notlisted_nontrans(struct wiphy *wiphy, struct cfg80211_bss *nontrans_bss, struct ieee80211_mgmt *mgmt, size_t len) {
const struct cfg80211_bss_ies *old;
u8 cpy_len;
lockdep_assert_held(&wiphy_to_rdev(wiphy)->bss_lock);
}
| static void cfg80211_update_notlisted_nontrans(struct wiphy *wiphy, struct cfg80211_bss *nontrans_bss, struct ieee80211_mgmt *mgmt, size_t len) {
const struct cfg80211_bss_ies *old;
size_t cpy_len;
lockdep_assert_held(&wiphy_to_rdev(wiphy)->bss_lock);
}
| static void cfg80211_update_notlisted_nontrans(struct wiphy *wiphy, struct cfg80211_bss *nontrans_bss, struct ieee80211_mgmt *mgmt, size_t len) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
const struct cfg80211_bss_ies *old;
u8 cpy_len;
lockdep_assert_held(&wiphy_to_rdev(wiphy)->bss_lock);
/* PLA... | static void cfg80211_update_notlisted_nontrans(struct wiphy *wiphy, struct cfg80211_bss *nontrans_bss, struct ieee80211_mgmt *mgmt, size_t len) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
const struct cfg80211_bss_ies *old;
size_t cpy_len;
lockdep_assert_held(&wiphy_to_rdev(wiphy)->bss_lock);
/*... | static void cfg80211_update_notlisted_nontrans(struct wiphy *wiphy, struct cfg80211_bss *nontrans_bss, struct ieee80211_mgmt *mgmt, size_t len) {
const struct cfg80211_bss_ies *old;
- u8 cpy_len;
+ size_t cpy_len;
lockdep_assert_held(&wiphy_to_rdev(wiphy)->bss_lock);
} |
CVE-2022-41849 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/video/fbdev/smscufx.c | ufx_ops_open | static int ufx_ops_open(struct fb_info *info, int user) {
struct ufx_data *dev = info->par;
if (user == 0 && !console) {
return -EBUSY;
}
if (dev->virtualized) {
return -ENODEV;
}
dev->fb_count++;
kref_get(&dev->kref);
if (fb_defio && (info->fbdefio == NULL)) {
st... | static int ufx_ops_open(struct fb_info *info, int user) {
struct ufx_data *dev = info->par;
if (user == 0 && !console) {
return -EBUSY;
}
mutex_lock(&disconnect_mutex);
if (dev->virtualized) {
mutex_unlock(&disconnect_mutex);
return -ENODEV;
}
dev->fb_count++;
kre... | static int ufx_ops_open(struct fb_info *info, int user) {
struct ufx_data *dev = info->par;
if (user == 0 && !console) {
return -EBUSY;
}
if (dev->virtualized) {
return -ENODEV;
}
dev->fb_count++;
kref_get(&dev->kref);
if (fb_defio && (info->fbdefio == NULL)) {
st... | static int ufx_ops_open(struct fb_info *info, int user) {
struct ufx_data *dev = info->par;
if (user == 0 && !console) {
return -EBUSY;
}
mutex_lock(&disconnect_mutex);
if (dev->virtualized) {
mutex_unlock(&disconnect_mutex);
return -ENODEV;
}
dev->fb_count++;
kre... | static int ufx_ops_open(struct fb_info *info, int user) {
if (user == 0 && !console) {
return -EBUSY;
}
if (dev->virtualized) {
return -ENODEV;
}
pr_debug("open /dev/fb%d user=%d fb_info=%p count=%d", info->node, user, info, dev->fb_count);
return 0;
}
| static int ufx_ops_open(struct fb_info *info, int user) {
if (user == 0 && !console) {
return -EBUSY;
}
mutex_lock(&disconnect_mutex);
if (dev->virtualized) {
mutex_unlock(&disconnect_mutex);
return -ENODEV;
}
pr_debug("open /dev/fb%d user=%d fb_info=%p count=%d", info->n... | static int ufx_ops_open(struct fb_info *info, int user) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (user == 0 && !console) {
return -EBUSY;
}
if (dev->virtualized) {
return -ENODEV;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pr_debug("open /dev/fb%d user=%d fb_in... | static int ufx_ops_open(struct fb_info *info, int user) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (user == 0 && !console) {
return -EBUSY;
}
mutex_lock(&disconnect_mutex);
if (dev->virtualized) {
mutex_unlock(&disconnect_mutex);
return -ENODEV;
}
/* PLACEHOLD... | static int ufx_ops_open(struct fb_info *info, int user) {
if (user == 0 && !console) {
return -EBUSY;
}
+ mutex_lock(&disconnect_mutex);
if (dev->virtualized) {
+ mutex_unlock(&disconnect_mutex);
return -ENODEV;
}
pr_debug("open /dev/fb%d user=%d fb_info=%p count=%d... |
CVE-2022-41849 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/video/fbdev/smscufx.c | ufx_usb_disconnect | static void ufx_usb_disconnect(struct usb_interface *interface) {
struct ufx_data *dev;
dev = usb_get_intfdata(interface);
pr_debug("USB disconnect starting\n");
dev->virtualized = true;
atomic_set(&dev->usb_active, 0);
usb_set_intfdata(interface, NULL);
if (dev->fb_count == 0) {
sch... | static void ufx_usb_disconnect(struct usb_interface *interface) {
struct ufx_data *dev;
mutex_lock(&disconnect_mutex);
dev = usb_get_intfdata(interface);
pr_debug("USB disconnect starting\n");
dev->virtualized = true;
atomic_set(&dev->usb_active, 0);
usb_set_intfdata(interface, NULL);
if... | static void ufx_usb_disconnect(struct usb_interface *interface) {
struct ufx_data *dev;
dev = usb_get_intfdata(interface);
pr_debug("USB disconnect starting\n");
dev->virtualized = true;
atomic_set(&dev->usb_active, 0);
usb_set_intfdata(interface, NULL);
if (dev->fb_count == 0) {
sch... | static void ufx_usb_disconnect(struct usb_interface *interface) {
struct ufx_data *dev;
mutex_lock(&disconnect_mutex);
dev = usb_get_intfdata(interface);
pr_debug("USB disconnect starting\n");
dev->virtualized = true;
atomic_set(&dev->usb_active, 0);
usb_set_intfdata(interface, NULL);
if... | static void ufx_usb_disconnect(struct usb_interface *interface) {
struct ufx_data *dev;
dev = usb_get_intfdata(interface);
kref_put(&dev->kref, ufx_free);
}
| static void ufx_usb_disconnect(struct usb_interface *interface) {
struct ufx_data *dev;
mutex_lock(&disconnect_mutex);
dev = usb_get_intfdata(interface);
kref_put(&dev->kref, ufx_free);
mutex_unlock(&disconnect_mutex);
}
| static void ufx_usb_disconnect(struct usb_interface *interface) {
struct ufx_data *dev;
dev = usb_get_intfdata(interface);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
kref_put(&dev->kref, ufx_free);
}
| static void ufx_usb_disconnect(struct usb_interface *interface) {
struct ufx_data *dev;
mutex_lock(&disconnect_mutex);
dev = usb_get_intfdata(interface);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
kref_put(&dev->kref, ufx_free);
mutex_unlock(&disconnect_mutex);
} | static void ufx_usb_disconnect(struct usb_interface *interface) {
struct ufx_data *dev;
+ mutex_lock(&disconnect_mutex);
dev = usb_get_intfdata(interface);
kref_put(&dev->kref, ufx_free);
+ mutex_unlock(&disconnect_mutex);
} |
CVE-2022-41850 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/hid/hid-roccat.c | roccat_report_event | int roccat_report_event(int minor, u8 const *data) {
struct roccat_device *device;
struct roccat_reader *reader;
struct roccat_report *report;
uint8_t *new_value;
device = devices[minor];
new_value = kmemdup(data, device->report_size, GFP_ATOMIC);
if (!new_value) {
return -ENOMEM;
... | int roccat_report_event(int minor, u8 const *data) {
struct roccat_device *device;
struct roccat_reader *reader;
struct roccat_report *report;
uint8_t *new_value;
device = devices[minor];
new_value = kmemdup(data, device->report_size, GFP_ATOMIC);
if (!new_value) {
return -ENOMEM;
... | int roccat_report_event(int minor, u8 const *data) {
struct roccat_device *device;
struct roccat_reader *reader;
struct roccat_report *report;
uint8_t *new_value;
device = devices[minor];
new_value = kmemdup(data, device->report_size, GFP_ATOMIC);
if (!new_value) {
return -ENOMEM;
... | int roccat_report_event(int minor, u8 const *data) {
struct roccat_device *device;
struct roccat_reader *reader;
struct roccat_report *report;
uint8_t *new_value;
device = devices[minor];
new_value = kmemdup(data, device->report_size, GFP_ATOMIC);
if (!new_value) {
return -ENOMEM;
... | int roccat_report_event(int minor, u8 const *data) {
device = devices[minor];
if (!new_value) {
return -ENOMEM;
}
report = &device->cbuf[device->cbuf_end];
list_for_each_entry(reader, &device->readers, node) {
if (reader->cbuf_start == device->cbuf_end) {
reader->cbuf_sta... | int roccat_report_event(int minor, u8 const *data) {
device = devices[minor];
if (!new_value) {
return -ENOMEM;
}
mutex_lock(&device->cbuf_lock);
report = &device->cbuf[device->cbuf_end];
list_for_each_entry(reader, &device->readers, node) {
if (reader->cbuf_start == device->cbuf... | int roccat_report_event(int minor, u8 const *data) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
device = devices[minor];
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!new_value) {
return -ENOMEM;
}
report = &device->cbuf[device->cbuf_end];
/* PLACEHOLDER: DO NOT DELETE THIS C... | int roccat_report_event(int minor, u8 const *data) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
device = devices[minor];
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!new_value) {
return -ENOMEM;
}
mutex_lock(&device->cbuf_lock);
report = &device->cbuf[device->cbuf_end];
... | int roccat_report_event(int minor, u8 const *data) {
device = devices[minor];
if (!new_value) {
return -ENOMEM;
}
+ mutex_lock(&device->cbuf_lock);
report = &device->cbuf[device->cbuf_end];
list_for_each_entry(reader, &device->readers, node) {
if (reader->cbuf_start == dev... |
CVE-2022-42328 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/xen-netback/interface.c | xenvif_start_xmit | static netdev_tx_t xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev) {
struct xenvif *vif = netdev_priv(dev);
struct xenvif_queue *queue = NULL;
unsigned int num_queues;
u16 index;
struct xenvif_rx_cb *cb;
BUG_ON(skb->dev != dev);
num_queues = READ_ONCE(vif->num_queues);
if ... | static netdev_tx_t xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev) {
struct xenvif *vif = netdev_priv(dev);
struct xenvif_queue *queue = NULL;
unsigned int num_queues;
u16 index;
struct xenvif_rx_cb *cb;
BUG_ON(skb->dev != dev);
num_queues = READ_ONCE(vif->num_queues);
if ... | static netdev_tx_t xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev) {
struct xenvif *vif = netdev_priv(dev);
struct xenvif_queue *queue = NULL;
unsigned int num_queues;
u16 index;
struct xenvif_rx_cb *cb;
BUG_ON(skb->dev != dev);
num_queues = READ_ONCE(vif->num_queues);
if ... | static netdev_tx_t xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev) {
struct xenvif *vif = netdev_priv(dev);
struct xenvif_queue *queue = NULL;
unsigned int num_queues;
u16 index;
struct xenvif_rx_cb *cb;
BUG_ON(skb->dev != dev);
num_queues = READ_ONCE(vif->num_queues);
if ... | static netdev_tx_t xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev) {
index = skb_get_queue_mapping(skb);
queue = &vif->queues[index];
cb = XENVIF_RX_CB(skb);
if (vif->hash.alg == XEN_NETIF_CTRL_HASH_ALGORITHM_NONE) {
skb_clear_hash(skb);
}
xenvif_rx_queue_tail(queue, skb);... | static netdev_tx_t xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev) {
index = skb_get_queue_mapping(skb);
queue = &vif->queues[index];
cb = XENVIF_RX_CB(skb);
if (vif->hash.alg == XEN_NETIF_CTRL_HASH_ALGORITHM_NONE) {
skb_clear_hash(skb);
}
if (!xenvif_rx_queue_tail(queue, ... | static netdev_tx_t xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
index = skb_get_queue_mapping(skb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
queue = &vif->queues[index];
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
cb = XENV... | static netdev_tx_t xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
index = skb_get_queue_mapping(skb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
queue = &vif->queues[index];
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
cb = XENV... | static netdev_tx_t xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev) {
index = skb_get_queue_mapping(skb);
queue = &vif->queues[index];
cb = XENVIF_RX_CB(skb);
if (vif->hash.alg == XEN_NETIF_CTRL_HASH_ALGORITHM_NONE) {
skb_clear_hash(skb);
}
- xenvif_rx_queue_tail(queu... |
CVE-2022-42328 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/xen-netback/rx.c | xenvif_rx_queue_tail | void xenvif_rx_queue_tail(struct xenvif_queue *queue, struct sk_buff *skb) {
unsigned long flags;
spin_lock_irqsave(&queue->rx_queue.lock, flags);
if (queue->rx_queue_len >= queue->rx_queue_max) {
struct net_device *dev = queue->vif->dev;
netif_tx_stop_queue(netdev_get_tx_queue(dev, queue->i... | bool xenvif_rx_queue_tail(struct xenvif_queue *queue, struct sk_buff *skb) {
unsigned long flags;
bool ret = true;
spin_lock_irqsave(&queue->rx_queue.lock, flags);
if (queue->rx_queue_len >= queue->rx_queue_max) {
struct net_device *dev = queue->vif->dev;
netif_tx_stop_queue(netdev_get_t... | void xenvif_rx_queue_tail(struct xenvif_queue *queue, struct sk_buff *skb) {
unsigned long flags;
spin_lock_irqsave(&queue->rx_queue.lock, flags);
if (queue->rx_queue_len >= queue->rx_queue_max) {
struct net_device *dev = queue->vif->dev;
netif_tx_stop_queue(netdev_get_tx_queue(dev, queue->i... | bool xenvif_rx_queue_tail(struct xenvif_queue *queue, struct sk_buff *skb) {
unsigned long flags;
bool ret = true;
spin_lock_irqsave(&queue->rx_queue.lock, flags);
if (queue->rx_queue_len >= queue->rx_queue_max) {
struct net_device *dev = queue->vif->dev;
netif_tx_stop_queue(netdev_get_t... | void xenvif_rx_queue_tail(struct xenvif_queue *queue, struct sk_buff *skb) {
unsigned long flags;
spin_lock_irqsave(&queue->rx_queue.lock, flags);
if (queue->rx_queue_len >= queue->rx_queue_max) {
netif_tx_stop_queue(netdev_get_tx_queue(dev, queue->id));
kfree_skb(skb);
queue->vif->d... | bool xenvif_rx_queue_tail(struct xenvif_queue *queue, struct sk_buff *skb) {
unsigned long flags;
bool ret = true;
spin_lock_irqsave(&queue->rx_queue.lock, flags);
if (queue->rx_queue_len >= queue->rx_queue_max) {
netif_tx_stop_queue(netdev_get_tx_queue(dev, queue->id));
ret = false;
... | void xenvif_rx_queue_tail(struct xenvif_queue *queue, struct sk_buff *skb) {
unsigned long flags;
spin_lock_irqsave(&queue->rx_queue.lock, flags);
if (queue->rx_queue_len >= queue->rx_queue_max) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
netif_tx_stop_queue(netdev_get_tx_queue(dev, queue->i... | bool xenvif_rx_queue_tail(struct xenvif_queue *queue, struct sk_buff *skb) {
unsigned long flags;
bool ret = true;
spin_lock_irqsave(&queue->rx_queue.lock, flags);
if (queue->rx_queue_len >= queue->rx_queue_max) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
netif_tx_stop_queue(netdev_get_t... | -void xenvif_rx_queue_tail(struct xenvif_queue *queue, struct sk_buff *skb) {
+bool xenvif_rx_queue_tail(struct xenvif_queue *queue, struct sk_buff *skb) {
unsigned long flags;
+ bool ret = true;
spin_lock_irqsave(&queue->rx_queue.lock, flags);
if (queue->rx_queue_len >= queue->rx_queue_max) {
... |
CVE-2022-42329 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/xen-netback/interface.c | xenvif_start_xmit | static netdev_tx_t xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev) {
struct xenvif *vif = netdev_priv(dev);
struct xenvif_queue *queue = NULL;
unsigned int num_queues;
u16 index;
struct xenvif_rx_cb *cb;
BUG_ON(skb->dev != dev);
num_queues = READ_ONCE(vif->num_queues);
if ... | static netdev_tx_t xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev) {
struct xenvif *vif = netdev_priv(dev);
struct xenvif_queue *queue = NULL;
unsigned int num_queues;
u16 index;
struct xenvif_rx_cb *cb;
BUG_ON(skb->dev != dev);
num_queues = READ_ONCE(vif->num_queues);
if ... | static netdev_tx_t xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev) {
struct xenvif *vif = netdev_priv(dev);
struct xenvif_queue *queue = NULL;
unsigned int num_queues;
u16 index;
struct xenvif_rx_cb *cb;
BUG_ON(skb->dev != dev);
num_queues = READ_ONCE(vif->num_queues);
if ... | static netdev_tx_t xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev) {
struct xenvif *vif = netdev_priv(dev);
struct xenvif_queue *queue = NULL;
unsigned int num_queues;
u16 index;
struct xenvif_rx_cb *cb;
BUG_ON(skb->dev != dev);
num_queues = READ_ONCE(vif->num_queues);
if ... | static netdev_tx_t xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev) {
index = skb_get_queue_mapping(skb);
queue = &vif->queues[index];
cb = XENVIF_RX_CB(skb);
if (vif->hash.alg == XEN_NETIF_CTRL_HASH_ALGORITHM_NONE) {
skb_clear_hash(skb);
}
xenvif_rx_queue_tail(queue, skb);... | static netdev_tx_t xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev) {
index = skb_get_queue_mapping(skb);
queue = &vif->queues[index];
cb = XENVIF_RX_CB(skb);
if (vif->hash.alg == XEN_NETIF_CTRL_HASH_ALGORITHM_NONE) {
skb_clear_hash(skb);
}
if (!xenvif_rx_queue_tail(queue, ... | static netdev_tx_t xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
index = skb_get_queue_mapping(skb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
queue = &vif->queues[index];
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
cb = XENV... | static netdev_tx_t xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
index = skb_get_queue_mapping(skb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
queue = &vif->queues[index];
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
cb = XENV... | static netdev_tx_t xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev) {
index = skb_get_queue_mapping(skb);
queue = &vif->queues[index];
cb = XENVIF_RX_CB(skb);
if (vif->hash.alg == XEN_NETIF_CTRL_HASH_ALGORITHM_NONE) {
skb_clear_hash(skb);
}
- xenvif_rx_queue_tail(queu... |
CVE-2022-42329 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/xen-netback/rx.c | xenvif_rx_queue_tail | void xenvif_rx_queue_tail(struct xenvif_queue *queue, struct sk_buff *skb) {
unsigned long flags;
spin_lock_irqsave(&queue->rx_queue.lock, flags);
if (queue->rx_queue_len >= queue->rx_queue_max) {
struct net_device *dev = queue->vif->dev;
netif_tx_stop_queue(netdev_get_tx_queue(dev, queue->i... | bool xenvif_rx_queue_tail(struct xenvif_queue *queue, struct sk_buff *skb) {
unsigned long flags;
bool ret = true;
spin_lock_irqsave(&queue->rx_queue.lock, flags);
if (queue->rx_queue_len >= queue->rx_queue_max) {
struct net_device *dev = queue->vif->dev;
netif_tx_stop_queue(netdev_get_t... | void xenvif_rx_queue_tail(struct xenvif_queue *queue, struct sk_buff *skb) {
unsigned long flags;
spin_lock_irqsave(&queue->rx_queue.lock, flags);
if (queue->rx_queue_len >= queue->rx_queue_max) {
struct net_device *dev = queue->vif->dev;
netif_tx_stop_queue(netdev_get_tx_queue(dev, queue->i... | bool xenvif_rx_queue_tail(struct xenvif_queue *queue, struct sk_buff *skb) {
unsigned long flags;
bool ret = true;
spin_lock_irqsave(&queue->rx_queue.lock, flags);
if (queue->rx_queue_len >= queue->rx_queue_max) {
struct net_device *dev = queue->vif->dev;
netif_tx_stop_queue(netdev_get_t... | void xenvif_rx_queue_tail(struct xenvif_queue *queue, struct sk_buff *skb) {
unsigned long flags;
spin_lock_irqsave(&queue->rx_queue.lock, flags);
if (queue->rx_queue_len >= queue->rx_queue_max) {
netif_tx_stop_queue(netdev_get_tx_queue(dev, queue->id));
kfree_skb(skb);
queue->vif->d... | bool xenvif_rx_queue_tail(struct xenvif_queue *queue, struct sk_buff *skb) {
unsigned long flags;
bool ret = true;
spin_lock_irqsave(&queue->rx_queue.lock, flags);
if (queue->rx_queue_len >= queue->rx_queue_max) {
netif_tx_stop_queue(netdev_get_tx_queue(dev, queue->id));
ret = false;
... | void xenvif_rx_queue_tail(struct xenvif_queue *queue, struct sk_buff *skb) {
unsigned long flags;
spin_lock_irqsave(&queue->rx_queue.lock, flags);
if (queue->rx_queue_len >= queue->rx_queue_max) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
netif_tx_stop_queue(netdev_get_tx_queue(dev, queue->i... | bool xenvif_rx_queue_tail(struct xenvif_queue *queue, struct sk_buff *skb) {
unsigned long flags;
bool ret = true;
spin_lock_irqsave(&queue->rx_queue.lock, flags);
if (queue->rx_queue_len >= queue->rx_queue_max) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
netif_tx_stop_queue(netdev_get_t... | -void xenvif_rx_queue_tail(struct xenvif_queue *queue, struct sk_buff *skb) {
+bool xenvif_rx_queue_tail(struct xenvif_queue *queue, struct sk_buff *skb) {
unsigned long flags;
+ bool ret = true;
spin_lock_irqsave(&queue->rx_queue.lock, flags);
if (queue->rx_queue_len >= queue->rx_queue_max) {
... |
CVE-2022-42432 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/netfilter/nfnetlink_osf.c | nf_osf_find | bool nf_osf_find(const struct sk_buff *skb, const struct list_head *nf_osf_fingers, const int ttl_check, struct nf_osf_data *data) {
const struct iphdr *ip = ip_hdr(skb);
const struct nf_osf_user_finger *f;
unsigned char opts[MAX_IPOPTLEN];
const struct nf_osf_finger *kf;
struct nf_osf_hdr_ctx ctx;
... | bool nf_osf_find(const struct sk_buff *skb, const struct list_head *nf_osf_fingers, const int ttl_check, struct nf_osf_data *data) {
const struct iphdr *ip = ip_hdr(skb);
const struct nf_osf_user_finger *f;
unsigned char opts[MAX_IPOPTLEN];
const struct nf_osf_finger *kf;
struct nf_osf_hdr_ctx ctx;
... | bool nf_osf_find(const struct sk_buff *skb, const struct list_head *nf_osf_fingers, const int ttl_check, struct nf_osf_data *data) {
const struct iphdr *ip = ip_hdr(skb);
const struct nf_osf_user_finger *f;
unsigned char opts[MAX_IPOPTLEN];
const struct nf_osf_finger *kf;
struct nf_osf_hdr_ctx ctx;
... | bool nf_osf_find(const struct sk_buff *skb, const struct list_head *nf_osf_fingers, const int ttl_check, struct nf_osf_data *data) {
const struct iphdr *ip = ip_hdr(skb);
const struct nf_osf_user_finger *f;
unsigned char opts[MAX_IPOPTLEN];
const struct nf_osf_finger *kf;
struct nf_osf_hdr_ctx ctx;
... | bool nf_osf_find(const struct sk_buff *skb, const struct list_head *nf_osf_fingers, const int ttl_check, struct nf_osf_data *data) {
const struct iphdr *ip = ip_hdr(skb);
struct tcphdr _tcph;
memset(&ctx, 0, sizeof(ctx));
list_for_each_entry_rcu(kf, &nf_osf_fingers[ctx.df], finger_entry) {
data-... | bool nf_osf_find(const struct sk_buff *skb, const struct list_head *nf_osf_fingers, const int ttl_check, struct nf_osf_data *data) {
const struct iphdr *ip = ip_hdr(skb);
struct tcphdr _tcph;
bool found = false;
memset(&ctx, 0, sizeof(ctx));
list_for_each_entry_rcu(kf, &nf_osf_fingers[ctx.df], finge... | bool nf_osf_find(const struct sk_buff *skb, const struct list_head *nf_osf_fingers, const int ttl_check, struct nf_osf_data *data) {
const struct iphdr *ip = ip_hdr(skb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct tcphdr _tcph;
memset(&ctx, 0, sizeof(ctx));
/* PLACEHOLDER: DO NOT DELETE TH... | bool nf_osf_find(const struct sk_buff *skb, const struct list_head *nf_osf_fingers, const int ttl_check, struct nf_osf_data *data) {
const struct iphdr *ip = ip_hdr(skb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct tcphdr _tcph;
bool found = false;
memset(&ctx, 0, sizeof(ctx));
/* PLACE... | bool nf_osf_find(const struct sk_buff *skb, const struct list_head *nf_osf_fingers, const int ttl_check, struct nf_osf_data *data) {
const struct iphdr *ip = ip_hdr(skb);
struct tcphdr _tcph;
+ bool found = false;
memset(&ctx, 0, sizeof(ctx));
list_for_each_entry_rcu(kf, &nf_osf_fingers[ctx.df],... |
CVE-2022-4269 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/sched/act_mirred.c | tcf_mirred_forward | static int tcf_mirred_forward(bool want_ingress, struct sk_buff *skb) {
int err;
if (!want_ingress) {
err = tcf_dev_queue_xmit(skb, dev_queue_xmit);
} else {
err = netif_receive_skb(skb);
}
return err;
} | static int tcf_mirred_forward(bool want_ingress, struct sk_buff *skb) {
int err;
if (!want_ingress) {
err = tcf_dev_queue_xmit(skb, dev_queue_xmit);
} else if (is_mirred_nested()) {
err = netif_rx(skb);
} else {
err = netif_receive_skb(skb);
}
return err;
} | static int tcf_mirred_forward(bool want_ingress, struct sk_buff *skb) {
int err;
if (!want_ingress) {
err = dev_queue_xmit(skb);
} else {
err = netif_receive_skb(skb);
}
return err;
} | static int tcf_mirred_forward(bool want_ingress, struct sk_buff *skb) {
int err;
if (!want_ingress) {
err = dev_queue_xmit(skb);
} else if (is_mirred_nested()) {
err = netif_rx(skb);
} else {
err = netif_receive_skb(skb);
}
return err;
} | static int tcf_mirred_forward(bool want_ingress, struct sk_buff *skb) {
int err;
if (!want_ingress) {
err = tcf_dev_queue_xmit(skb, dev_queue_xmit);
} else {
err = netif_receive_skb(skb);
}
return err;
}
| static int tcf_mirred_forward(bool want_ingress, struct sk_buff *skb) {
int err;
if (!want_ingress) {
err = tcf_dev_queue_xmit(skb, dev_queue_xmit);
} else if (is_mirred_nested()) {
err = netif_rx(skb);
} else {
err = netif_receive_skb(skb);
}
return err;
}
| static int tcf_mirred_forward(bool want_ingress, struct sk_buff *skb) {
int err;
if (!want_ingress) {
err = dev_queue_xmit(skb);
} else {
err = netif_receive_skb(skb);
}
return err;
}
| static int tcf_mirred_forward(bool want_ingress, struct sk_buff *skb) {
int err;
if (!want_ingress) {
err = dev_queue_xmit(skb);
} else if (is_mirred_nested()) {
err = netif_rx(skb);
} else {
err = netif_receive_skb(skb);
}
return err;
} | static int tcf_mirred_forward(bool want_ingress, struct sk_buff *skb) {
int err;
if (!want_ingress) {
err = tcf_dev_queue_xmit(skb, dev_queue_xmit);
+ } else if (is_mirred_nested()) {
+ err = netif_rx(skb);
} else {
err = netif_receive_skb(skb);
}
return err;
} |
CVE-2022-42720 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/wireless/scan.c | bss_ref_get | static inline void bss_ref_get(struct cfg80211_registered_device *rdev, struct cfg80211_internal_bss *bss) {
lockdep_assert_held(&rdev->bss_lock);
bss->refcount++;
if (bss->pub.hidden_beacon_bss) {
bss = container_of(bss->pub.hidden_beacon_bss, struct cfg80211_internal_bss, pub);
bss->refcou... | static inline void bss_ref_get(struct cfg80211_registered_device *rdev, struct cfg80211_internal_bss *bss) {
lockdep_assert_held(&rdev->bss_lock);
bss->refcount++;
if (bss->pub.hidden_beacon_bss) {
bss_from_pub(bss->pub.hidden_beacon_bss)->refcount++;
}
if (bss->pub.transmitted_bss) {
... | static inline void bss_ref_get(struct cfg80211_registered_device *rdev, struct cfg80211_internal_bss *bss) {
lockdep_assert_held(&rdev->bss_lock);
bss->refcount++;
if (bss->pub.hidden_beacon_bss) {
bss = container_of(bss->pub.hidden_beacon_bss, struct cfg80211_internal_bss, pub);
bss->refcou... | static inline void bss_ref_get(struct cfg80211_registered_device *rdev, struct cfg80211_internal_bss *bss) {
lockdep_assert_held(&rdev->bss_lock);
bss->refcount++;
if (bss->pub.hidden_beacon_bss) {
bss_from_pub(bss->pub.hidden_beacon_bss)->refcount++;
}
if (bss->pub.transmitted_bss) {
... | static inline void bss_ref_get(struct cfg80211_registered_device *rdev, struct cfg80211_internal_bss *bss) {
bss->refcount++;
if (bss->pub.hidden_beacon_bss) {
bss = container_of(bss->pub.hidden_beacon_bss, struct cfg80211_internal_bss, pub);
bss->refcount++;
}
if (bss->pub.transmitted_b... | static inline void bss_ref_get(struct cfg80211_registered_device *rdev, struct cfg80211_internal_bss *bss) {
bss->refcount++;
if (bss->pub.hidden_beacon_bss) {
bss_from_pub(bss->pub.hidden_beacon_bss)->refcount++;
}
if (bss->pub.transmitted_bss) {
bss_from_pub(bss->pub.transmitted_bss)->... | static inline void bss_ref_get(struct cfg80211_registered_device *rdev, struct cfg80211_internal_bss *bss) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bss->refcount++;
if (bss->pub.hidden_beacon_bss) {
bss = container_of(bss->pub.hidden_beacon_bss, struct cfg80211_internal_bss, pub);
bss... | static inline void bss_ref_get(struct cfg80211_registered_device *rdev, struct cfg80211_internal_bss *bss) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bss->refcount++;
if (bss->pub.hidden_beacon_bss) {
bss_from_pub(bss->pub.hidden_beacon_bss)->refcount++;
}
if (bss->pub.transmitted_bss) ... | static inline void bss_ref_get(struct cfg80211_registered_device *rdev, struct cfg80211_internal_bss *bss) {
bss->refcount++;
if (bss->pub.hidden_beacon_bss) {
- bss = container_of(bss->pub.hidden_beacon_bss, struct cfg80211_internal_bss, pub);
- bss->refcount++;
+ bss_from_pub(bss->pub.... |
CVE-2022-42720 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/wireless/scan.c | cfg80211_bss_update | struct cfg80211_internal_bss * cfg80211_bss_update(struct cfg80211_registered_device *rdev, struct cfg80211_internal_bss *tmp, bool signal_valid, unsigned long ts) {
struct cfg80211_internal_bss *found = NULL;
if (WARN_ON(!tmp->pub.channel)) {
return NULL;
}
tmp->ts = ts;
spin_lock_bh(&rdev-... | struct cfg80211_internal_bss * cfg80211_bss_update(struct cfg80211_registered_device *rdev, struct cfg80211_internal_bss *tmp, bool signal_valid, unsigned long ts) {
struct cfg80211_internal_bss *found = NULL;
if (WARN_ON(!tmp->pub.channel)) {
return NULL;
}
tmp->ts = ts;
spin_lock_bh(&rdev-... | struct cfg80211_internal_bss * cfg80211_bss_update(struct cfg80211_registered_device *rdev, struct cfg80211_internal_bss *tmp, bool signal_valid, unsigned long ts) {
struct cfg80211_internal_bss *found = NULL;
if (WARN_ON(!tmp->pub.channel)) {
return NULL;
}
tmp->ts = ts;
spin_lock_bh(&rdev-... | struct cfg80211_internal_bss * cfg80211_bss_update(struct cfg80211_registered_device *rdev, struct cfg80211_internal_bss *tmp, bool signal_valid, unsigned long ts) {
struct cfg80211_internal_bss *found = NULL;
if (WARN_ON(!tmp->pub.channel)) {
return NULL;
}
tmp->ts = ts;
spin_lock_bh(&rdev-... | struct cfg80211_internal_bss * cfg80211_bss_update(struct cfg80211_registered_device *rdev, struct cfg80211_internal_bss *tmp, bool signal_valid, unsigned long ts) {
if (found) {
} else {
IT_LIST_HEAD(&new->pub.nontrans_list);
if (rcu_access_pointer(tmp->pub.proberesp_ies)) {
} else {
... | struct cfg80211_internal_bss * cfg80211_bss_update(struct cfg80211_registered_device *rdev, struct cfg80211_internal_bss *tmp, bool signal_valid, unsigned long ts) {
if (found) {
} else {
IT_LIST_HEAD(&new->pub.nontrans_list);
new->pub.transmitted_bss = NULL;
if (rcu_access_pointer(tmp->... | struct cfg80211_internal_bss * cfg80211_bss_update(struct cfg80211_registered_device *rdev, struct cfg80211_internal_bss *tmp, bool signal_valid, unsigned long ts) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (found) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
/* PLACEHOLDER: DO N... | struct cfg80211_internal_bss * cfg80211_bss_update(struct cfg80211_registered_device *rdev, struct cfg80211_internal_bss *tmp, bool signal_valid, unsigned long ts) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (found) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
/* PLACEHOLDER: DO N... | struct cfg80211_internal_bss * cfg80211_bss_update(struct cfg80211_registered_device *rdev, struct cfg80211_internal_bss *tmp, bool signal_valid, unsigned long ts) {
if (found) {
} else {
IT_LIST_HEAD(&new->pub.nontrans_list);
+ new->pub.transmitted_bss = NULL;
if (rcu_access_pointer... |
CVE-2022-42720 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/wireless/scan.c | cfg80211_inform_single_bss_data | static struct cfg80211_bss * cfg80211_inform_single_bss_data(struct wiphy *wiphy, struct cfg80211_inform_bss *data, enum cfg80211_bss_frame_type ftype, const u8 *bssid, u64 tsf, u16 capability,
u16 beacon_interval, const u8 *ie, size_t ielen, struct cfg80211_non_tx_bss *non_tx_data, gfp_t gfp) {
struct cfg8... | static struct cfg80211_bss * cfg80211_inform_single_bss_data(struct wiphy *wiphy, struct cfg80211_inform_bss *data, enum cfg80211_bss_frame_type ftype, const u8 *bssid, u64 tsf, u16 capability,
u16 beacon_interval, const u8 *ie, size_t ielen, struct cfg80211_non_tx_bss *non_tx_data, gfp_t gfp) {
struct cfg8... | static struct cfg80211_bss * cfg80211_inform_single_bss_data(struct wiphy *wiphy, struct cfg80211_inform_bss *data, enum cfg80211_bss_frame_type ftype, const u8 *bssid, u64 tsf, u16 capability,
u16 beacon_interval, const u8 *ie, size_t ielen, struct cfg80211_non_tx_bss *non_tx_data, gfp_t gfp) {
struct cfg8... | static struct cfg80211_bss * cfg80211_inform_single_bss_data(struct wiphy *wiphy, struct cfg80211_inform_bss *data, enum cfg80211_bss_frame_type ftype, const u8 *bssid, u64 tsf, u16 capability,
u16 beacon_interval, const u8 *ie, size_t ielen, struct cfg80211_non_tx_bss *non_tx_data, gfp_t gfp) {
struct cfg8... | static struct cfg80211_bss * cfg80211_inform_single_bss_data(struct wiphy *wiphy, struct cfg80211_inform_bss *data, enum cfg80211_bss_frame_type ftype, const u8 *bssid, u64 tsf, u16 capability,
u16 beacon_interval, const u8 *ie, size_t ielen, struct cfg80211_non_tx_bss *non_tx_data, gfp_t gfp) {
struct cfg8... | static struct cfg80211_bss * cfg80211_inform_single_bss_data(struct wiphy *wiphy, struct cfg80211_inform_bss *data, enum cfg80211_bss_frame_type ftype, const u8 *bssid, u64 tsf, u16 capability,
u16 beacon_interval, const u8 *ie, size_t ielen, struct cfg80211_non_tx_bss *non_tx_data, gfp_t gfp) {
struct cfg8... | static struct cfg80211_bss * cfg80211_inform_single_bss_data(struct wiphy *wiphy, struct cfg80211_inform_bss *data, enum cfg80211_bss_frame_type ftype, const u8 *bssid, u64 tsf, u16 capability,
u16 beacon_interval, const u8 *ie, size_t ielen, struct cfg80211_non_tx_bss *non_tx_data, gfp_t gfp) {
struct cfg8... | static struct cfg80211_bss * cfg80211_inform_single_bss_data(struct wiphy *wiphy, struct cfg80211_inform_bss *data, enum cfg80211_bss_frame_type ftype, const u8 *bssid, u64 tsf, u16 capability,
u16 beacon_interval, const u8 *ie, size_t ielen, struct cfg80211_non_tx_bss *non_tx_data, gfp_t gfp) {
struct cfg8... | static struct cfg80211_bss * cfg80211_inform_single_bss_data(struct wiphy *wiphy, struct cfg80211_inform_bss *data, enum cfg80211_bss_frame_type ftype, const u8 *bssid, u64 tsf, u16 capability,
u16 beacon_interval, const u8 *ie, size_t ielen, struct cfg80211_non_tx_bss *non_tx_data, gfp_t gfp) {
struct c... |
CVE-2022-42721 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/wireless/scan.c | cfg80211_add_nontrans_list | static int cfg80211_add_nontrans_list(struct cfg80211_bss *trans_bss, struct cfg80211_bss *nontrans_bss) {
const u8 *ssid;
size_t ssid_len;
struct cfg80211_bss *bss = NULL;
rcu_read_lock();
ssid = ieee80211_bss_get_ie(nontrans_bss, WLAN_EID_SSID);
if (!ssid) {
rcu_read_unlock();
... | static int cfg80211_add_nontrans_list(struct cfg80211_bss *trans_bss, struct cfg80211_bss *nontrans_bss) {
const u8 *ssid;
size_t ssid_len;
struct cfg80211_bss *bss = NULL;
rcu_read_lock();
ssid = ieee80211_bss_get_ie(nontrans_bss, WLAN_EID_SSID);
if (!ssid) {
rcu_read_unlock();
... | static int cfg80211_add_nontrans_list(struct cfg80211_bss *trans_bss, struct cfg80211_bss *nontrans_bss) {
const struct element *ssid_elem;
struct cfg80211_bss *bss = NULL;
rcu_read_lock();
ssid_elem = ieee80211_bss_get_elem(nontrans_bss, WLAN_EID_SSID);
if (!ssid_elem) {
rcu_read_unlock();
... | static int cfg80211_add_nontrans_list(struct cfg80211_bss *trans_bss, struct cfg80211_bss *nontrans_bss) {
const struct element *ssid_elem;
struct cfg80211_bss *bss = NULL;
rcu_read_lock();
ssid_elem = ieee80211_bss_get_elem(nontrans_bss, WLAN_EID_SSID);
if (!ssid_elem) {
rcu_read_unlock();
... | static int cfg80211_add_nontrans_list(struct cfg80211_bss *trans_bss, struct cfg80211_bss *nontrans_bss) {
ssid = ieee80211_bss_get_ie(nontrans_bss, WLAN_EID_SSID);
rcu_read_unlock();
list_add_tail(&nontrans_bss->nontrans_list, &trans_bss->nontrans_list);
}
| static int cfg80211_add_nontrans_list(struct cfg80211_bss *trans_bss, struct cfg80211_bss *nontrans_bss) {
ssid = ieee80211_bss_get_ie(nontrans_bss, WLAN_EID_SSID);
rcu_read_unlock();
if (!list_empty(&nontrans_bss->nontrans_list)) {
return -EVAL;
}
list_add_tail(&nontrans_bss->nontrans_list,... | static int cfg80211_add_nontrans_list(struct cfg80211_bss *trans_bss, struct cfg80211_bss *nontrans_bss) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ssid_elem = ieee80211_bss_get_elem(nontrans_bss, WLAN_EID_SSID);
if (!ssid_elem) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return -EVAL;
... | static int cfg80211_add_nontrans_list(struct cfg80211_bss *trans_bss, struct cfg80211_bss *nontrans_bss) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ssid_elem = ieee80211_bss_get_elem(nontrans_bss, WLAN_EID_SSID);
if (!ssid_elem) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return -EVAL;
... | static int cfg80211_add_nontrans_list(struct cfg80211_bss *trans_bss, struct cfg80211_bss *nontrans_bss) {
ssid = ieee80211_bss_get_ie(nontrans_bss, WLAN_EID_SSID);
rcu_read_unlock();
+ if (!list_empty(&nontrans_bss->nontrans_list)) {
+ return -EVAL;
+ }
list_add_tail(&nontrans_bss->nontran... |
CVE-2022-42895 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | l2cap_parse_conf_req | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
struct l2cap_conf_rsp *rsp = data;
void *ptr = rsp->data;
void *endptr = data + data_size;
void *req = chan->conf_req;
int len = chan->conf_len;
int type, hint, olen;
unsigned long val;
struct l2cap_... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
struct l2cap_conf_rsp *rsp = data;
void *ptr = rsp->data;
void *endptr = data + data_size;
void *req = chan->conf_req;
int len = chan->conf_len;
int type, hint, olen;
unsigned long val;
struct l2cap_... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
struct l2cap_conf_rsp *rsp = data;
void *ptr = rsp->data;
void *endptr = data + data_size;
void *req = chan->conf_req;
int len = chan->conf_len;
int type, hint, olen;
unsigned long val;
struct l2cap_... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
struct l2cap_conf_rsp *rsp = data;
void *ptr = rsp->data;
void *endptr = data + data_size;
void *req = chan->conf_req;
int len = chan->conf_len;
int type, hint, olen;
unsigned long val;
struct l2cap_... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
u8 remote_efs = 0;
BT_DBG("chan %p", chan);
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&req, &type, &olen, &val);
if (len... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
u8 remote_efs = 0;
BT_DBG("chan %p", chan);
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&req, &type, &olen, &val);
if (len... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u8 remote_efs = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u8 remote_efs = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
u8 remote_efs = 0;
BT_DBG("chan %p", chan);
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&req, &type, &olen, &val);
... |
CVE-2022-42896 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | l2cap_le_connect_req | static int l2cap_le_connect_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_le_conn_req *req = (struct l2cap_le_conn_req *) data;
struct l2cap_le_conn_rsp rsp;
struct l2cap_chan *chan, *pchan;
u16 dcid, scid, credits, mtu, mps;
__le16 psm;
u8 result;... | static int l2cap_le_connect_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_le_conn_req *req = (struct l2cap_le_conn_req *) data;
struct l2cap_le_conn_rsp rsp;
struct l2cap_chan *chan, *pchan;
u16 dcid, scid, credits, mtu, mps;
__le16 psm;
u8 result;... | static int l2cap_le_connect_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_le_conn_req *req = (struct l2cap_le_conn_req *) data;
struct l2cap_le_conn_rsp rsp;
struct l2cap_chan *chan, *pchan;
u16 dcid, scid, credits, mtu, mps;
__le16 psm;
u8 result;... | static int l2cap_le_connect_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_le_conn_req *req = (struct l2cap_le_conn_req *) data;
struct l2cap_le_conn_rsp rsp;
struct l2cap_chan *chan, *pchan;
u16 dcid, scid, credits, mtu, mps;
__le16 psm;
u8 result;... | static int l2cap_le_connect_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_le_conn_req *req = (struct l2cap_le_conn_req *) data;
scid = __le16_to_cpu(req->scid);
mtu = __le16_to_cpu(req->mtu);
mps = __le16_to_cpu(req->mps);
psm = req->psm;
if (mtu <... | static int l2cap_le_connect_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_le_conn_req *req = (struct l2cap_le_conn_req *) data;
scid = __le16_to_cpu(req->scid);
mtu = __le16_to_cpu(req->mtu);
mps = __le16_to_cpu(req->mps);
psm = req->psm;
if (mtu <... | static int l2cap_le_connect_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_le_conn_req *req = (struct l2cap_le_conn_req *) data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
scid = __le16_to_cpu(req->scid);
mtu = __le16_to_cpu(req->mtu);
mps = __le16_t... | static int l2cap_le_connect_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_le_conn_req *req = (struct l2cap_le_conn_req *) data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
scid = __le16_to_cpu(req->scid);
mtu = __le16_to_cpu(req->mtu);
mps = __le16_t... | static int l2cap_le_connect_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_le_conn_req *req = (struct l2cap_le_conn_req *) data;
scid = __le16_to_cpu(req->scid);
mtu = __le16_to_cpu(req->mtu);
mps = __le16_to_cpu(req->mps);
psm = req->psm;
if... |
CVE-2022-43750 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/usb/mon/mon_bin.c | mon_bin_mmap | static int mon_bin_mmap(struct file *filp, struct vm_area_struct *vma) {
vma->vm_ops = &mon_bin_vm_ops;
vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
vma->vm_private_data = filp->private_data;
mon_bin_vma_open(vma);
return 0;
} | static int mon_bin_mmap(struct file *filp, struct vm_area_struct *vma) {
vma->vm_ops = &mon_bin_vm_ops;
if (vma->vm_flags & VM_WRITE) {
return -EPERM;
}
vma->vm_flags &= ~VM_MAYWRITE;
vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
vma->vm_private_data = filp->private_data;
mon_bin_vma... | static int mon_bin_mmap(struct file *filp, struct vm_area_struct *vma) {
vma->vm_ops = &mon_bin_vm_ops;
vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
vma->vm_private_data = filp->private_data;
mon_bin_vma_open(vma);
return 0;
} | static int mon_bin_mmap(struct file *filp, struct vm_area_struct *vma) {
vma->vm_ops = &mon_bin_vm_ops;
if (vma->vm_flags & VM_WRITE) {
return -EPERM;
}
vma->vm_flags &= ~VM_MAYWRITE;
vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
vma->vm_private_data = filp->private_data;
mon_bin_vma... | static int mon_bin_mmap(struct file *filp, struct vm_area_struct *vma) {
vma->vm_ops = &mon_bin_vm_ops;
vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
vma->vm_private_data = filp->private_data;
mon_bin_vma_open(vma);
return 0;
}
| static int mon_bin_mmap(struct file *filp, struct vm_area_struct *vma) {
vma->vm_ops = &mon_bin_vm_ops;
if (vma->vm_flags & VM_WRITE) {
return -EPERM;
}
vma->vm_flags &= ~VM_MAYWRITE;
vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
vma->vm_private_data = filp->private_data;
mon_bin_vma... | static int mon_bin_mmap(struct file *filp, struct vm_area_struct *vma) {
vma->vm_ops = &mon_bin_vm_ops;
vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
vma->vm_private_data = filp->private_data;
mon_bin_vma_open(vma);
return 0;
}
| static int mon_bin_mmap(struct file *filp, struct vm_area_struct *vma) {
vma->vm_ops = &mon_bin_vm_ops;
if (vma->vm_flags & VM_WRITE) {
return -EPERM;
}
vma->vm_flags &= ~VM_MAYWRITE;
vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
vma->vm_private_data = filp->private_data;
mon_bin_vma... | static int mon_bin_mmap(struct file *filp, struct vm_area_struct *vma) {
vma->vm_ops = &mon_bin_vm_ops;
+ if (vma->vm_flags & VM_WRITE) {
+ return -EPERM;
+ }
+ vma->vm_flags &= ~VM_MAYWRITE;
vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
vma->vm_private_data = filp->private_data;
mo... |
CVE-2022-4378 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/sysctl.c | __do_proc_dointvec | static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos, int (*conv)(bool *negp, unsigned long *lvalp, int *valp, int write,
void *data), void *data) {
int *i, vleft, first = 1, err = 0;
size_t left;
char *p;
... | static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos, int (*conv)(bool *negp, unsigned long *lvalp, int *valp, int write,
void *data), void *data) {
int *i, vleft, first = 1, err = 0;
size_t left;
char *p;
... | static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos, int (*conv)(bool *negp, unsigned long *lvalp, int *valp, int write,
void *data), void *data) {
int *i, vleft, first = 1, err = 0;
size_t left;
char *p;
... | static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos, int (*conv)(bool *negp, unsigned long *lvalp, int *valp, int write,
void *data), void *data) {
int *i, vleft, first = 1, err = 0;
size_t left;
char *p;
... | static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos, int (*conv)(bool *negp, unsigned long *lvalp, int *valp, int write,
void *data), void *data) {
int *i, vleft, first = 1, err = 0;
if (!tbl_data || !table->max... | static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos, int (*conv)(bool *negp, unsigned long *lvalp, int *valp, int write,
void *data), void *data) {
int *i, vleft, first = 1, err = 0;
if (!tbl_data || !table->max... | static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos, int (*conv)(bool *negp, unsigned long *lvalp, int *valp, int write,
void *data), void *data) {
int *i, vleft, first = 1, err = 0;
/* PLACEHOLDER: DO NOT DELET... | static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos, int (*conv)(bool *negp, unsigned long *lvalp, int *valp, int write,
void *data), void *data) {
int *i, vleft, first = 1, err = 0;
/* PLACEHOLDER: DO NOT DELET... | static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos, int (*conv)(bool *negp, unsigned long *lvalp, int *valp, int write,
void *data), void *data) {
int *i, vleft, first = 1, err = 0;
if (!tbl_data || !table-... |
CVE-2022-4378 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/sysctl.c | __do_proc_doulongvec_minmax | static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos, unsigned long convmul, unsigned long convdiv) {
unsigned long *i, *min, *max;
int vleft, first = 1, err = 0;
size_t left;
char *p;
if (!data || !table->maxlen || !*lenp ||... | static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos, unsigned long convmul, unsigned long convdiv) {
unsigned long *i, *min, *max;
int vleft, first = 1, err = 0;
size_t left;
char *p;
if (!data || !table->maxlen || !*lenp ||... | static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos, unsigned long convmul, unsigned long convdiv) {
unsigned long *i, *min, *max;
int vleft, first = 1, err = 0;
size_t left;
char *p;
if (!data || !table->maxlen || !*lenp ||... | static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos, unsigned long convmul, unsigned long convdiv) {
unsigned long *i, *min, *max;
int vleft, first = 1, err = 0;
size_t left;
char *p;
if (!data || !table->maxlen || !*lenp ||... | static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos, unsigned long convmul, unsigned long convdiv) {
int vleft, first = 1, err = 0;
if (!data || !table->maxlen || !*lenp || (*ppos && !write)) {
return 0;
}
i = data;
... | static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos, unsigned long convmul, unsigned long convdiv) {
int vleft, first = 1, err = 0;
if (!data || !table->maxlen || !*lenp || (*ppos && !write)) {
return 0;
}
i = data;
... | static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos, unsigned long convmul, unsigned long convdiv) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int vleft, first = 1, err = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (... | static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos, unsigned long convmul, unsigned long convdiv) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int vleft, first = 1, err = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (... | static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos, unsigned long convmul, unsigned long convdiv) {
int vleft, first = 1, err = 0;
if (!data || !table->maxlen || !*lenp || (*ppos && !write)) {
return 0;
}
i = data... |
CVE-2022-4378 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/sysctl.c | do_proc_douintvec_w | static int do_proc_douintvec_w(unsigned int *tbl_data, struct ctl_table *table, void *buffer, size_t *lenp, loff_t *ppos, int (*conv)(unsigned long *lvalp, unsigned int *valp, int write, void *data),
void *data) {
unsigned long lval;
int err = 0;
size_t left;
bool neg;
... | static int do_proc_douintvec_w(unsigned int *tbl_data, struct ctl_table *table, void *buffer, size_t *lenp, loff_t *ppos, int (*conv)(unsigned long *lvalp, unsigned int *valp, int write, void *data),
void *data) {
unsigned long lval;
int err = 0;
size_t left;
bool neg;
... | static int do_proc_douintvec_w(unsigned int *tbl_data, struct ctl_table *table, void *buffer, size_t *lenp, loff_t *ppos, int (*conv)(unsigned long *lvalp, unsigned int *valp, int write, void *data),
void *data) {
unsigned long lval;
int err = 0;
size_t left;
bool neg;
... | static int do_proc_douintvec_w(unsigned int *tbl_data, struct ctl_table *table, void *buffer, size_t *lenp, loff_t *ppos, int (*conv)(unsigned long *lvalp, unsigned int *valp, int write, void *data),
void *data) {
unsigned long lval;
int err = 0;
size_t left;
bool neg;
... | static int do_proc_douintvec_w(unsigned int *tbl_data, struct ctl_table *table, void *buffer, size_t *lenp, loff_t *ppos, int (*conv)(unsigned long *lvalp, unsigned int *valp, int write, void *data),
void *data) {
char *p = buffer;
left = *lenp;
if (left > PAGE_SIZE - 1) {
... | static int do_proc_douintvec_w(unsigned int *tbl_data, struct ctl_table *table, void *buffer, size_t *lenp, loff_t *ppos, int (*conv)(unsigned long *lvalp, unsigned int *valp, int write, void *data),
void *data) {
char *p = buffer;
left = *lenp;
if (left > PAGE_SIZE - 1) {
... | static int do_proc_douintvec_w(unsigned int *tbl_data, struct ctl_table *table, void *buffer, size_t *lenp, loff_t *ppos, int (*conv)(unsigned long *lvalp, unsigned int *valp, int write, void *data),
void *data) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
char *p = buffer;
... | static int do_proc_douintvec_w(unsigned int *tbl_data, struct ctl_table *table, void *buffer, size_t *lenp, loff_t *ppos, int (*conv)(unsigned long *lvalp, unsigned int *valp, int write, void *data),
void *data) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
char *p = buffer;
... | static int do_proc_douintvec_w(unsigned int *tbl_data, struct ctl_table *table, void *buffer, size_t *lenp, loff_t *ppos, int (*conv)(unsigned long *lvalp, unsigned int *valp, int write, void *data),
void *data) {
char *p = buffer;
left = *lenp;
if (left > PAGE_SIZE - 1) ... |
CVE-2022-4378 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/sysctl.c | proc_skip_spaces | static size_t proc_skip_spaces(char **buf) {
size_t ret;
char *tmp = skip_spaces(*buf);
ret = tmp - *buf;
*buf = tmp;
return ret;
} | static void proc_skip_spaces(char **buf, size_t *size) {
while (*size) {
if (!isspace(**buf)) {
break;
}
(*size)--;
(*buf)++;
}
} | static size_t proc_skip_spaces(char **buf) {
size_t ret;
char *tmp = skip_spaces(*buf);
ret = tmp - *buf;
*buf = tmp;
return ret;
} | static void proc_skip_spaces(char **buf, size_t *size) {
while (*size) {
if (!isspace(**buf)) {
break;
}
(*size)--;
(*buf)++;
}
} | static size_t proc_skip_spaces(char **buf) {
size_t ret;
char *tmp = skip_spaces(*buf);
ret = tmp - *buf;
*buf = tmp;
return ret;
}
| static void proc_skip_spaces(char **buf, size_t *size) {
while (*size) {
if (!isspace(**buf)) {
break;
}
(*size)--;
(*buf)++;
}
}
| static size_t proc_skip_spaces(char **buf) {
size_t ret;
char *tmp = skip_spaces(*buf);
ret = tmp - *buf;
*buf = tmp;
return ret;
}
| static void proc_skip_spaces(char **buf, size_t *size) {
while (*size) {
if (!isspace(**buf)) {
break;
}
(*size)--;
(*buf)++;
}
} | -static size_t proc_skip_spaces(char **buf) {
- size_t ret;
- char *tmp = skip_spaces(*buf);
- ret = tmp - *buf;
- *buf = tmp;
- return ret;
+static void proc_skip_spaces(char **buf, size_t *size) {
+ while (*size) {
+ if (!isspace(**buf)) {
+ break;
+ }
+ (*size)--;
+ ... |
CVE-2022-4379 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/nfsd/nfs4proc.c | nfsd4_copy | static __be32 nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) {
struct nfsd4_copy *copy = &u->copy;
__be32 status;
struct nfsd4_copy *async_copy = NULL;
if (nfsd4_ssc_is_inter(copy)) {
if (!inter_copy_offload_enable || nfsd4_copy_is_sync(copy)) {
... | static __be32 nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) {
struct nfsd4_copy *copy = &u->copy;
__be32 status;
struct nfsd4_copy *async_copy = NULL;
if (nfsd4_ssc_is_inter(copy)) {
if (!inter_copy_offload_enable || nfsd4_copy_is_sync(copy)) {
... | static __be32 nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) {
struct nfsd4_copy *copy = &u->copy;
__be32 status;
struct nfsd4_copy *async_copy = NULL;
if (!copy->cp_intra) {
if (!inter_copy_offload_enable || copy->cp_synchronous) {
statu... | static __be32 nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) {
struct nfsd4_copy *copy = &u->copy;
__be32 status;
struct nfsd4_copy *async_copy = NULL;
if (!copy->cp_intra) {
if (!inter_copy_offload_enable || copy->cp_synchronous) {
statu... | static __be32 nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) {
struct nfsd4_copy *copy = &u->copy;
if (nfsd4_ssc_is_inter(copy)) {
if (!inter_copy_offload_enable || nfsd4_copy_is_sync(copy)) {
goto out;
}
status = nfsd4_setup_inte... | static __be32 nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) {
struct nfsd4_copy *copy = &u->copy;
if (nfsd4_ssc_is_inter(copy)) {
if (!inter_copy_offload_enable || nfsd4_copy_is_sync(copy)) {
goto out;
}
status = nfsd4_setup_inte... | static __be32 nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) {
struct nfsd4_copy *copy = &u->copy;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!copy->cp_intra) {
if (!inter_copy_offload_enable || copy->cp_synchronous) {
/* PLACEHOLDER: DO NOT D... | static __be32 nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) {
struct nfsd4_copy *copy = &u->copy;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!copy->cp_intra) {
if (!inter_copy_offload_enable || copy->cp_synchronous) {
/* PLACEHOLDER: DO NOT D... | static __be32 nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) {
struct nfsd4_copy *copy = &u->copy;
if (nfsd4_ssc_is_inter(copy)) {
if (!inter_copy_offload_enable || nfsd4_copy_is_sync(copy)) {
goto out;
}
status = nfsd4_set... |
CVE-2022-4379 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/nfsd/nfs4proc.c | nfsd4_do_async_copy | static int nfsd4_do_async_copy(void *data) {
struct nfsd4_copy *copy = (struct nfsd4_copy *)data;
__be32 nfserr;
if (nfsd4_ssc_is_inter(copy)) {
struct file *filp;
filp = nfs42_ssc_open(copy->ss_mnt, ©->c_fh, ©->stateid);
if (IS_ERR(filp)) {
switch (PTR_ERR(filp))... | static int nfsd4_do_async_copy(void *data) {
struct nfsd4_copy *copy = (struct nfsd4_copy *)data;
__be32 nfserr;
if (nfsd4_ssc_is_inter(copy)) {
struct file *filp;
filp = nfs42_ssc_open(copy->ss_mnt, ©->c_fh, ©->stateid);
if (IS_ERR(filp)) {
switch (PTR_ERR(filp))... | static int nfsd4_do_async_copy(void *data) {
struct nfsd4_copy *copy = (struct nfsd4_copy *)data;
struct nfsd4_copy *cb_copy;
if (!copy->cp_intra) {
copy->nf_src = kzalloc(sizeof(struct nfsd_file), GFP_KERNEL);
if (!copy->nf_src) {
copy->nfserr = nfserr_serverfault;
n... | static int nfsd4_do_async_copy(void *data) {
struct nfsd4_copy *copy = (struct nfsd4_copy *)data;
struct nfsd4_copy *cb_copy;
if (!copy->cp_intra) {
copy->nf_src = kzalloc(sizeof(struct nfsd_file), GFP_KERNEL);
if (!copy->nf_src) {
copy->nfserr = nfserr_serverfault;
g... | static int nfsd4_do_async_copy(void *data) {
struct nfsd4_copy *copy = (struct nfsd4_copy *)data;
if (nfsd4_ssc_is_inter(copy)) {
filp = nfs42_ssc_open(copy->ss_mnt, ©->c_fh, ©->stateid);
if (IS_ERR(filp)) {
switch (PTR_ERR(filp)) {
case -EBADF:
nf... | static int nfsd4_do_async_copy(void *data) {
struct nfsd4_copy *copy = (struct nfsd4_copy *)data;
if (nfsd4_ssc_is_inter(copy)) {
filp = nfs42_ssc_open(copy->ss_mnt, ©->c_fh, ©->stateid);
if (IS_ERR(filp)) {
switch (PTR_ERR(filp)) {
case -EBADF:
nf... | static int nfsd4_do_async_copy(void *data) {
struct nfsd4_copy *copy = (struct nfsd4_copy *)data;
struct nfsd4_copy *cb_copy;
if (!copy->cp_intra) {
copy->nf_src = kzalloc(sizeof(struct nfsd_file), GFP_KERNEL);
if (!copy->nf_src) {
copy->nfserr = nfserr_serverfault;
n... | static int nfsd4_do_async_copy(void *data) {
struct nfsd4_copy *copy = (struct nfsd4_copy *)data;
struct nfsd4_copy *cb_copy;
if (!copy->cp_intra) {
copy->nf_src = kzalloc(sizeof(struct nfsd_file), GFP_KERNEL);
if (!copy->nf_src) {
copy->nfserr = nfserr_serverfault;
g... | static int nfsd4_do_async_copy(void *data) {
struct nfsd4_copy *copy = (struct nfsd4_copy *)data;
if (nfsd4_ssc_is_inter(copy)) {
filp = nfs42_ssc_open(copy->ss_mnt, ©->c_fh, ©->stateid);
if (IS_ERR(filp)) {
switch (PTR_ERR(filp)) {
case -EBADF:
... |
CVE-2022-4382 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/usb/gadget/legacy/inode.c | gadgetfs_fill_super | static int gadgetfs_fill_super (struct super_block *sb, struct fs_context *fc) {
struct inode *inode;
struct dev_data *dev;
if (the_device) {
return -ESRCH;
}
CHIP = usb_get_gadget_udc_name();
if (!CHIP) {
return -ENODEV;
}
sb->s_blocksize = PAGE_SIZE;
sb->s_blocksize... | static int gadgetfs_fill_super (struct super_block *sb, struct fs_context *fc) {
struct inode *inode;
struct dev_data *dev;
int rc;
mutex_lock(&sb_mutex);
if (the_device) {
rc = -ESRCH;
goto Done;
}
CHIP = usb_get_gadget_udc_name();
if (!CHIP) {
rc = -ENODEV;
... | static int gadgetfs_fill_super (struct super_block *sb, struct fs_context *fc) {
struct inode *inode;
struct dev_data *dev;
if (the_device) {
return -ESRCH;
}
CHIP = usb_get_gadget_udc_name();
if (!CHIP) {
return -ENODEV;
}
sb->s_blocksize = PAGE_SIZE;
sb->s_blocksize... | static int gadgetfs_fill_super (struct super_block *sb, struct fs_context *fc) {
struct inode *inode;
struct dev_data *dev;
int rc;
mutex_lock(&sb_mutex);
if (the_device) {
rc = -ESRCH;
goto Done;
}
CHIP = usb_get_gadget_udc_name();
if (!CHIP) {
rc = -ENODEV;
... | static int gadgetfs_fill_super (struct super_block *sb, struct fs_context *fc) {
struct dev_data *dev;
if (the_device) {
return -ESRCH;
}
if (!CHIP) {
return -ENODEV;
}
the_device = dev;
return 0;
Enomem:
kfree(CHIP);
CHIP = NULL;
return -ENOMEM;
}
| static int gadgetfs_fill_super (struct super_block *sb, struct fs_context *fc) {
struct dev_data *dev;
int rc;
mutex_lock(&sb_mutex);
if (the_device) {
rc = -ESRCH;
goto Done;
}
if (!CHIP) {
rc = -ENODEV;
goto Done;
}
the_device = dev;
rc = 0;
goto... | static int gadgetfs_fill_super (struct super_block *sb, struct fs_context *fc) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct dev_data *dev;
if (the_device) {
return -ESRCH;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!CHIP) {
return -ENODEV;
}
/* PLACEHOL... | static int gadgetfs_fill_super (struct super_block *sb, struct fs_context *fc) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct dev_data *dev;
int rc;
mutex_lock(&sb_mutex);
if (the_device) {
rc = -ESRCH;
goto Done;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if... | static int gadgetfs_fill_super (struct super_block *sb, struct fs_context *fc) {
struct dev_data *dev;
+ int rc;
+ mutex_lock(&sb_mutex);
if (the_device) {
- return -ESRCH;
+ rc = -ESRCH;
+ goto Done;
}
if (!CHIP) {
- return -ENODEV;
+ rc = -ENODEV;
+ ... |
CVE-2022-4382 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/usb/gadget/legacy/inode.c | gadgetfs_kill_sb | static void gadgetfs_kill_sb (struct super_block *sb) {
kill_litter_super (sb);
if (the_device) {
put_dev (the_device);
the_device = NULL;
}
kfree(CHIP);
CHIP = NULL;
} | static void gadgetfs_kill_sb (struct super_block *sb) {
mutex_lock(&sb_mutex);
kill_litter_super (sb);
if (the_device) {
put_dev (the_device);
the_device = NULL;
}
kfree(CHIP);
CHIP = NULL;
mutex_unlock(&sb_mutex);
} | static void gadgetfs_kill_sb (struct super_block *sb) {
kill_litter_super (sb);
if (the_device) {
put_dev (the_device);
the_device = NULL;
}
kfree(CHIP);
CHIP = NULL;
} | static void gadgetfs_kill_sb (struct super_block *sb) {
mutex_lock(&sb_mutex);
kill_litter_super (sb);
if (the_device) {
put_dev (the_device);
the_device = NULL;
}
kfree(CHIP);
CHIP = NULL;
mutex_unlock(&sb_mutex);
} | static void gadgetfs_kill_sb (struct super_block *sb) {
kill_litter_super (sb);
if (the_device) {
put_dev (the_device);
the_device = NULL;
}
kfree(CHIP);
CHIP = NULL;
}
| static void gadgetfs_kill_sb (struct super_block *sb) {
mutex_lock(&sb_mutex);
kill_litter_super (sb);
if (the_device) {
put_dev (the_device);
the_device = NULL;
}
kfree(CHIP);
CHIP = NULL;
mutex_unlock(&sb_mutex);
}
| static void gadgetfs_kill_sb (struct super_block *sb) {
kill_litter_super (sb);
if (the_device) {
put_dev (the_device);
the_device = NULL;
}
kfree(CHIP);
CHIP = NULL;
}
| static void gadgetfs_kill_sb (struct super_block *sb) {
mutex_lock(&sb_mutex);
kill_litter_super (sb);
if (the_device) {
put_dev (the_device);
the_device = NULL;
}
kfree(CHIP);
CHIP = NULL;
mutex_unlock(&sb_mutex);
} | static void gadgetfs_kill_sb (struct super_block *sb) {
+ mutex_lock(&sb_mutex);
kill_litter_super (sb);
if (the_device) {
put_dev (the_device);
the_device = NULL;
}
kfree(CHIP);
CHIP = NULL;
+ mutex_unlock(&sb_mutex);
} |
CVE-2022-43945 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/nfsd/nfsproc.c | nfsd_init_dirlist_pages | static void nfsd_init_dirlist_pages(struct svc_rqst *rqstp, struct nfsd_readdirres *resp, u32 count) {
struct xdr_buf *buf = &resp->dirlist;
struct xdr_stream *xdr = &resp->xdr;
count = clamp(count, (u32)(XDR_UNIT * 2), svc_max_payload(rqstp));
memset(buf, 0, sizeof(*buf));
buf->buflen = count - XDR... | static void nfsd_init_dirlist_pages(struct svc_rqst *rqstp, struct nfsd_readdirres *resp, u32 count) {
struct xdr_buf *buf = &resp->dirlist;
struct xdr_stream *xdr = &resp->xdr;
memset(buf, 0, sizeof(*buf));
buf->buflen = clamp(count, (u32)(XDR_UNIT * 2), (u32)PAGE_SIZE);
buf->buflen -= XDR_UNIT * 2... | static void nfsd_init_dirlist_pages(struct svc_rqst *rqstp, struct nfsd_readdirres *resp, u32 count) {
struct xdr_buf *buf = &resp->dirlist;
struct xdr_stream *xdr = &resp->xdr;
count = clamp(count, (u32)(XDR_UNIT * 2), svc_max_payload(rqstp));
memset(buf, 0, sizeof(*buf));
buf->buflen = count - XDR... | static void nfsd_init_dirlist_pages(struct svc_rqst *rqstp, struct nfsd_readdirres *resp, u32 count) {
struct xdr_buf *buf = &resp->dirlist;
struct xdr_stream *xdr = &resp->xdr;
memset(buf, 0, sizeof(*buf));
buf->buflen = clamp(count, (u32)(XDR_UNIT * 2), (u32)PAGE_SIZE);
buf->buflen -= XDR_UNIT * 2... | static void nfsd_init_dirlist_pages(struct svc_rqst *rqstp, struct nfsd_readdirres *resp, u32 count) {
struct xdr_buf *buf = &resp->dirlist;
struct xdr_stream *xdr = &resp->xdr;
count = clamp(count, (u32)(XDR_UNIT * 2), svc_max_payload(rqstp));
memset(buf, 0, sizeof(*buf));
buf->buflen = count - XDR... | static void nfsd_init_dirlist_pages(struct svc_rqst *rqstp, struct nfsd_readdirres *resp, u32 count) {
struct xdr_buf *buf = &resp->dirlist;
struct xdr_stream *xdr = &resp->xdr;
memset(buf, 0, sizeof(*buf));
buf->buflen = clamp(count, (u32)(XDR_UNIT * 2), (u32)PAGE_SIZE);
buf->buflen -= XDR_UNIT * 2... | static void nfsd_init_dirlist_pages(struct svc_rqst *rqstp, struct nfsd_readdirres *resp, u32 count) {
struct xdr_buf *buf = &resp->dirlist;
struct xdr_stream *xdr = &resp->xdr;
count = clamp(count, (u32)(XDR_UNIT * 2), svc_max_payload(rqstp));
memset(buf, 0, sizeof(*buf));
buf->buflen = count - XDR... | static void nfsd_init_dirlist_pages(struct svc_rqst *rqstp, struct nfsd_readdirres *resp, u32 count) {
struct xdr_buf *buf = &resp->dirlist;
struct xdr_stream *xdr = &resp->xdr;
memset(buf, 0, sizeof(*buf));
buf->buflen = clamp(count, (u32)(XDR_UNIT * 2), (u32)PAGE_SIZE);
buf->buflen -= XDR_UNIT * 2... | static void nfsd_init_dirlist_pages(struct svc_rqst *rqstp, struct nfsd_readdirres *resp, u32 count) {
struct xdr_buf *buf = &resp->dirlist;
struct xdr_stream *xdr = &resp->xdr;
- count = clamp(count, (u32)(XDR_UNIT * 2), svc_max_payload(rqstp));
memset(buf, 0, sizeof(*buf));
- buf->buflen = count... |
CVE-2022-45869 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kvm/mmu/mmu.c | __kvm_mmu_prepare_zap_page | static bool __kvm_mmu_prepare_zap_page(struct kvm *kvm, struct kvm_mmu_page *sp, struct list_head *invalid_list, int *nr_zapped) {
bool list_unstable, zapped_root = false;
trace_kvm_mmu_prepare_zap_page(sp);
++kvm->stat.mmu_shadow_zapped;
*nr_zapped = mmu_zap_unsync_children(kvm, sp, invalid_list);
... | static bool __kvm_mmu_prepare_zap_page(struct kvm *kvm, struct kvm_mmu_page *sp, struct list_head *invalid_list, int *nr_zapped) {
bool list_unstable, zapped_root = false;
lockdep_assert_held_write(&kvm->mmu_lock);
trace_kvm_mmu_prepare_zap_page(sp);
++kvm->stat.mmu_shadow_zapped;
*nr_zapped = mmu_z... | static bool __kvm_mmu_prepare_zap_page(struct kvm *kvm, struct kvm_mmu_page *sp, struct list_head *invalid_list, int *nr_zapped) {
bool list_unstable;
trace_kvm_mmu_prepare_zap_page(sp);
++kvm->stat.mmu_shadow_zapped;
*nr_zapped = mmu_zap_unsync_children(kvm, sp, invalid_list);
*nr_zapped += kvm_mmu... | static bool __kvm_mmu_prepare_zap_page(struct kvm *kvm, struct kvm_mmu_page *sp, struct list_head *invalid_list, int *nr_zapped) {
bool list_unstable;
lockdep_assert_held_write(&kvm->mmu_lock);
trace_kvm_mmu_prepare_zap_page(sp);
++kvm->stat.mmu_shadow_zapped;
*nr_zapped = mmu_zap_unsync_children(kv... | static bool __kvm_mmu_prepare_zap_page(struct kvm *kvm, struct kvm_mmu_page *sp, struct list_head *invalid_list, int *nr_zapped) {
bool list_unstable, zapped_root = false;
trace_kvm_mmu_prepare_zap_page(sp);
}
| static bool __kvm_mmu_prepare_zap_page(struct kvm *kvm, struct kvm_mmu_page *sp, struct list_head *invalid_list, int *nr_zapped) {
bool list_unstable, zapped_root = false;
lockdep_assert_held_write(&kvm->mmu_lock);
trace_kvm_mmu_prepare_zap_page(sp);
}
| static bool __kvm_mmu_prepare_zap_page(struct kvm *kvm, struct kvm_mmu_page *sp, struct list_head *invalid_list, int *nr_zapped) {
bool list_unstable;
trace_kvm_mmu_prepare_zap_page(sp);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static bool __kvm_mmu_prepare_zap_page(struct kvm *kvm, struct kvm_mmu_page *sp, struct list_head *invalid_list, int *nr_zapped) {
bool list_unstable;
lockdep_assert_held_write(&kvm->mmu_lock);
trace_kvm_mmu_prepare_zap_page(sp);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | static bool __kvm_mmu_prepare_zap_page(struct kvm *kvm, struct kvm_mmu_page *sp, struct list_head *invalid_list, int *nr_zapped) {
bool list_unstable, zapped_root = false;
+ lockdep_assert_held_write(&kvm->mmu_lock);
trace_kvm_mmu_prepare_zap_page(sp);
} |
CVE-2022-45869 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kvm/mmu/mmu.c | direct_page_fault | static int direct_page_fault(struct kvm_vcpu *vcpu, struct kvm_page_fault *fault) {
bool is_tdp_mmu_fault = is_tdp_mmu(vcpu->arch.mmu);
unsigned long mmu_seq;
int r;
fault->gfn = fault->addr >> PAGE_SHIFT;
fault->slot = kvm_vcpu_gfn_to_memslot(vcpu, fault->gfn);
if (page_fault_handle_page_track(... | static int direct_page_fault(struct kvm_vcpu *vcpu, struct kvm_page_fault *fault) {
bool is_tdp_mmu_fault = is_tdp_mmu(vcpu->arch.mmu);
unsigned long mmu_seq;
int r;
fault->gfn = fault->addr >> PAGE_SHIFT;
fault->slot = kvm_vcpu_gfn_to_memslot(vcpu, fault->gfn);
if (page_fault_handle_page_track(... | static int direct_page_fault(struct kvm_vcpu *vcpu, gpa_t gpa, u32 error_code, bool prefault, int max_level, bool is_tdp) {
bool is_tdp_mmu_fault = is_tdp_mmu(vcpu->arch.mmu);
bool write = error_code & PFERR_WRITE_MASK;
bool map_writable;
gfn_t gfn = gpa >> PAGE_SHIFT;
unsigned long mmu_seq;
kvm... | static int direct_page_fault(struct kvm_vcpu *vcpu, gpa_t gpa, u32 error_code, bool prefault, int max_level, bool is_tdp) {
bool is_tdp_mmu_fault = is_tdp_mmu(vcpu->arch.mmu);
bool write = error_code & PFERR_WRITE_MASK;
bool map_writable;
gfn_t gfn = gpa >> PAGE_SHIFT;
unsigned long mmu_seq;
kvm... | static int direct_page_fault(struct kvm_vcpu *vcpu, struct kvm_page_fault *fault) {
fault->gfn = fault->addr >> PAGE_SHIFT;
fault->slot = kvm_vcpu_gfn_to_memslot(vcpu, fault->gfn);
if (page_fault_handle_page_track(vcpu, fault)) {
return RET_PF_EMULATE;
}
r = fast_page_fault(vcpu, fault);
... | static int direct_page_fault(struct kvm_vcpu *vcpu, struct kvm_page_fault *fault) {
fault->gfn = fault->addr >> PAGE_SHIFT;
fault->slot = kvm_vcpu_gfn_to_memslot(vcpu, fault->gfn);
if (page_fault_handle_page_track(vcpu, fault)) {
return RET_PF_EMULATE;
}
r = fast_page_fault(vcpu, fault);
... | static int direct_page_fault(struct kvm_vcpu *vcpu, gpa_t gpa, u32 error_code, bool prefault, int max_level, bool is_tdp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (page_fault_handle_page_track(vcpu, error_code, gfn)) {
return RET_PF_EMULATE;
}
r = fast_page_fault(vcpu, gpa, error_code)... | static int direct_page_fault(struct kvm_vcpu *vcpu, gpa_t gpa, u32 error_code, bool prefault, int max_level, bool is_tdp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (page_fault_handle_page_track(vcpu, error_code, gfn)) {
return RET_PF_EMULATE;
}
r = fast_page_fault(vcpu, gpa, error_code)... | static int direct_page_fault(struct kvm_vcpu *vcpu, struct kvm_page_fault *fault) {
fault->gfn = fault->addr >> PAGE_SHIFT;
fault->slot = kvm_vcpu_gfn_to_memslot(vcpu, fault->gfn);
if (page_fault_handle_page_track(vcpu, fault)) {
return RET_PF_EMULATE;
}
r = fast_page_fault(vcpu, faul... |
CVE-2022-45887 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/usb/ttusb-dec/ttusb_dec.c | ttusb_dec_exit_dvb | static void ttusb_dec_exit_dvb(struct ttusb_dec *dec) {
dprintk("%s\n", __func__);
dvb_net_release(&dec->dvb_net);
dec->demux.dmx.close(&dec->demux.dmx);
dec->demux.dmx.remove_frontend(&dec->demux.dmx, &dec->frontend);
dvb_dmxdev_release(&dec->dmxdev);
dvb_dmx_release(&dec->demux);
if (dec->... | static void ttusb_dec_exit_dvb(struct ttusb_dec *dec) {
dprintk("%s\n", __func__);
dvb_net_release(&dec->dvb_net);
dec->demux.dmx.close(&dec->demux.dmx);
dec->demux.dmx.remove_frontend(&dec->demux.dmx, &dec->frontend);
dvb_dmxdev_release(&dec->dmxdev);
dvb_dmx_release(&dec->demux);
if (dec->... | static void ttusb_dec_exit_dvb(struct ttusb_dec *dec) {
dprintk("%s\n", __func__);
dvb_net_release(&dec->dvb_net);
dec->demux.dmx.close(&dec->demux.dmx);
dec->demux.dmx.remove_frontend(&dec->demux.dmx, &dec->frontend);
dvb_dmxdev_release(&dec->dmxdev);
dvb_dmx_release(&dec->demux);
if (dec->... | static void ttusb_dec_exit_dvb(struct ttusb_dec *dec) {
dprintk("%s\n", __func__);
dvb_net_release(&dec->dvb_net);
dec->demux.dmx.close(&dec->demux.dmx);
dec->demux.dmx.remove_frontend(&dec->demux.dmx, &dec->frontend);
dvb_dmxdev_release(&dec->dmxdev);
dvb_dmx_release(&dec->demux);
if (dec->... | static void ttusb_dec_exit_dvb(struct ttusb_dec *dec) {
if (dec->fe) {
dvb_unregister_frontend(dec->fe);
if (dec->fe->ops.release) {
dec->fe->ops.release(dec->fe);
}
}
dvb_unregister_adapter(&dec->adapter);
}
| static void ttusb_dec_exit_dvb(struct ttusb_dec *dec) {
if (dec->fe) {
dvb_unregister_frontend(dec->fe);
dvb_frontend_detach(dec->fe);
}
dvb_unregister_adapter(&dec->adapter);
}
| static void ttusb_dec_exit_dvb(struct ttusb_dec *dec) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (dec->fe) {
dvb_unregister_frontend(dec->fe);
if (dec->fe->ops.release) {
dec->fe->ops.release(dec->fe);
}
}
dvb_unregister_adapter(&dec->adapter);
}
| static void ttusb_dec_exit_dvb(struct ttusb_dec *dec) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (dec->fe) {
dvb_unregister_frontend(dec->fe);
dvb_frontend_detach(dec->fe);
}
dvb_unregister_adapter(&dec->adapter);
} | static void ttusb_dec_exit_dvb(struct ttusb_dec *dec) {
if (dec->fe) {
dvb_unregister_frontend(dec->fe);
- if (dec->fe->ops.release) {
- dec->fe->ops.release(dec->fe);
- }
+ dvb_frontend_detach(dec->fe);
}
dvb_unregister_adapter(&dec->adapter);
} |
CVE-2022-45919 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/dvb-core/dvb_ca_en50221.c | dvb_ca_en50221_init | int dvb_ca_en50221_init(struct dvb_adapter *dvb_adapter, struct dvb_ca_en50221 *pubca, int flags, int slot_count) {
int ret;
struct dvb_ca_private *ca = NULL;
int i;
dprintk("%s\n", __func__);
if (slot_count < 1) {
return -EVAL;
}
ca = kzalloc(sizeof(*ca), GFP_KERNEL);
if (!ca) {... | int dvb_ca_en50221_init(struct dvb_adapter *dvb_adapter, struct dvb_ca_en50221 *pubca, int flags, int slot_count) {
int ret;
struct dvb_ca_private *ca = NULL;
int i;
dprintk("%s\n", __func__);
if (slot_count < 1) {
return -EVAL;
}
ca = kzalloc(sizeof(*ca), GFP_KERNEL);
if (!ca) {... | int dvb_ca_en50221_init(struct dvb_adapter *dvb_adapter, struct dvb_ca_en50221 *pubca, int flags, int slot_count) {
int ret;
struct dvb_ca_private *ca = NULL;
int i;
dprintk("%s\n", __func__);
if (slot_count < 1) {
return -EVAL;
}
ca = kzalloc(sizeof(*ca), GFP_KERNEL);
if (!ca) {... | int dvb_ca_en50221_init(struct dvb_adapter *dvb_adapter, struct dvb_ca_en50221 *pubca, int flags, int slot_count) {
int ret;
struct dvb_ca_private *ca = NULL;
int i;
dprintk("%s\n", __func__);
if (slot_count < 1) {
return -EVAL;
}
ca = kzalloc(sizeof(*ca), GFP_KERNEL);
if (!ca) {... | int dvb_ca_en50221_init(struct dvb_adapter *dvb_adapter, struct dvb_ca_en50221 *pubca, int flags, int slot_count) {
ca = kzalloc(sizeof(*ca), GFP_KERNEL);
if (!ca) {
goto exit;
}
ret = dvb_register_device(dvb_adapter, &ca->dvbdev, &dvbdev_ca, ca, DVB_DEVICE_CA, 0);
mutex_init(&ca->ioctl_mute... | int dvb_ca_en50221_init(struct dvb_adapter *dvb_adapter, struct dvb_ca_en50221 *pubca, int flags, int slot_count) {
ca = kzalloc(sizeof(*ca), GFP_KERNEL);
if (!ca) {
goto exit;
}
ret = dvb_register_device(dvb_adapter, &ca->dvbdev, &dvbdev_ca, ca, DVB_DEVICE_CA, 0);
mutex_init(&ca->ioctl_mute... | int dvb_ca_en50221_init(struct dvb_adapter *dvb_adapter, struct dvb_ca_en50221 *pubca, int flags, int slot_count) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ca = kzalloc(sizeof(*ca), GFP_KERNEL);
if (!ca) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
goto exit;
}
/* PLACEHOLDER: D... | int dvb_ca_en50221_init(struct dvb_adapter *dvb_adapter, struct dvb_ca_en50221 *pubca, int flags, int slot_count) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ca = kzalloc(sizeof(*ca), GFP_KERNEL);
if (!ca) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
goto exit;
}
/* PLACEHOLDER: D... | int dvb_ca_en50221_init(struct dvb_adapter *dvb_adapter, struct dvb_ca_en50221 *pubca, int flags, int slot_count) {
ca = kzalloc(sizeof(*ca), GFP_KERNEL);
if (!ca) {
goto exit;
}
ret = dvb_register_device(dvb_adapter, &ca->dvbdev, &dvbdev_ca, ca, DVB_DEVICE_CA, 0);
mutex_init(&ca->ioc... |
CVE-2022-45919 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/dvb-core/dvb_ca_en50221.c | dvb_ca_en50221_io_open | static int dvb_ca_en50221_io_open(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dvb_ca_private *ca = dvbdev->priv;
int err;
int i;
dprintk("%s\n", __func__);
if (!try_module_get(ca->pub->owner)) {
return -EIO;
}
err = dvb_generic... | static int dvb_ca_en50221_io_open(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dvb_ca_private *ca = dvbdev->priv;
int err;
int i;
dprintk("%s\n", __func__);
mutex_lock(&ca->remove_mutex);
if (ca->exit) {
mutex_unlock(&ca->remove_mut... | static int dvb_ca_en50221_io_open(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dvb_ca_private *ca = dvbdev->priv;
int err;
int i;
dprintk("%s\n", __func__);
if (!try_module_get(ca->pub->owner)) {
return -EIO;
}
err = dvb_generic... | static int dvb_ca_en50221_io_open(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dvb_ca_private *ca = dvbdev->priv;
int err;
int i;
dprintk("%s\n", __func__);
mutex_lock(&ca->remove_mutex);
if (ca->exit) {
mutex_unlock(&ca->remove_mut... | static int dvb_ca_en50221_io_open(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dvb_ca_private *ca = dvbdev->priv;
dprintk("%s\n", __func__);
if (!try_module_get(ca->pub->owner)) {
return -EIO;
}
if (err < 0) {
module_put(ca->pub... | static int dvb_ca_en50221_io_open(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dvb_ca_private *ca = dvbdev->priv;
dprintk("%s\n", __func__);
mutex_lock(&ca->remove_mutex);
if (ca->exit) {
mutex_unlock(&ca->remove_mutex);
return -ENO... | static int dvb_ca_en50221_io_open(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dvb_ca_private *ca = dvbdev->priv;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dprintk("%s\n", __func__);
if (!try_module_get(ca->pub->owner)) {
return -EIO;
... | static int dvb_ca_en50221_io_open(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dvb_ca_private *ca = dvbdev->priv;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dprintk("%s\n", __func__);
mutex_lock(&ca->remove_mutex);
if (ca->exit) {
mu... | static int dvb_ca_en50221_io_open(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dvb_ca_private *ca = dvbdev->priv;
dprintk("%s\n", __func__);
+ mutex_lock(&ca->remove_mutex);
+ if (ca->exit) {
+ mutex_unlock(&ca->remove_mutex);
+ ret... |
CVE-2022-45919 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/dvb-core/dvb_ca_en50221.c | dvb_ca_en50221_io_release | static int dvb_ca_en50221_io_release(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dvb_ca_private *ca = dvbdev->priv;
int err;
dprintk("%s\n", __func__);
ca->open = 0;
dvb_ca_en50221_thread_update_delay(ca);
err = dvb_generic_release(inode, ... | static int dvb_ca_en50221_io_release(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dvb_ca_private *ca = dvbdev->priv;
int err;
dprintk("%s\n", __func__);
mutex_lock(&ca->remove_mutex);
ca->open = 0;
dvb_ca_en50221_thread_update_delay(ca);
... | static int dvb_ca_en50221_io_release(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dvb_ca_private *ca = dvbdev->priv;
int err;
dprintk("%s\n", __func__);
ca->open = 0;
dvb_ca_en50221_thread_update_delay(ca);
err = dvb_generic_release(inode, ... | static int dvb_ca_en50221_io_release(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dvb_ca_private *ca = dvbdev->priv;
int err;
dprintk("%s\n", __func__);
mutex_lock(&ca->remove_mutex);
ca->open = 0;
dvb_ca_en50221_thread_update_delay(ca);
... | static int dvb_ca_en50221_io_release(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dvb_ca_private *ca = dvbdev->priv;
dprintk("%s\n", __func__);
ca->open = 0;
dvb_ca_en50221_thread_update_delay(ca);
dvb_ca_private_put(ca);
return err;
}
| static int dvb_ca_en50221_io_release(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dvb_ca_private *ca = dvbdev->priv;
dprintk("%s\n", __func__);
mutex_lock(&ca->remove_mutex);
ca->open = 0;
dvb_ca_en50221_thread_update_delay(ca);
dvb_ca_priv... | static int dvb_ca_en50221_io_release(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dvb_ca_private *ca = dvbdev->priv;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dprintk("%s\n", __func__);
ca->open = 0;
dvb_ca_en50221_thread_update_delay(ca);
... | static int dvb_ca_en50221_io_release(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dvb_ca_private *ca = dvbdev->priv;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dprintk("%s\n", __func__);
mutex_lock(&ca->remove_mutex);
ca->open = 0;
dvb_c... | static int dvb_ca_en50221_io_release(struct inode *inode, struct file *file) {
struct dvb_device *dvbdev = file->private_data;
struct dvb_ca_private *ca = dvbdev->priv;
dprintk("%s\n", __func__);
+ mutex_lock(&ca->remove_mutex);
ca->open = 0;
dvb_ca_en50221_thread_update_delay(ca);
dvb... |
CVE-2022-45919 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/dvb-core/dvb_ca_en50221.c | dvb_ca_en50221_release | void dvb_ca_en50221_release(struct dvb_ca_en50221 *pubca) {
struct dvb_ca_private *ca = pubca->private;
int i;
dprintk("%s\n", __func__);
kthread_stop(ca->thread);
for (i = 0; i < ca->slot_count; i++)
dvb_ca_en50221_slot_shutdown(ca, i);
dvb_remove_device(ca->dvbdev);
dvb_ca_private_... | void dvb_ca_en50221_release(struct dvb_ca_en50221 *pubca) {
struct dvb_ca_private *ca = pubca->private;
int i;
dprintk("%s\n", __func__);
mutex_lock(&ca->remove_mutex);
ca->exit = 1;
mutex_unlock(&ca->remove_mutex);
if (ca->dvbdev->users < 1) {
wait_event(ca->dvbdev->wait_queue, ca->... | void dvb_ca_en50221_release(struct dvb_ca_en50221 *pubca) {
struct dvb_ca_private *ca = pubca->private;
int i;
dprintk("%s\n", __func__);
kthread_stop(ca->thread);
for (i = 0; i < ca->slot_count; i++)
dvb_ca_en50221_slot_shutdown(ca, i);
dvb_remove_device(ca->dvbdev);
dvb_ca_private_... | void dvb_ca_en50221_release(struct dvb_ca_en50221 *pubca) {
struct dvb_ca_private *ca = pubca->private;
int i;
dprintk("%s\n", __func__);
mutex_lock(&ca->remove_mutex);
ca->exit = 1;
mutex_unlock(&ca->remove_mutex);
if (ca->dvbdev->users < 1) {
wait_event(ca->dvbdev->wait_queue, ca->... | void dvb_ca_en50221_release(struct dvb_ca_en50221 *pubca) {
struct dvb_ca_private *ca = pubca->private;
dprintk("%s\n", __func__);
kthread_stop(ca->thread);
for (i = 0; i < ca->slot_count; i++)
dvb_ca_en50221_slot_shutdown(ca, i);
dvb_remove_device(ca->dvbdev);
dvb_ca_private_put(ca);
}
| void dvb_ca_en50221_release(struct dvb_ca_en50221 *pubca) {
struct dvb_ca_private *ca = pubca->private;
dprintk("%s\n", __func__);
mutex_lock(&ca->remove_mutex);
ca->exit = 1;
mutex_unlock(&ca->remove_mutex);
if (ca->dvbdev->users < 1) {
wait_event(ca->dvbdev->wait_queue, ca->dvbdev->use... | void dvb_ca_en50221_release(struct dvb_ca_en50221 *pubca) {
struct dvb_ca_private *ca = pubca->private;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dprintk("%s\n", __func__);
kthread_stop(ca->thread);
for (i = 0; i < ca->slot_count; i++)
dvb_ca_en50221_slot_shutdown(ca, i);
dvb_remove_... | void dvb_ca_en50221_release(struct dvb_ca_en50221 *pubca) {
struct dvb_ca_private *ca = pubca->private;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dprintk("%s\n", __func__);
mutex_lock(&ca->remove_mutex);
ca->exit = 1;
mutex_unlock(&ca->remove_mutex);
if (ca->dvbdev->users < 1) {
... | void dvb_ca_en50221_release(struct dvb_ca_en50221 *pubca) {
struct dvb_ca_private *ca = pubca->private;
dprintk("%s\n", __func__);
+ mutex_lock(&ca->remove_mutex);
+ ca->exit = 1;
+ mutex_unlock(&ca->remove_mutex);
+ if (ca->dvbdev->users < 1) {
+ wait_event(ca->dvbdev->wait_queue, ca->dvb... |
CVE-2022-45934 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | l2cap_config_req | static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_req *req = (struct l2cap_conf_req *) data;
u16 dcid, flags;
u8 rsp[64];
struct l2cap_chan *chan;
int len, err = 0;
if (cmd_len < sizeof(*req)) {
return -EPROT... | static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_req *req = (struct l2cap_conf_req *) data;
u16 dcid, flags;
u8 rsp[64];
struct l2cap_chan *chan;
int len, err = 0;
if (cmd_len < sizeof(*req)) {
return -EPROT... | static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_req *req = (struct l2cap_conf_req *) data;
u16 dcid, flags;
u8 rsp[64];
struct l2cap_chan *chan;
int len, err = 0;
if (cmd_len < sizeof(*req)) {
return -EPROT... | static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_req *req = (struct l2cap_conf_req *) data;
u16 dcid, flags;
u8 rsp[64];
struct l2cap_chan *chan;
int len, err = 0;
if (cmd_len < sizeof(*req)) {
return -EPROT... | static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_req *req = (struct l2cap_conf_req *) data;
dcid = __le16_to_cpu(req->dcid);
flags = __le16_to_cpu(req->flags);
BT_DBG("dcid 0x%4.4x flags 0x%2.2x", dcid, flags);
chan = l... | static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_req *req = (struct l2cap_conf_req *) data;
dcid = __le16_to_cpu(req->dcid);
flags = __le16_to_cpu(req->flags);
BT_DBG("dcid 0x%4.4x flags 0x%2.2x", dcid, flags);
chan = l... | static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_req *req = (struct l2cap_conf_req *) data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dcid = __le16_to_cpu(req->dcid);
flags = __le16_to_cpu(req->flags);
BT_DBG("dcid ... | static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_req *req = (struct l2cap_conf_req *) data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dcid = __le16_to_cpu(req->dcid);
flags = __le16_to_cpu(req->flags);
BT_DBG("dcid ... | static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_req *req = (struct l2cap_conf_req *) data;
dcid = __le16_to_cpu(req->dcid);
flags = __le16_to_cpu(req->flags);
BT_DBG("dcid 0x%4.4x flags 0x%2.2x", dcid, flags);
ch... |
CVE-2022-4662 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/usb/core/hub.c | usb_reset_device | int usb_reset_device(struct usb_device *udev) {
int ret;
int i;
unsigned int noio_flag;
struct usb_port *port_dev;
struct usb_host_config *config = udev->actconfig;
struct usb_hub *hub = usb_hub_to_struct_hub(udev->parent);
if (udev->state == USB_STATE_NOTATTACHED) {
dev_dbg(&udev->d... | int usb_reset_device(struct usb_device *udev) {
int ret;
int i;
unsigned int noio_flag;
struct usb_port *port_dev;
struct usb_host_config *config = udev->actconfig;
struct usb_hub *hub = usb_hub_to_struct_hub(udev->parent);
if (udev->state == USB_STATE_NOTATTACHED) {
dev_dbg(&udev->d... | int usb_reset_device(struct usb_device *udev) {
int ret;
int i;
unsigned int noio_flag;
struct usb_port *port_dev;
struct usb_host_config *config = udev->actconfig;
struct usb_hub *hub = usb_hub_to_struct_hub(udev->parent);
if (udev->state == USB_STATE_NOTATTACHED) {
dev_dbg(&udev->d... | int usb_reset_device(struct usb_device *udev) {
int ret;
int i;
unsigned int noio_flag;
struct usb_port *port_dev;
struct usb_host_config *config = udev->actconfig;
struct usb_hub *hub = usb_hub_to_struct_hub(udev->parent);
if (udev->state == USB_STATE_NOTATTACHED) {
dev_dbg(&udev->d... | int usb_reset_device(struct usb_device *udev) {
if (!udev->parent) {
return -EISDIR;
}
port_dev = hub->ports[udev->portnum - 1];
usb_autoresume_device(udev);
ret = usb_reset_and_verify_device(udev);
if (config) {
if (ret == 0) {
usb_unbind_and_rebind_marked_interfaces... | int usb_reset_device(struct usb_device *udev) {
if (!udev->parent) {
return -EISDIR;
}
if (udev->reset_in_progress) {
return -EPROGRESS;
}
udev->reset_in_progress = 1;
port_dev = hub->ports[udev->portnum - 1];
usb_autoresume_device(udev);
ret = usb_reset_and_verify_device... | int usb_reset_device(struct usb_device *udev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!udev->parent) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return -EISDIR;
}
port_dev = hub->ports[udev->portnum - 1];
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
usb_autoresume_de... | int usb_reset_device(struct usb_device *udev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!udev->parent) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return -EISDIR;
}
if (udev->reset_in_progress) {
return -EPROGRESS;
}
udev->reset_in_progress = 1;
port_dev = h... | int usb_reset_device(struct usb_device *udev) {
if (!udev->parent) {
return -EISDIR;
}
+ if (udev->reset_in_progress) {
+ return -EPROGRESS;
+ }
+ udev->reset_in_progress = 1;
port_dev = hub->ports[udev->portnum - 1];
usb_autoresume_device(udev);
ret = usb_reset_and_ve... |
CVE-2022-47518 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/microchip/wilc1000/cfg80211.c | wilc_wfi_cfg_parse_ch_attr | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
struct wilc_attr_entry *e;
struct wilc_attr_ch_list *ch_list;
struct wilc_attr_oper_ch *op_ch;
u32 index = 0;
u8 ch_list_idx = 0;
u8 op_ch_idx = 0;
if (sta_ch == WILC_VALID_CHANNEL) {
return;
}
while... | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
struct wilc_attr_entry *e;
struct wilc_attr_ch_list *ch_list;
struct wilc_attr_oper_ch *op_ch;
u32 index = 0;
u8 ch_list_idx = 0;
u8 op_ch_idx = 0;
if (sta_ch == WILC_VALID_CHANNEL) {
return;
}
while... | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
struct wilc_attr_entry *e;
struct wilc_attr_ch_list *ch_list;
struct wilc_attr_oper_ch *op_ch;
u32 index = 0;
u8 ch_list_idx = 0;
u8 op_ch_idx = 0;
if (sta_ch == WILC_VALID_CHANNEL) {
return;
}
while... | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
struct wilc_attr_entry *e;
struct wilc_attr_ch_list *ch_list;
struct wilc_attr_oper_ch *op_ch;
u32 index = 0;
u8 ch_list_idx = 0;
u8 op_ch_idx = 0;
if (sta_ch == WILC_VALID_CHANNEL) {
return;
}
while... | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
if (ch_list_idx) {
u16 attr_size;
struct wilc_ch_list_elem *e;
int i;
ch_list = (struct wilc_attr_ch_list *)&buf[ch_list_idx];
attr_size = le16_to_cpu(ch_list->attr_len);
for (i = 0; i < attr... | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
if (ch_list_idx) {
unsigned int i;
u16 elem_size;
ch_list = (struct wilc_attr_ch_list *)&buf[ch_list_idx];
elem_size = le16_to_cpu(ch_list->attr_len) - (sizeof(*ch_list) - sizeof(struct wilc_attr_entry));
... | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (ch_list_idx) {
u16 attr_size;
struct wilc_ch_list_elem *e;
int i;
ch_list = (struct wilc_attr_ch_list *)&buf[ch_list_idx];
attr_size = le16_to_cp... | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (ch_list_idx) {
u16 elem_size;
ch_list = (struct wilc_attr_ch_list *)&buf[ch_list_idx];
elem_size = le16_to_cpu(ch_list->attr_len) - (sizeof(*ch_list) - sizeof(st... | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
if (ch_list_idx) {
- u16 attr_size;
- struct wilc_ch_list_elem *e;
- int i;
+ unsigned int i;
+ u16 elem_size;
ch_list = (struct wilc_attr_ch_list *)&buf[ch_list_idx];
- attr_size = le16... |
CVE-2022-47519 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/microchip/wilc1000/cfg80211.c | wilc_wfi_cfg_parse_ch_attr | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
struct wilc_attr_entry *e;
struct wilc_attr_ch_list *ch_list;
struct wilc_attr_oper_ch *op_ch;
u32 index = 0;
u8 ch_list_idx = 0;
u8 op_ch_idx = 0;
if (sta_ch == WILC_VALID_CHANNEL) {
return;
}
while... | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
struct wilc_attr_entry *e;
struct wilc_attr_ch_list *ch_list;
struct wilc_attr_oper_ch *op_ch;
u32 index = 0;
u8 ch_list_idx = 0;
u8 op_ch_idx = 0;
if (sta_ch == WILC_VALID_CHANNEL) {
return;
}
while... | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
struct wilc_attr_entry *e;
struct wilc_attr_ch_list *ch_list;
struct wilc_attr_oper_ch *op_ch;
u32 index = 0;
u8 ch_list_idx = 0;
u8 op_ch_idx = 0;
if (sta_ch == WILC_VALID_CHANNEL) {
return;
}
while... | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
struct wilc_attr_entry *e;
struct wilc_attr_ch_list *ch_list;
struct wilc_attr_oper_ch *op_ch;
u32 index = 0;
u8 ch_list_idx = 0;
u8 op_ch_idx = 0;
if (sta_ch == WILC_VALID_CHANNEL) {
return;
}
while... | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
u32 index = 0;
while (index + sizeof(*e) <= len) {
e = (struct wilc_attr_entry *)&buf[index];
if (e->attr_type == IEEE80211_P2P_ATTR_CHANNEL_LIST) {
ch_list_idx = index;
} else if (e->attr_type == IE... | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
u32 index = 0;
while (index + sizeof(*e) <= len) {
u16 attr_size;
e = (struct wilc_attr_entry *)&buf[index];
attr_size = le16_to_cpu(e->attr_len);
if (index + sizeof(*e) + attr_size > len) {
... | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u32 index = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (index + sizeof(*e) <= len) {
e = (struct wilc_attr_entry *)&buf[index];
if (e->attr_type == IEEE8... | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u32 index = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (index + sizeof(*e) <= len) {
u16 attr_size;
e = (struct wilc_attr_entry *)&buf[index];
at... | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
u32 index = 0;
while (index + sizeof(*e) <= len) {
+ u16 attr_size;
e = (struct wilc_attr_entry *)&buf[index];
+ attr_size = le16_to_cpu(e->attr_len);
+ if (index + sizeof(*e) + attr_size > len) {
+ ... |
CVE-2022-47520 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/microchip/wilc1000/hif.c | wilc_parse_join_bss_param | void *wilc_parse_join_bss_param(struct cfg80211_bss *bss, struct cfg80211_crypto_settings *crypto) {
struct wilc_join_bss_param *param;
struct ieee80211_p2p_noa_attr noa_attr;
u8 rates_len = 0;
const u8 *tim_elm, *ssid_elm, *rates_ie, *supp_rates_ie;
const u8 *ht_ie, *wpa_ie, *wmm_ie, *rsn_ie;
i... | void *wilc_parse_join_bss_param(struct cfg80211_bss *bss, struct cfg80211_crypto_settings *crypto) {
struct wilc_join_bss_param *param;
struct ieee80211_p2p_noa_attr noa_attr;
u8 rates_len = 0;
const u8 *tim_elm, *ssid_elm, *rates_ie, *supp_rates_ie;
const u8 *ht_ie, *wpa_ie, *wmm_ie, *rsn_ie;
i... | void *wilc_parse_join_bss_param(struct cfg80211_bss *bss, struct cfg80211_crypto_settings *crypto) {
struct wilc_join_bss_param *param;
struct ieee80211_p2p_noa_attr noa_attr;
u8 rates_len = 0;
const u8 *tim_elm, *ssid_elm, *rates_ie, *supp_rates_ie;
const u8 *ht_ie, *wpa_ie, *wmm_ie, *rsn_ie;
i... | void *wilc_parse_join_bss_param(struct cfg80211_bss *bss, struct cfg80211_crypto_settings *crypto) {
struct wilc_join_bss_param *param;
struct ieee80211_p2p_noa_attr noa_attr;
u8 rates_len = 0;
const u8 *tim_elm, *ssid_elm, *rates_ie, *supp_rates_ie;
const u8 *ht_ie, *wpa_ie, *wmm_ie, *rsn_ie;
i... | void *wilc_parse_join_bss_param(struct cfg80211_bss *bss, struct cfg80211_crypto_settings *crypto) {
const struct cfg80211_bss_ies *ies = rcu_dereference(bss->ies);
ssid_elm = cfg80211_find_ie(WLAN_EID_SSID, ies->data, ies->len);
tim_elm = cfg80211_find_ie(WLAN_EID_TIM, ies->data, ies->len);
rates_ie = ... | void *wilc_parse_join_bss_param(struct cfg80211_bss *bss, struct cfg80211_crypto_settings *crypto) {
const struct cfg80211_bss_ies *ies = rcu_dereference(bss->ies);
ssid_elm = cfg80211_find_ie(WLAN_EID_SSID, ies->data, ies->len);
tim_elm = cfg80211_find_ie(WLAN_EID_TIM, ies->data, ies->len);
rates_ie = ... | void *wilc_parse_join_bss_param(struct cfg80211_bss *bss, struct cfg80211_crypto_settings *crypto) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
const struct cfg80211_bss_ies *ies = rcu_dereference(bss->ies);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ssid_elm = cfg80211_find_ie(WLAN_EID_SSID, ies-... | void *wilc_parse_join_bss_param(struct cfg80211_bss *bss, struct cfg80211_crypto_settings *crypto) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
const struct cfg80211_bss_ies *ies = rcu_dereference(bss->ies);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ssid_elm = cfg80211_find_ie(WLAN_EID_SSID, ies-... | void *wilc_parse_join_bss_param(struct cfg80211_bss *bss, struct cfg80211_crypto_settings *crypto) {
const struct cfg80211_bss_ies *ies = rcu_dereference(bss->ies);
ssid_elm = cfg80211_find_ie(WLAN_EID_SSID, ies->data, ies->len);
tim_elm = cfg80211_find_ie(WLAN_EID_TIM, ies->data, ies->len);
rates_... |
CVE-2022-47521 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/microchip/wilc1000/cfg80211.c | wilc_wfi_cfg_parse_ch_attr | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
struct wilc_attr_entry *e;
struct wilc_attr_ch_list *ch_list;
struct wilc_attr_oper_ch *op_ch;
u32 index = 0;
u8 ch_list_idx = 0;
u8 op_ch_idx = 0;
if (sta_ch == WILC_VALID_CHANNEL) {
return;
}
while... | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
struct wilc_attr_entry *e;
struct wilc_attr_ch_list *ch_list;
struct wilc_attr_oper_ch *op_ch;
u32 index = 0;
u8 ch_list_idx = 0;
u8 op_ch_idx = 0;
if (sta_ch == WILC_VALID_CHANNEL) {
return;
}
while... | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
struct wilc_attr_entry *e;
struct wilc_attr_ch_list *ch_list;
struct wilc_attr_oper_ch *op_ch;
u32 index = 0;
u8 ch_list_idx = 0;
u8 op_ch_idx = 0;
if (sta_ch == WILC_VALID_CHANNEL) {
return;
}
while... | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
struct wilc_attr_entry *e;
struct wilc_attr_ch_list *ch_list;
struct wilc_attr_oper_ch *op_ch;
u32 index = 0;
u8 ch_list_idx = 0;
u8 op_ch_idx = 0;
if (sta_ch == WILC_VALID_CHANNEL) {
return;
}
while... | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
while (index + sizeof(*e) <= len) {
u16 attr_size;
e = (struct wilc_attr_entry *)&buf[index];
attr_size = le16_to_cpu(e->attr_len);
if (index + sizeof(*e) + attr_size > len) {
return;
}
... | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
while (index + sizeof(*e) <= len) {
u16 attr_size;
e = (struct wilc_attr_entry *)&buf[index];
attr_size = le16_to_cpu(e->attr_len);
if (index + sizeof(*e) + attr_size > len) {
return;
}
... | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (index + sizeof(*e) <= len) {
u16 attr_size;
e = (struct wilc_attr_entry *)&buf[index];
attr_size = le16_to_cpu(e->attr_len);
if (index + sizeof(*e) + ... | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (index + sizeof(*e) <= len) {
u16 attr_size;
e = (struct wilc_attr_entry *)&buf[index];
attr_size = le16_to_cpu(e->attr_len);
if (index + sizeof(*e) + ... | static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u32 len, u8 sta_ch) {
while (index + sizeof(*e) <= len) {
u16 attr_size;
e = (struct wilc_attr_entry *)&buf[index];
attr_size = le16_to_cpu(e->attr_len);
if (index + sizeof(*e) + attr_size > len) {
return;
... |
CVE-2022-47929 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/sched/sch_api.c | qdisc_graft | static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, struct sk_buff *skb, struct nlmsghdr *n, u32 classid, struct Qdisc *new, struct Qdisc *old, struct netlink_ext_ack *extack) {
struct Qdisc *q = old;
struct net *net = dev_net(dev);
if (parent == NULL) {
unsigned int i, num_q, ingre... | static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, struct sk_buff *skb, struct nlmsghdr *n, u32 classid, struct Qdisc *new, struct Qdisc *old, struct netlink_ext_ack *extack) {
struct Qdisc *q = old;
struct net *net = dev_net(dev);
if (parent == NULL) {
unsigned int i, num_q, ingre... | static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, struct sk_buff *skb, struct nlmsghdr *n, u32 classid, struct Qdisc *new, struct Qdisc *old, struct netlink_ext_ack *extack) {
struct Qdisc *q = old;
struct net *net = dev_net(dev);
if (parent == NULL) {
unsigned int i, num_q, ingre... | static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, struct sk_buff *skb, struct nlmsghdr *n, u32 classid, struct Qdisc *new, struct Qdisc *old, struct netlink_ext_ack *extack) {
struct Qdisc *q = old;
struct net *net = dev_net(dev);
if (parent == NULL) {
unsigned int i, num_q, ingre... | static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, struct sk_buff *skb, struct nlmsghdr *n, u32 classid, struct Qdisc *new, struct Qdisc *old, struct netlink_ext_ack *extack) {
if (parent == NULL) {
} else {
if (new && (new->flags & TCQ_F_NOLOCK) && !(parent->flags & TCQ_F_NOLOCK)) {
... | static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, struct sk_buff *skb, struct nlmsghdr *n, u32 classid, struct Qdisc *new, struct Qdisc *old, struct netlink_ext_ack *extack) {
if (parent == NULL) {
} else {
if (new && (new->flags & TCQ_F_NOLOCK) && !(parent->flags & TCQ_F_NOLOCK)) {
... | static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, struct sk_buff *skb, struct nlmsghdr *n, u32 classid, struct Qdisc *new, struct Qdisc *old, struct netlink_ext_ack *extack) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (parent == NULL) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */... | static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, struct sk_buff *skb, struct nlmsghdr *n, u32 classid, struct Qdisc *new, struct Qdisc *old, struct netlink_ext_ack *extack) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (parent == NULL) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */... | static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, struct sk_buff *skb, struct nlmsghdr *n, u32 classid, struct Qdisc *new, struct Qdisc *old, struct netlink_ext_ack *extack) {
if (parent == NULL) {
} else {
if (new && (new->flags & TCQ_F_NOLOCK) && !(parent->flags & TCQ_F_NOLOCK))... |
CVE-2022-47938 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ksmbd/smb2misc.c | smb2_get_data_area_len | static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, struct smb2_hdr *hdr) {
int ret = 0;
*off = 0;
*len = 0;
if (hdr->Status && hdr->Status != STATUS_MORE_PROCESSG_REQUIRED && (((struct smb2_err_rsp *)hdr)->StructureSize) == SMB2_ERROR_STRUCTURE_SIZE2_LE) {
return ret;
}
... | static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, struct smb2_hdr *hdr) {
int ret = 0;
*off = 0;
*len = 0;
switch (hdr->Command) {
case SMB2_SESSION_SETUP:
*off = le16_to_cpu(((struct smb2_sess_setup_req *)hdr)->SecurityBufferOffset);
*len = le16_to_cpu(((struct... | static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, struct smb2_hdr *hdr) {
int ret = 0;
*off = 0;
*len = 0;
if (hdr->Status && hdr->Status != STATUS_MORE_PROCESSG_REQUIRED && (((struct smb2_err_rsp *)hdr)->StructureSize) == SMB2_ERROR_STRUCTURE_SIZE2_LE) {
return ret;
}
... | static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, struct smb2_hdr *hdr) {
int ret = 0;
*off = 0;
*len = 0;
switch (hdr->Command) {
case SMB2_SESSION_SETUP:
*off = le16_to_cpu(((struct smb2_sess_setup_req *)hdr)->SecurityBufferOffset);
*len = le16_to_cpu(((struct... | static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, struct smb2_hdr *hdr) {
int ret = 0;
*len = 0;
if (hdr->Status && hdr->Status != STATUS_MORE_PROCESSG_REQUIRED && (((struct smb2_err_rsp *)hdr)->StructureSize) == SMB2_ERROR_STRUCTURE_SIZE2_LE) {
return ret;
}
switch (hd... | static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, struct smb2_hdr *hdr) {
int ret = 0;
*len = 0;
switch (hdr->Command) {
case SMB2_SESSION_SETUP:
*off = le16_to_cpu(((struct smb2_sess_setup_req *)hdr)->SecurityBufferOffset);
*len = le16_to_cpu(((struct smb2_sess_set... | static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, struct smb2_hdr *hdr) {
int ret = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
*len = 0;
if (hdr->Status && hdr->Status != STATUS_MORE_PROCESSG_REQUIRED && (((struct smb2_err_rsp *)hdr)->StructureSize) == SMB2_ERROR_STRUCTURE_SI... | static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, struct smb2_hdr *hdr) {
int ret = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
*len = 0;
switch (hdr->Command) {
case SMB2_SESSION_SETUP:
*off = le16_to_cpu(((struct smb2_sess_setup_req *)hdr)->SecurityBufferOffset);... | static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, struct smb2_hdr *hdr) {
int ret = 0;
*len = 0;
- if (hdr->Status && hdr->Status != STATUS_MORE_PROCESSG_REQUIRED && (((struct smb2_err_rsp *)hdr)->StructureSize) == SMB2_ERROR_STRUCTURE_SIZE2_LE) {
- return ret;
- }
swi... |
CVE-2022-47939 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ksmbd/smb2pdu.c | smb2_tree_disconnect | int smb2_tree_disconnect(struct ksmbd_work *work) {
struct smb2_tree_disconnect_rsp *rsp = work->response_buf;
struct ksmbd_session *sess = work->sess;
struct ksmbd_tree_connect *tcon = work->tcon;
rsp->StructureSize = cpu_to_le16(4);
inc_rfc1001_len(rsp, 4);
ksmbd_debug(SMB, "request\n");
i... | int smb2_tree_disconnect(struct ksmbd_work *work) {
struct smb2_tree_disconnect_rsp *rsp = work->response_buf;
struct ksmbd_session *sess = work->sess;
struct ksmbd_tree_connect *tcon = work->tcon;
rsp->StructureSize = cpu_to_le16(4);
inc_rfc1001_len(rsp, 4);
ksmbd_debug(SMB, "request\n");
i... | int smb2_tree_disconnect(struct ksmbd_work *work) {
struct smb2_tree_disconnect_rsp *rsp = smb2_get_msg(work->response_buf);
struct ksmbd_session *sess = work->sess;
struct ksmbd_tree_connect *tcon = work->tcon;
rsp->StructureSize = cpu_to_le16(4);
inc_rfc1001_len(work->response_buf, 4);
ksmbd_d... | int smb2_tree_disconnect(struct ksmbd_work *work) {
struct smb2_tree_disconnect_rsp *rsp = smb2_get_msg(work->response_buf);
struct ksmbd_session *sess = work->sess;
struct ksmbd_tree_connect *tcon = work->tcon;
rsp->StructureSize = cpu_to_le16(4);
inc_rfc1001_len(work->response_buf, 4);
ksmbd_d... | int smb2_tree_disconnect(struct ksmbd_work *work) {
ksmbd_tree_conn_disconnect(sess, tcon);
return 0;
}
| int smb2_tree_disconnect(struct ksmbd_work *work) {
ksmbd_tree_conn_disconnect(sess, tcon);
work->tcon = NULL;
return 0;
}
| int smb2_tree_disconnect(struct ksmbd_work *work) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ksmbd_tree_conn_disconnect(sess, tcon);
return 0;
}
| int smb2_tree_disconnect(struct ksmbd_work *work) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ksmbd_tree_conn_disconnect(sess, tcon);
work->tcon = NULL;
return 0;
} | int smb2_tree_disconnect(struct ksmbd_work *work) {
ksmbd_tree_conn_disconnect(sess, tcon);
+ work->tcon = NULL;
return 0;
} |
CVE-2022-47940 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ksmbd/smb2pdu.c | smb2_write | int smb2_write(struct ksmbd_work *work) {
struct smb2_write_req *req;
struct smb2_write_rsp *rsp;
struct ksmbd_file *fp = NULL;
loff_t offset;
size_t length;
ssize_t nbytes;
char *data_buf;
bool writethrough = false;
int err = 0;
WORK_BUFFERS(work, req, rsp);
if (test_share_c... | int smb2_write(struct ksmbd_work *work) {
struct smb2_write_req *req;
struct smb2_write_rsp *rsp;
struct ksmbd_file *fp = NULL;
loff_t offset;
size_t length;
ssize_t nbytes;
char *data_buf;
bool writethrough = false;
int err = 0;
WORK_BUFFERS(work, req, rsp);
if (test_share_c... | int smb2_write(struct ksmbd_work *work) {
struct smb2_write_req *req;
struct smb2_write_rsp *rsp;
struct ksmbd_file *fp = NULL;
loff_t offset;
size_t length;
ssize_t nbytes;
char *data_buf;
bool writethrough = false;
int err = 0;
WORK_BUFFERS(work, req, rsp);
if (test_share_c... | int smb2_write(struct ksmbd_work *work) {
struct smb2_write_req *req;
struct smb2_write_rsp *rsp;
struct ksmbd_file *fp = NULL;
loff_t offset;
size_t length;
ssize_t nbytes;
char *data_buf;
bool writethrough = false;
int err = 0;
WORK_BUFFERS(work, req, rsp);
if (test_share_c... | int smb2_write(struct ksmbd_work *work) {
if (req->Channel != SMB2_CHANNEL_RDMA_V1 && req->Channel != SMB2_CHANNEL_RDMA_V1_VALIDATE) {
if (le16_to_cpu(req->DataOffset) == offsetof(struct smb2_write_req, Buffer)) {
data_buf = (char *)&req->Buffer[0];
} else {
if ((u64)le16_to_... | int smb2_write(struct ksmbd_work *work) {
if (req->Channel != SMB2_CHANNEL_RDMA_V1 && req->Channel != SMB2_CHANNEL_RDMA_V1_VALIDATE) {
if ((u64)le16_to_cpu(req->DataOffset) + length > get_rfc1002_len(work->request_buf)) {
goto out;
}
ksmbd_debug(SMB, "flags %u\n", le32_to_cpu(req... | int smb2_write(struct ksmbd_work *work) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (req->Channel != SMB2_CHANNEL_RDMA_V1 && req->Channel != SMB2_CHANNEL_RDMA_V1_VALIDATE) {
if (le16_to_cpu(req->DataOffset) == offsetof(struct smb2_write_req, Buffer)) {
data_buf = (char *)&req->Buffer[... | int smb2_write(struct ksmbd_work *work) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (req->Channel != SMB2_CHANNEL_RDMA_V1 && req->Channel != SMB2_CHANNEL_RDMA_V1_VALIDATE) {
if (le16_to_cpu(req->DataOffset) < offsetof(struct smb2_write_req, Buffer)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMEN... | int smb2_write(struct ksmbd_work *work) {
if (req->Channel != SMB2_CHANNEL_RDMA_V1 && req->Channel != SMB2_CHANNEL_RDMA_V1_VALIDATE) {
- if (le16_to_cpu(req->DataOffset) == offsetof(struct smb2_write_req, Buffer)) {
- data_buf = (char *)&req->Buffer[0];
- } else {
- if ((u64)le... |
CVE-2022-47941 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ksmbd/smb2pdu.c | smb2_handle_negotiate | int smb2_handle_negotiate(struct ksmbd_work *work) {
struct ksmbd_conn *conn = work->conn;
struct smb2_negotiate_req *req = work->request_buf;
struct smb2_negotiate_rsp *rsp = work->response_buf;
int rc = 0;
unsigned int smb2_buf_len, smb2_neg_size;
__le32 status;
ksmbd_debug(SMB, "Received ... | int smb2_handle_negotiate(struct ksmbd_work *work) {
struct ksmbd_conn *conn = work->conn;
struct smb2_negotiate_req *req = work->request_buf;
struct smb2_negotiate_rsp *rsp = work->response_buf;
int rc = 0;
unsigned int smb2_buf_len, smb2_neg_size;
__le32 status;
ksmbd_debug(SMB, "Received ... | int smb2_handle_negotiate(struct ksmbd_work *work) {
struct ksmbd_conn *conn = work->conn;
struct smb2_negotiate_req *req = smb2_get_msg(work->request_buf);
struct smb2_negotiate_rsp *rsp = smb2_get_msg(work->response_buf);
int rc = 0;
unsigned int smb2_buf_len, smb2_neg_size;
__le32 status;
... | int smb2_handle_negotiate(struct ksmbd_work *work) {
struct ksmbd_conn *conn = work->conn;
struct smb2_negotiate_req *req = smb2_get_msg(work->request_buf);
struct smb2_negotiate_rsp *rsp = smb2_get_msg(work->response_buf);
int rc = 0;
unsigned int smb2_buf_len, smb2_neg_size;
__le32 status;
... | int smb2_handle_negotiate(struct ksmbd_work *work) {
struct ksmbd_conn *conn = work->conn;
struct smb2_negotiate_req *req = work->request_buf;
switch (conn->dialect) {
case SMB311_PROT_ID:
conn->preauth_info = kzalloc(sizeof(struct preauth_integrity_info), GFP_KERNEL);
if (!conn->preauth... | int smb2_handle_negotiate(struct ksmbd_work *work) {
struct ksmbd_conn *conn = work->conn;
struct smb2_negotiate_req *req = work->request_buf;
switch (conn->dialect) {
case SMB311_PROT_ID:
conn->preauth_info = kzalloc(sizeof(struct preauth_integrity_info), GFP_KERNEL);
if (!conn->preauth... | int smb2_handle_negotiate(struct ksmbd_work *work) {
struct ksmbd_conn *conn = work->conn;
struct smb2_negotiate_req *req = smb2_get_msg(work->request_buf);
struct smb2_negotiate_rsp *rsp = smb2_get_msg(work->response_buf);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (conn->dialect) {
c... | int smb2_handle_negotiate(struct ksmbd_work *work) {
struct ksmbd_conn *conn = work->conn;
struct smb2_negotiate_req *req = smb2_get_msg(work->request_buf);
struct smb2_negotiate_rsp *rsp = smb2_get_msg(work->response_buf);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (conn->dialect) {
c... | int smb2_handle_negotiate(struct ksmbd_work *work) {
struct ksmbd_conn *conn = work->conn;
struct smb2_negotiate_req *req = work->request_buf;
switch (conn->dialect) {
case SMB311_PROT_ID:
conn->preauth_info = kzalloc(sizeof(struct preauth_integrity_info), GFP_KERNEL);
if (!conn->... |
CVE-2022-47942 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ksmbd/smb2pdu.c | smb2_allocate_rsp_buf | int smb2_allocate_rsp_buf(struct ksmbd_work *work) {
struct smb2_hdr *hdr = smb2_get_msg(work->request_buf);
size_t small_sz = MAX_CIFS_SMALL_BUFFER_SIZE;
size_t large_sz = small_sz + work->conn->vals->max_trans_size;
size_t sz = small_sz;
int cmd = le16_to_cpu(hdr->Command);
if (cmd == SMB2_IOC... | int smb2_allocate_rsp_buf(struct ksmbd_work *work) {
struct smb2_hdr *hdr = smb2_get_msg(work->request_buf);
size_t small_sz = MAX_CIFS_SMALL_BUFFER_SIZE;
size_t large_sz = small_sz + work->conn->vals->max_trans_size;
size_t sz = small_sz;
int cmd = le16_to_cpu(hdr->Command);
if (cmd == SMB2_IOC... | int smb2_allocate_rsp_buf(struct ksmbd_work *work) {
struct smb2_hdr *hdr = work->request_buf;
size_t small_sz = MAX_CIFS_SMALL_BUFFER_SIZE;
size_t large_sz = small_sz + work->conn->vals->max_trans_size;
size_t sz = small_sz;
int cmd = le16_to_cpu(hdr->Command);
if (cmd == SMB2_IOCTL_HE || cmd =... | int smb2_allocate_rsp_buf(struct ksmbd_work *work) {
struct smb2_hdr *hdr = work->request_buf;
size_t small_sz = MAX_CIFS_SMALL_BUFFER_SIZE;
size_t large_sz = small_sz + work->conn->vals->max_trans_size;
size_t sz = small_sz;
int cmd = le16_to_cpu(hdr->Command);
if (cmd == SMB2_IOCTL_HE || cmd =... | int smb2_allocate_rsp_buf(struct ksmbd_work *work) {
struct smb2_hdr *hdr = smb2_get_msg(work->request_buf);
if (cmd == SMB2_QUERY_FO_HE) {
req = smb2_get_msg(work->request_buf);
if (req->InfoType == SMB2_O_FO_FILE && (req->FileInfoClass == FILE_FULL_EA_FORMATION || req->FileInfoClass == FILE_AL... | int smb2_allocate_rsp_buf(struct ksmbd_work *work) {
struct smb2_hdr *hdr = smb2_get_msg(work->request_buf);
if (cmd == SMB2_QUERY_FO_HE) {
req = smb2_get_msg(work->request_buf);
if ((req->InfoType == SMB2_O_FO_FILE && (req->FileInfoClass == FILE_FULL_EA_FORMATION || req->FileInfoClass == FILE_A... | int smb2_allocate_rsp_buf(struct ksmbd_work *work) {
struct smb2_hdr *hdr = work->request_buf;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (cmd == SMB2_QUERY_FO_HE) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
req = work->request_buf;
if (req->InfoType == SMB2_O_FO_FILE && (req->... | int smb2_allocate_rsp_buf(struct ksmbd_work *work) {
struct smb2_hdr *hdr = work->request_buf;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (cmd == SMB2_QUERY_FO_HE) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
req = work->request_buf;
if ((req->InfoType == SMB2_O_FO_FILE && (req-... | int smb2_allocate_rsp_buf(struct ksmbd_work *work) {
struct smb2_hdr *hdr = smb2_get_msg(work->request_buf);
if (cmd == SMB2_QUERY_FO_HE) {
req = smb2_get_msg(work->request_buf);
- if (req->InfoType == SMB2_O_FO_FILE && (req->FileInfoClass == FILE_FULL_EA_FORMATION || req->FileInfoClass == FI... |
CVE-2022-47942 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ksmbd/smb2pdu.c | smb2_calc_max_out_buf_len | static int smb2_calc_max_out_buf_len(struct ksmbd_work *work, unsigned short hdr2_len, unsigned int out_buf_len) {
int free_len;
if (out_buf_len > work->conn->vals->max_trans_size) {
return -EVAL;
}
free_len = (int)(work->response_sz - (get_rfc1002_len(work->response_buf) + 4)) - hdr2_len;
i... | static int smb2_calc_max_out_buf_len(struct ksmbd_work *work, unsigned short hdr2_len, unsigned int out_buf_len) {
int free_len;
if (out_buf_len > work->conn->vals->max_trans_size) {
return -EVAL;
}
free_len = smb2_resp_buf_len(work, hdr2_len);
if (free_len < 0) {
return -EVAL;
}... | static int smb2_calc_max_out_buf_len(struct ksmbd_work *work, unsigned short hdr2_len, unsigned int out_buf_len) {
int free_len;
if (out_buf_len > work->conn->vals->max_trans_size) {
return -EVAL;
}
free_len = (int)(work->response_sz - (get_rfc1002_len(work->response_buf) + 4)) - hdr2_len;
i... | static int smb2_calc_max_out_buf_len(struct ksmbd_work *work, unsigned short hdr2_len, unsigned int out_buf_len) {
int free_len;
if (out_buf_len > work->conn->vals->max_trans_size) {
return -EVAL;
}
free_len = smb2_resp_buf_len(work, hdr2_len);
if (free_len < 0) {
return -EVAL;
}... | static int smb2_calc_max_out_buf_len(struct ksmbd_work *work, unsigned short hdr2_len, unsigned int out_buf_len) {
if (out_buf_len > work->conn->vals->max_trans_size) {
return -EVAL;
}
free_len = (int)(work->response_sz - (get_rfc1002_len(work->response_buf) + 4)) - hdr2_len;
if (free_len < 0) {... | static int smb2_calc_max_out_buf_len(struct ksmbd_work *work, unsigned short hdr2_len, unsigned int out_buf_len) {
if (out_buf_len > work->conn->vals->max_trans_size) {
return -EVAL;
}
free_len = smb2_resp_buf_len(work, hdr2_len);
if (free_len < 0) {
return -EVAL;
}
}
| static int smb2_calc_max_out_buf_len(struct ksmbd_work *work, unsigned short hdr2_len, unsigned int out_buf_len) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (out_buf_len > work->conn->vals->max_trans_size) {
return -EVAL;
}
free_len = (int)(work->response_sz - (get_rfc1002_len(work->respo... | static int smb2_calc_max_out_buf_len(struct ksmbd_work *work, unsigned short hdr2_len, unsigned int out_buf_len) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (out_buf_len > work->conn->vals->max_trans_size) {
return -EVAL;
}
free_len = smb2_resp_buf_len(work, hdr2_len);
if (free_len < ... | static int smb2_calc_max_out_buf_len(struct ksmbd_work *work, unsigned short hdr2_len, unsigned int out_buf_len) {
if (out_buf_len > work->conn->vals->max_trans_size) {
return -EVAL;
}
- free_len = (int)(work->response_sz - (get_rfc1002_len(work->response_buf) + 4)) - hdr2_len;
+ free_len = sm... |
CVE-2022-47942 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ksmbd/smb2pdu.c | smb2_get_info_sec | static int smb2_get_info_sec(struct ksmbd_work *work, struct smb2_query_info_req *req, struct smb2_query_info_rsp *rsp) {
struct ksmbd_file *fp;
struct user_namespace *user_ns;
struct smb_ntsd *pntsd = (struct smb_ntsd *)rsp->Buffer, *ppntsd = NULL;
struct smb_fattr fattr = {{0}};
struct inode *inod... | static int smb2_get_info_sec(struct ksmbd_work *work, struct smb2_query_info_req *req, struct smb2_query_info_rsp *rsp) {
struct ksmbd_file *fp;
struct user_namespace *user_ns;
struct smb_ntsd *pntsd = (struct smb_ntsd *)rsp->Buffer, *ppntsd = NULL;
struct smb_fattr fattr = {{0}};
struct inode *inod... | static int smb2_get_info_sec(struct ksmbd_work *work, struct smb2_query_info_req *req, struct smb2_query_info_rsp *rsp, void *rsp_org) {
struct ksmbd_file *fp;
struct user_namespace *user_ns;
struct smb_ntsd *pntsd = (struct smb_ntsd *)rsp->Buffer, *ppntsd = NULL;
struct smb_fattr fattr = {{0}};
str... | static int smb2_get_info_sec(struct ksmbd_work *work, struct smb2_query_info_req *req, struct smb2_query_info_rsp *rsp, void *rsp_org) {
struct ksmbd_file *fp;
struct user_namespace *user_ns;
struct smb_ntsd *pntsd = (struct smb_ntsd *)rsp->Buffer, *ppntsd = NULL;
struct smb_fattr fattr = {{0}};
str... | static int smb2_get_info_sec(struct ksmbd_work *work, struct smb2_query_info_req *req, struct smb2_query_info_rsp *rsp) {
struct smb_ntsd *pntsd = (struct smb_ntsd *)rsp->Buffer, *ppntsd = NULL;
struct smb_fattr fattr = {{0}};
struct inode *inode;
__u32 secdesclen;
unsigned int id = KSMBD_NO_FID, pi... | static int smb2_get_info_sec(struct ksmbd_work *work, struct smb2_query_info_req *req, struct smb2_query_info_rsp *rsp) {
struct smb_ntsd *pntsd = (struct smb_ntsd *)rsp->Buffer, *ppntsd = NULL;
struct smb_fattr fattr = {{0}};
struct inode *inode;
__u32 secdesclen = 0;
unsigned int id = KSMBD_NO_FID... | static int smb2_get_info_sec(struct ksmbd_work *work, struct smb2_query_info_req *req, struct smb2_query_info_rsp *rsp, void *rsp_org) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct smb_ntsd *pntsd = (struct smb_ntsd *)rsp->Buffer, *ppntsd = NULL;
struct smb_fattr fattr = {{0}};
struct inode *in... | static int smb2_get_info_sec(struct ksmbd_work *work, struct smb2_query_info_req *req, struct smb2_query_info_rsp *rsp, void *rsp_org) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct smb_ntsd *pntsd = (struct smb_ntsd *)rsp->Buffer, *ppntsd = NULL;
struct smb_fattr fattr = {{0}};
struct inode *in... | static int smb2_get_info_sec(struct ksmbd_work *work, struct smb2_query_info_req *req, struct smb2_query_info_rsp *rsp) {
struct smb_ntsd *pntsd = (struct smb_ntsd *)rsp->Buffer, *ppntsd = NULL;
struct smb_fattr fattr = {{0}};
struct inode *inode;
- __u32 secdesclen;
+ __u32 secdesclen = 0;
u... |
CVE-2022-47942 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ksmbd/smb2pdu.c | smb2_open | int smb2_open(struct ksmbd_work *work) {
struct ksmbd_conn *conn = work->conn;
struct ksmbd_session *sess = work->sess;
struct ksmbd_tree_connect *tcon = work->tcon;
struct smb2_create_req *req;
struct smb2_create_rsp *rsp;
struct path path;
struct ksmbd_share_config *share = tcon->share_con... | int smb2_open(struct ksmbd_work *work) {
struct ksmbd_conn *conn = work->conn;
struct ksmbd_session *sess = work->sess;
struct ksmbd_tree_connect *tcon = work->tcon;
struct smb2_create_req *req;
struct smb2_create_rsp *rsp;
struct path path;
struct ksmbd_share_config *share = tcon->share_con... | int smb2_open(struct ksmbd_work *work) {
struct ksmbd_conn *conn = work->conn;
struct ksmbd_session *sess = work->sess;
struct ksmbd_tree_connect *tcon = work->tcon;
struct smb2_create_req *req;
struct smb2_create_rsp *rsp, *rsp_org;
struct path path;
struct ksmbd_share_config *share = tcon-... | int smb2_open(struct ksmbd_work *work) {
struct ksmbd_conn *conn = work->conn;
struct ksmbd_session *sess = work->sess;
struct ksmbd_tree_connect *tcon = work->tcon;
struct smb2_create_req *req;
struct smb2_create_rsp *rsp, *rsp_org;
struct path path;
struct ksmbd_share_config *share = tcon-... | int smb2_open(struct ksmbd_work *work) {
struct user_namespace *user_ns = NULL;
int req_op_level = 0, open_flags = 0, may_flags = 0, file_info = 0;
WORK_BUFFERS(work, req, rsp);
if (req->NameLength) {
} else {
name = kstrdup("", GFP_KERNEL);
}
if (req_op_level == SMB2_OPLOCK_LEVEL_LE... | int smb2_open(struct ksmbd_work *work) {
struct user_namespace *user_ns = NULL;
int req_op_level = 0, open_flags = 0, may_flags = 0, file_info = 0;
WORK_BUFFERS(work, req, rsp);
if (req->NameLength) {
} else {
name = kstrdup("", GFP_KERNEL);
}
if (req_op_level == SMB2_OPLOCK_LEVEL_LE... | int smb2_open(struct ksmbd_work *work) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct user_namespace *user_ns = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int req_op_level = 0, open_flags = 0, may_flags = 0, file_info = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
WORK_BUFFE... | int smb2_open(struct ksmbd_work *work) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct user_namespace *user_ns = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int req_op_level = 0, open_flags = 0, may_flags = 0, file_info = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
WORK_BUFFE... | int smb2_open(struct ksmbd_work *work) {
struct user_namespace *user_ns = NULL;
int req_op_level = 0, open_flags = 0, may_flags = 0, file_info = 0;
WORK_BUFFERS(work, req, rsp);
if (req->NameLength) {
} else {
name = kstrdup("", GFP_KERNEL);
}
if (req_op_level == SMB2_OPLOCK... |
CVE-2022-47942 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ksmbd/smbacl.c | build_sec_desc | int build_sec_desc(struct user_namespace *user_ns, struct smb_ntsd *pntsd, struct smb_ntsd *ppntsd, int addition_info, __u32 *secdesclen, struct smb_fattr *fattr) {
int rc = 0;
__u32 offset;
struct smb_sid *owner_sid_ptr, *group_sid_ptr;
struct smb_sid *nowner_sid_ptr, *ngroup_sid_ptr;
struct smb_ac... | int build_sec_desc(struct user_namespace *user_ns, struct smb_ntsd *pntsd, struct smb_ntsd *ppntsd, int ppntsd_size, int addition_info, __u32 *secdesclen, struct smb_fattr *fattr) {
int rc = 0;
__u32 offset;
struct smb_sid *owner_sid_ptr, *group_sid_ptr;
struct smb_sid *nowner_sid_ptr, *ngroup_sid_ptr;
... | int build_sec_desc(struct user_namespace *user_ns, struct smb_ntsd *pntsd, struct smb_ntsd *ppntsd, int addition_info, __u32 *secdesclen, struct smb_fattr *fattr) {
int rc = 0;
__u32 offset;
struct smb_sid *owner_sid_ptr, *group_sid_ptr;
struct smb_sid *nowner_sid_ptr, *ngroup_sid_ptr;
struct smb_ac... | int build_sec_desc(struct user_namespace *user_ns, struct smb_ntsd *pntsd, struct smb_ntsd *ppntsd, int ppntsd_size, int addition_info, __u32 *secdesclen, struct smb_fattr *fattr) {
int rc = 0;
__u32 offset;
struct smb_sid *owner_sid_ptr, *group_sid_ptr;
struct smb_sid *nowner_sid_ptr, *ngroup_sid_ptr;
... | int build_sec_desc(struct user_namespace *user_ns, struct smb_ntsd *pntsd, struct smb_ntsd *ppntsd, int addition_info, __u32 *secdesclen, struct smb_fattr *fattr) {
unsigned int sid_type = SIDOWNER;
nowner_sid_ptr = kmalloc(sizeof(struct smb_sid), GFP_KERNEL);
if (!nowner_sid_ptr) {
return -ENOMEM;
... | int build_sec_desc(struct user_namespace *user_ns, struct smb_ntsd *pntsd, struct smb_ntsd *ppntsd, int ppntsd_size, int addition_info, __u32 *secdesclen, struct smb_fattr *fattr) {
unsigned int sid_type = SIDOWNER;
nowner_sid_ptr = kmalloc(sizeof(struct smb_sid), GFP_KERNEL);
if (!nowner_sid_ptr) {
... | int build_sec_desc(struct user_namespace *user_ns, struct smb_ntsd *pntsd, struct smb_ntsd *ppntsd, int addition_info, __u32 *secdesclen, struct smb_fattr *fattr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned int sid_type = SIDOWNER;
nowner_sid_ptr = kmalloc(sizeof(struct smb_sid), GFP_KERNEL);
... | int build_sec_desc(struct user_namespace *user_ns, struct smb_ntsd *pntsd, struct smb_ntsd *ppntsd, int ppntsd_size, int addition_info, __u32 *secdesclen, struct smb_fattr *fattr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned int sid_type = SIDOWNER;
nowner_sid_ptr = kmalloc(sizeof(struct smb_sid... | -int build_sec_desc(struct user_namespace *user_ns, struct smb_ntsd *pntsd, struct smb_ntsd *ppntsd, int addition_info, __u32 *secdesclen, struct smb_fattr *fattr) {
+int build_sec_desc(struct user_namespace *user_ns, struct smb_ntsd *pntsd, struct smb_ntsd *ppntsd, int ppntsd_size, int addition_info, __u32 *secdesclen... |
CVE-2022-47942 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ksmbd/smbacl.c | set_ntacl_dacl | static void set_ntacl_dacl(struct user_namespace *user_ns, struct smb_acl *pndacl, struct smb_acl *nt_dacl, const struct smb_sid *pownersid, const struct smb_sid *pgrpsid, struct smb_fattr *fattr) {
struct smb_ace *ntace, *pndace;
int nt_num_aces = le32_to_cpu(nt_dacl->num_aces), num_aces = 0;
unsigned shor... | static void set_ntacl_dacl(struct user_namespace *user_ns, struct smb_acl *pndacl, struct smb_acl *nt_dacl, unsigned int aces_size, const struct smb_sid *pownersid, const struct smb_sid *pgrpsid,
struct smb_fattr *fattr) {
struct smb_ace *ntace, *pndace;
int nt_num_aces = le32_to_cpu(... | static void set_ntacl_dacl(struct user_namespace *user_ns, struct smb_acl *pndacl, struct smb_acl *nt_dacl, const struct smb_sid *pownersid, const struct smb_sid *pgrpsid, struct smb_fattr *fattr) {
struct smb_ace *ntace, *pndace;
int nt_num_aces = le32_to_cpu(nt_dacl->num_aces), num_aces = 0;
unsigned shor... | static void set_ntacl_dacl(struct user_namespace *user_ns, struct smb_acl *pndacl, struct smb_acl *nt_dacl, unsigned int aces_size, const struct smb_sid *pownersid, const struct smb_sid *pgrpsid,
struct smb_fattr *fattr) {
struct smb_ace *ntace, *pndace;
int nt_num_aces = le32_to_cpu(... | static void set_ntacl_dacl(struct user_namespace *user_ns, struct smb_acl *pndacl, struct smb_acl *nt_dacl, const struct smb_sid *pownersid, const struct smb_sid *pgrpsid, struct smb_fattr *fattr) {
struct smb_ace *ntace, *pndace;
unsigned short size = 0;
pndace = (struct smb_ace *)((char *)pndacl + sizeof(... | static void set_ntacl_dacl(struct user_namespace *user_ns, struct smb_acl *pndacl, struct smb_acl *nt_dacl, unsigned int aces_size, const struct smb_sid *pownersid, const struct smb_sid *pgrpsid,
struct smb_fattr *fattr) {
struct smb_ace *ntace, *pndace;
unsigned short size = 0;
p... | static void set_ntacl_dacl(struct user_namespace *user_ns, struct smb_acl *pndacl, struct smb_acl *nt_dacl, const struct smb_sid *pownersid, const struct smb_sid *pgrpsid, struct smb_fattr *fattr) {
struct smb_ace *ntace, *pndace;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned short size = 0;
/*... | static void set_ntacl_dacl(struct user_namespace *user_ns, struct smb_acl *pndacl, struct smb_acl *nt_dacl, unsigned int aces_size, const struct smb_sid *pownersid, const struct smb_sid *pgrpsid,
struct smb_fattr *fattr) {
struct smb_ace *ntace, *pndace;
/* PLACEHOLDER: DO NOT DELETE ... | -static void set_ntacl_dacl(struct user_namespace *user_ns, struct smb_acl *pndacl, struct smb_acl *nt_dacl, const struct smb_sid *pownersid, const struct smb_sid *pgrpsid, struct smb_fattr *fattr) {
+static void set_ntacl_dacl(struct user_namespace *user_ns, struct smb_acl *pndacl, struct smb_acl *nt_dacl, unsigned in... |
CVE-2022-47942 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ksmbd/smbacl.c | smb_check_perm_dacl | int smb_check_perm_dacl(struct ksmbd_conn *conn, struct path *path, __le32 *pdaccess, int uid) {
struct user_namespace *user_ns = mnt_user_ns(path->mnt);
struct smb_ntsd *pntsd = NULL;
struct smb_acl *pdacl;
struct posix_acl *posix_acls;
int rc = 0, acl_size;
struct smb_sid sid;
int granted ... | int smb_check_perm_dacl(struct ksmbd_conn *conn, struct path *path, __le32 *pdaccess, int uid) {
struct user_namespace *user_ns = mnt_user_ns(path->mnt);
struct smb_ntsd *pntsd = NULL;
struct smb_acl *pdacl;
struct posix_acl *posix_acls;
int rc = 0, pntsd_size, acl_size, aces_size, pdacl_size, dacl_... | int smb_check_perm_dacl(struct ksmbd_conn *conn, struct path *path, __le32 *pdaccess, int uid) {
struct user_namespace *user_ns = mnt_user_ns(path->mnt);
struct smb_ntsd *pntsd = NULL;
struct smb_acl *pdacl;
struct posix_acl *posix_acls;
int rc = 0, acl_size;
struct smb_sid sid;
int granted ... | int smb_check_perm_dacl(struct ksmbd_conn *conn, struct path *path, __le32 *pdaccess, int uid) {
struct user_namespace *user_ns = mnt_user_ns(path->mnt);
struct smb_ntsd *pntsd = NULL;
struct smb_acl *pdacl;
struct posix_acl *posix_acls;
int rc = 0, pntsd_size, acl_size, aces_size, pdacl_size, dacl_... | int smb_check_perm_dacl(struct ksmbd_conn *conn, struct path *path, __le32 *pdaccess, int uid) {
struct user_namespace *user_ns = mnt_user_ns(path->mnt);
struct smb_ntsd *pntsd = NULL;
struct posix_acl *posix_acls;
int rc = 0, acl_size;
struct smb_sid sid;
int granted = le32_to_cpu(*pdaccess & ~... | int smb_check_perm_dacl(struct ksmbd_conn *conn, struct path *path, __le32 *pdaccess, int uid) {
struct user_namespace *user_ns = mnt_user_ns(path->mnt);
struct smb_ntsd *pntsd = NULL;
struct posix_acl *posix_acls;
int rc = 0, pntsd_size, acl_size, aces_size, pdacl_size, dacl_offset;
struct smb_sid ... | int smb_check_perm_dacl(struct ksmbd_conn *conn, struct path *path, __le32 *pdaccess, int uid) {
struct user_namespace *user_ns = mnt_user_ns(path->mnt);
struct smb_ntsd *pntsd = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct posix_acl *posix_acls;
int rc = 0, acl_size;
struct smb_si... | int smb_check_perm_dacl(struct ksmbd_conn *conn, struct path *path, __le32 *pdaccess, int uid) {
struct user_namespace *user_ns = mnt_user_ns(path->mnt);
struct smb_ntsd *pntsd = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct posix_acl *posix_acls;
int rc = 0, pntsd_size, acl_size, aces_... | int smb_check_perm_dacl(struct ksmbd_conn *conn, struct path *path, __le32 *pdaccess, int uid) {
struct user_namespace *user_ns = mnt_user_ns(path->mnt);
struct smb_ntsd *pntsd = NULL;
struct posix_acl *posix_acls;
- int rc = 0, acl_size;
+ int rc = 0, pntsd_size, acl_size, aces_size, pdacl_size, ... |
CVE-2022-47942 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ksmbd/smbacl.c | smb_inherit_dacl | int smb_inherit_dacl(struct ksmbd_conn *conn, struct path *path, unsigned int uid, unsigned int gid) {
const struct smb_sid *psid, *creator = NULL;
struct smb_ace *parent_aces, *aces;
struct smb_acl *parent_pdacl;
struct smb_ntsd *parent_pntsd = NULL;
struct smb_sid owner_sid, group_sid;
struct ... | int smb_inherit_dacl(struct ksmbd_conn *conn, struct path *path, unsigned int uid, unsigned int gid) {
const struct smb_sid *psid, *creator = NULL;
struct smb_ace *parent_aces, *aces;
struct smb_acl *parent_pdacl;
struct smb_ntsd *parent_pntsd = NULL;
struct smb_sid owner_sid, group_sid;
struct ... | int smb_inherit_dacl(struct ksmbd_conn *conn, struct path *path, unsigned int uid, unsigned int gid) {
const struct smb_sid *psid, *creator = NULL;
struct smb_ace *parent_aces, *aces;
struct smb_acl *parent_pdacl;
struct smb_ntsd *parent_pntsd = NULL;
struct smb_sid owner_sid, group_sid;
struct ... | int smb_inherit_dacl(struct ksmbd_conn *conn, struct path *path, unsigned int uid, unsigned int gid) {
const struct smb_sid *psid, *creator = NULL;
struct smb_ace *parent_aces, *aces;
struct smb_acl *parent_pdacl;
struct smb_ntsd *parent_pntsd = NULL;
struct smb_sid owner_sid, group_sid;
struct ... | int smb_inherit_dacl(struct ksmbd_conn *conn, struct path *path, unsigned int uid, unsigned int gid) {
struct smb_ntsd *parent_pntsd = NULL;
struct dentry *parent = path->dentry->d_parent;
struct user_namespace *user_ns = mnt_user_ns(path->mnt);
int inherited_flags = 0, flags = 0, i, ace_cnt = 0, nt_siz... | int smb_inherit_dacl(struct ksmbd_conn *conn, struct path *path, unsigned int uid, unsigned int gid) {
struct smb_ntsd *parent_pntsd = NULL;
struct dentry *parent = path->dentry->d_parent;
struct user_namespace *user_ns = mnt_user_ns(path->mnt);
int inherited_flags = 0, flags = 0, i, ace_cnt = 0, nt_siz... | int smb_inherit_dacl(struct ksmbd_conn *conn, struct path *path, unsigned int uid, unsigned int gid) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct smb_ntsd *parent_pntsd = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct dentry *parent = path->dentry->d_parent;
struct user_namespa... | int smb_inherit_dacl(struct ksmbd_conn *conn, struct path *path, unsigned int uid, unsigned int gid) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct smb_ntsd *parent_pntsd = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct dentry *parent = path->dentry->d_parent;
struct user_namespa... | int smb_inherit_dacl(struct ksmbd_conn *conn, struct path *path, unsigned int uid, unsigned int gid) {
struct smb_ntsd *parent_pntsd = NULL;
struct dentry *parent = path->dentry->d_parent;
struct user_namespace *user_ns = mnt_user_ns(path->mnt);
- int inherited_flags = 0, flags = 0, i, ace_cnt = 0, n... |
CVE-2022-47942 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ksmbd/vfs.c | ksmbd_vfs_get_sd_xattr | int ksmbd_vfs_get_sd_xattr(struct ksmbd_conn *conn, struct user_namespace *user_ns, struct dentry *dentry, struct smb_ntsd **pntsd) {
int rc;
struct ndr n;
struct inode *inode = d_inode(dentry);
struct ndr acl_ndr = {0};
struct xattr_ntacl acl;
struct xattr_smb_acl *smb_acl = NULL, *def_smb_acl ... | int ksmbd_vfs_get_sd_xattr(struct ksmbd_conn *conn, struct user_namespace *user_ns, struct dentry *dentry, struct smb_ntsd **pntsd) {
int rc;
struct ndr n;
struct inode *inode = d_inode(dentry);
struct ndr acl_ndr = {0};
struct xattr_ntacl acl;
struct xattr_smb_acl *smb_acl = NULL, *def_smb_acl ... | int ksmbd_vfs_get_sd_xattr(struct ksmbd_conn *conn, struct user_namespace *user_ns, struct dentry *dentry, struct smb_ntsd **pntsd) {
int rc;
struct ndr n;
struct inode *inode = d_inode(dentry);
struct ndr acl_ndr = {0};
struct xattr_ntacl acl;
struct xattr_smb_acl *smb_acl = NULL, *def_smb_acl ... | int ksmbd_vfs_get_sd_xattr(struct ksmbd_conn *conn, struct user_namespace *user_ns, struct dentry *dentry, struct smb_ntsd **pntsd) {
int rc;
struct ndr n;
struct inode *inode = d_inode(dentry);
struct ndr acl_ndr = {0};
struct xattr_ntacl acl;
struct xattr_smb_acl *smb_acl = NULL, *def_smb_acl ... | int ksmbd_vfs_get_sd_xattr(struct ksmbd_conn *conn, struct user_namespace *user_ns, struct dentry *dentry, struct smb_ntsd **pntsd) {
*pntsd = acl.sd_buf;
(*pntsd)->osidoffset = cpu_to_le32(le32_to_cpu((*pntsd)->osidoffset) - NDR_NTSD_OFFSETOF);
rc = acl.sd_size;
out_free:
kfree(acl_ndr.data);
retur... | int ksmbd_vfs_get_sd_xattr(struct ksmbd_conn *conn, struct user_namespace *user_ns, struct dentry *dentry, struct smb_ntsd **pntsd) {
*pntsd = acl.sd_buf;
if (acl.sd_size < sizeof(struct smb_ntsd)) {
pr_err("sd size is invalid\n");
goto out_free;
}
(*pntsd)->osidoffset = cpu_to_le32(le32... | int ksmbd_vfs_get_sd_xattr(struct ksmbd_conn *conn, struct user_namespace *user_ns, struct dentry *dentry, struct smb_ntsd **pntsd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
*pntsd = acl.sd_buf;
(*pntsd)->osidoffset = cpu_to_le32(le32_to_cpu((*pntsd)->osidoffset) - NDR_NTSD_OFFSETOF);
/* PLACEHOLD... | int ksmbd_vfs_get_sd_xattr(struct ksmbd_conn *conn, struct user_namespace *user_ns, struct dentry *dentry, struct smb_ntsd **pntsd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
*pntsd = acl.sd_buf;
if (acl.sd_size < sizeof(struct smb_ntsd)) {
pr_err("sd size is invalid\n");
goto out_free;... | int ksmbd_vfs_get_sd_xattr(struct ksmbd_conn *conn, struct user_namespace *user_ns, struct dentry *dentry, struct smb_ntsd **pntsd) {
*pntsd = acl.sd_buf;
+ if (acl.sd_size < sizeof(struct smb_ntsd)) {
+ pr_err("sd size is invalid\n");
+ goto out_free;
+ }
(*pntsd)->osidoffset = cpu_to_le... |
CVE-2022-47943 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ksmbd/smb2misc.c | smb2_get_data_area_len | static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, struct smb2_hdr *hdr) {
int ret = 0;
*off = 0;
*len = 0;
switch (hdr->Command) {
case SMB2_SESSION_SETUP:
*off = le16_to_cpu(((struct smb2_sess_setup_req *)hdr)->SecurityBufferOffset);
*len = le16_to_cpu(((struct... | static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, struct smb2_hdr *hdr) {
int ret = 0;
*off = 0;
*len = 0;
switch (hdr->Command) {
case SMB2_SESSION_SETUP:
*off = le16_to_cpu(((struct smb2_sess_setup_req *)hdr)->SecurityBufferOffset);
*len = le16_to_cpu(((struct... | static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, struct smb2_hdr *hdr) {
int ret = 0;
*off = 0;
*len = 0;
switch (hdr->Command) {
case SMB2_SESSION_SETUP:
*off = le16_to_cpu(((struct smb2_sess_setup_req *)hdr)->SecurityBufferOffset);
*len = le16_to_cpu(((struct... | static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, struct smb2_hdr *hdr) {
int ret = 0;
*off = 0;
*len = 0;
switch (hdr->Command) {
case SMB2_SESSION_SETUP:
*off = le16_to_cpu(((struct smb2_sess_setup_req *)hdr)->SecurityBufferOffset);
*len = le16_to_cpu(((struct... | static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, struct smb2_hdr *hdr) {
switch (hdr->Command) {
case SMB2_WRITE:
if (((struct smb2_write_req *)hdr)->DataOffset) {
*off = le16_to_cpu(((struct smb2_write_req *)hdr)->DataOffset);
*len = le32_to_cpu(((struct s... | static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, struct smb2_hdr *hdr) {
switch (hdr->Command) {
case SMB2_WRITE:
if (((struct smb2_write_req *)hdr)->DataOffset || ((struct smb2_write_req *)hdr)->Length) {
*off = max_t(unsigned int, le16_to_cpu(((struct smb2_write_req ... | static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, struct smb2_hdr *hdr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (hdr->Command) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case SMB2_WRITE:
if (((struct smb2_write_req *)hdr)->DataOffset) {
*off ... | static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, struct smb2_hdr *hdr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (hdr->Command) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case SMB2_WRITE:
if (((struct smb2_write_req *)hdr)->DataOffset || ((struct smb2_wri... | static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, struct smb2_hdr *hdr) {
switch (hdr->Command) {
case SMB2_WRITE:
- if (((struct smb2_write_req *)hdr)->DataOffset) {
- *off = le16_to_cpu(((struct smb2_write_req *)hdr)->DataOffset);
+ if (((struct smb2_write_req... |
CVE-2022-47943 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ksmbd/smb2pdu.c | smb2_write | int smb2_write(struct ksmbd_work *work) {
struct smb2_write_req *req;
struct smb2_write_rsp *rsp;
struct ksmbd_file *fp = NULL;
loff_t offset;
size_t length;
ssize_t nbytes;
char *data_buf;
bool writethrough = false, is_rdma_channel = false;
int err = 0;
unsigned int max_write_si... | int smb2_write(struct ksmbd_work *work) {
struct smb2_write_req *req;
struct smb2_write_rsp *rsp;
struct ksmbd_file *fp = NULL;
loff_t offset;
size_t length;
ssize_t nbytes;
char *data_buf;
bool writethrough = false, is_rdma_channel = false;
int err = 0;
unsigned int max_write_si... | int smb2_write(struct ksmbd_work *work) {
struct smb2_write_req *req;
struct smb2_write_rsp *rsp, *rsp_org;
struct ksmbd_file *fp = NULL;
loff_t offset;
size_t length;
ssize_t nbytes;
char *data_buf;
bool writethrough = false;
int err = 0;
rsp_org = work->response_buf;
WORK_B... | int smb2_write(struct ksmbd_work *work) {
struct smb2_write_req *req;
struct smb2_write_rsp *rsp, *rsp_org;
struct ksmbd_file *fp = NULL;
loff_t offset;
size_t length;
ssize_t nbytes;
char *data_buf;
bool writethrough = false;
int err = 0;
rsp_org = work->response_buf;
WORK_B... | int smb2_write(struct ksmbd_work *work) {
unsigned int max_write_size = work->conn->vals->max_write_size;
WORK_BUFFERS(work, req, rsp);
length = le32_to_cpu(req->Length);
if (req->Channel == SMB2_CHANNEL_RDMA_V1 || req->Channel == SMB2_CHANNEL_RDMA_V1_VALIDATE) {
max_write_size = get_smbd_max_re... | int smb2_write(struct ksmbd_work *work) {
unsigned int max_write_size = work->conn->vals->max_write_size;
WORK_BUFFERS(work, req, rsp);
length = le32_to_cpu(req->Length);
if (req->Channel == SMB2_CHANNEL_RDMA_V1 || req->Channel == SMB2_CHANNEL_RDMA_V1_VALIDATE) {
max_write_size = get_smbd_max_re... | int smb2_write(struct ksmbd_work *work) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
rsp_org = work->response_buf;
WORK_BUFFERS(work, req, rsp);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
fp = ksmbd_lookup_fd_slow(work, le64_to_cpu(req->VolatileFileId), le64_to_cpu(req->PersistentFileId));
... | int smb2_write(struct ksmbd_work *work) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
rsp_org = work->response_buf;
WORK_BUFFERS(work, req, rsp);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
fp = ksmbd_lookup_fd_slow(work, le64_to_cpu(req->VolatileFileId), le64_to_cpu(req->PersistentFileId));
... | int smb2_write(struct ksmbd_work *work) {
unsigned int max_write_size = work->conn->vals->max_write_size;
WORK_BUFFERS(work, req, rsp);
length = le32_to_cpu(req->Length);
if (req->Channel == SMB2_CHANNEL_RDMA_V1 || req->Channel == SMB2_CHANNEL_RDMA_V1_VALIDATE) {
max_write_size = get_smbd_... |
CVE-2022-4842 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ntfs3/attrib.c | attr_punch_hole | int attr_punch_hole(struct ntfs_inode *ni, u64 vbo, u64 bytes, u32 *frame_size) {
int err = 0;
struct runs_tree *run = &ni->file.run;
struct ntfs_sb_info *sbi = ni->mi.sbi;
struct ATTRIB *attr = NULL, *attr_b;
struct ATTR_LIST_ENTRY *le, *le_b;
struct mft_inode *mi, *mi_b;
CLST svcn, evcn1, ... | int attr_punch_hole(struct ntfs_inode *ni, u64 vbo, u64 bytes, u32 *frame_size) {
int err = 0;
struct runs_tree *run = &ni->file.run;
struct ntfs_sb_info *sbi = ni->mi.sbi;
struct ATTRIB *attr = NULL, *attr_b;
struct ATTR_LIST_ENTRY *le, *le_b;
struct mft_inode *mi, *mi_b;
CLST svcn, evcn1, ... | int attr_punch_hole(struct ntfs_inode *ni, u64 vbo, u64 bytes, u32 *frame_size) {
int err = 0;
struct runs_tree *run = &ni->file.run;
struct ntfs_sb_info *sbi = ni->mi.sbi;
struct ATTRIB *attr = NULL, *attr_b;
struct ATTR_LIST_ENTRY *le, *le_b;
struct mft_inode *mi, *mi_b;
CLST svcn, evcn1, ... | int attr_punch_hole(struct ntfs_inode *ni, u64 vbo, u64 bytes, u32 *frame_size) {
int err = 0;
struct runs_tree *run = &ni->file.run;
struct ntfs_sb_info *sbi = ni->mi.sbi;
struct ATTRIB *attr = NULL, *attr_b;
struct ATTR_LIST_ENTRY *le, *le_b;
struct mft_inode *mi, *mi_b;
CLST svcn, evcn1, ... | int attr_punch_hole(struct ntfs_inode *ni, u64 vbo, u64 bytes, u32 *frame_size) {
if (!attr_b->non_res) {
u32 data_size = le32_to_cpu(attr->res.data_size);
u32 from, to;
if (vbo > data_size) {
return 0;
}
from = vbo;
to = min_t(u64, vbo + bytes, data_size)... | int attr_punch_hole(struct ntfs_inode *ni, u64 vbo, u64 bytes, u32 *frame_size) {
if (!attr_b->non_res) {
u32 data_size = le32_to_cpu(attr_b->res.data_size);
u32 from, to;
if (vbo > data_size) {
return 0;
}
from = vbo;
to = min_t(u64, vbo + bytes, data_siz... | int attr_punch_hole(struct ntfs_inode *ni, u64 vbo, u64 bytes, u32 *frame_size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!attr_b->non_res) {
u32 data_size = le32_to_cpu(attr->res.data_size);
u32 from, to;
if (vbo > data_size) {
return 0;
}
from = vb... | int attr_punch_hole(struct ntfs_inode *ni, u64 vbo, u64 bytes, u32 *frame_size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!attr_b->non_res) {
u32 data_size = le32_to_cpu(attr_b->res.data_size);
u32 from, to;
if (vbo > data_size) {
return 0;
}
from = ... | int attr_punch_hole(struct ntfs_inode *ni, u64 vbo, u64 bytes, u32 *frame_size) {
if (!attr_b->non_res) {
- u32 data_size = le32_to_cpu(attr->res.data_size);
+ u32 data_size = le32_to_cpu(attr_b->res.data_size);
u32 from, to;
if (vbo > data_size) {
return 0;
}... |
CVE-2022-48423 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ntfs3/record.c | mi_enum_attr | struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr) {
const struct MFT_REC *rec = mi->mrec;
u32 used = le32_to_cpu(rec->used);
u32 t32, off, asize;
u16 t16;
if (!attr) {
u32 total = le32_to_cpu(rec->total);
off = le16_to_cpu(rec->attr_off);
if (used > total... | struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr) {
const struct MFT_REC *rec = mi->mrec;
u32 used = le32_to_cpu(rec->used);
u32 t32, off, asize;
u16 t16;
if (!attr) {
u32 total = le32_to_cpu(rec->total);
off = le16_to_cpu(rec->attr_off);
if (used > total... | struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr) {
const struct MFT_REC *rec = mi->mrec;
u32 used = le32_to_cpu(rec->used);
u32 t32, off, asize;
u16 t16;
if (!attr) {
u32 total = le32_to_cpu(rec->total);
off = le16_to_cpu(rec->attr_off);
if (used > total... | struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr) {
const struct MFT_REC *rec = mi->mrec;
u32 used = le32_to_cpu(rec->used);
u32 t32, off, asize;
u16 t16;
if (!attr) {
u32 total = le32_to_cpu(rec->total);
off = le16_to_cpu(rec->attr_off);
if (used > total... | struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr) {
const struct MFT_REC *rec = mi->mrec;
u32 used = le32_to_cpu(rec->used);
if (!attr) {
u32 total = le32_to_cpu(rec->total);
off = le16_to_cpu(rec->attr_off);
if (used > total) {
return NULL;
}... | struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr) {
const struct MFT_REC *rec = mi->mrec;
u32 used = le32_to_cpu(rec->used);
if (!attr) {
u32 total = le32_to_cpu(rec->total);
off = le16_to_cpu(rec->attr_off);
if (used > total) {
return NULL;
}... | struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr) {
const struct MFT_REC *rec = mi->mrec;
u32 used = le32_to_cpu(rec->used);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!attr) {
u32 total = le32_to_cpu(rec->total);
off = le16_to_cpu(rec->attr_off);
if (... | struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr) {
const struct MFT_REC *rec = mi->mrec;
u32 used = le32_to_cpu(rec->used);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!attr) {
u32 total = le32_to_cpu(rec->total);
off = le16_to_cpu(rec->attr_off);
if (... | struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr) {
const struct MFT_REC *rec = mi->mrec;
u32 used = le32_to_cpu(rec->used);
if (!attr) {
u32 total = le32_to_cpu(rec->total);
off = le16_to_cpu(rec->attr_off);
if (used > total) {
return NULL;
... |
CVE-2022-48424 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ntfs3/inode.c | ntfs_read_mft | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
int err = 0;
struct ntfs_inode *ni = ntfs_i(inode);
struct super_block *sb = inode->i_sb;
struct ntfs_sb_info *sbi = sb->s_fs_info;
mode_t mode = 0;
struct ATTR_STD_FO5 *std5 = NULL;
... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
int err = 0;
struct ntfs_inode *ni = ntfs_i(inode);
struct super_block *sb = inode->i_sb;
struct ntfs_sb_info *sbi = sb->s_fs_info;
mode_t mode = 0;
struct ATTR_STD_FO5 *std5 = NULL;
... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
int err = 0;
struct ntfs_inode *ni = ntfs_i(inode);
struct super_block *sb = inode->i_sb;
struct ntfs_sb_info *sbi = sb->s_fs_info;
mode_t mode = 0;
struct ATTR_STD_FO5 *std5 = NULL;
... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
int err = 0;
struct ntfs_inode *ni = ntfs_i(inode);
struct super_block *sb = inode->i_sb;
struct ntfs_sb_info *sbi = sb->s_fs_info;
mode_t mode = 0;
struct ATTR_STD_FO5 *std5 = NULL;
... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
struct ntfs_inode *ni = ntfs_i(inode);
le = NULL;
attr = NULL;
next_attr:
run = NULL;
attr = ni_enum_attr_ex(ni, attr, &le, NULL);
if (!attr) {
goto end_enum;
}
if (le... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
struct ntfs_inode *ni = ntfs_i(inode);
le = NULL;
attr = NULL;
next_attr:
run = NULL;
attr = ni_enum_attr_ex(ni, attr, &le, NULL);
if (!attr) {
goto end_enum;
}
if (le... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ntfs_inode *ni = ntfs_i(inode);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
le = NULL;
attr = NULL;
next_attr:
run = NULL;
/... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ntfs_inode *ni = ntfs_i(inode);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
le = NULL;
attr = NULL;
next_attr:
run = NULL;
/... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
struct ntfs_inode *ni = ntfs_i(inode);
le = NULL;
attr = NULL;
next_attr:
run = NULL;
attr = ni_enum_attr_ex(ni, attr, &le, NULL);
if (!attr) {
goto end_enum;
}
... |
CVE-2022-48425 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ntfs3/inode.c | ntfs_read_mft | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
int err = 0;
struct ntfs_inode *ni = ntfs_i(inode);
struct super_block *sb = inode->i_sb;
struct ntfs_sb_info *sbi = sb->s_fs_info;
mode_t mode = 0;
struct ATTR_STD_FO5 *std5 = NULL;
... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
int err = 0;
struct ntfs_inode *ni = ntfs_i(inode);
struct super_block *sb = inode->i_sb;
struct ntfs_sb_info *sbi = sb->s_fs_info;
mode_t mode = 0;
struct ATTR_STD_FO5 *std5 = NULL;
... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
int err = 0;
struct ntfs_inode *ni = ntfs_i(inode);
struct super_block *sb = inode->i_sb;
struct ntfs_sb_info *sbi = sb->s_fs_info;
mode_t mode = 0;
struct ATTR_STD_FO5 *std5 = NULL;
... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
int err = 0;
struct ntfs_inode *ni = ntfs_i(inode);
struct super_block *sb = inode->i_sb;
struct ntfs_sb_info *sbi = sb->s_fs_info;
mode_t mode = 0;
struct ATTR_STD_FO5 *std5 = NULL;
... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
struct ntfs_inode *ni = ntfs_i(inode);
struct super_block *sb = inode->i_sb;
struct ntfs_sb_info *sbi = sb->s_fs_info;
unsigned long ino = inode->i_ino;
err = mi_init(&ni->mi, sbi, ino);
... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
struct ntfs_inode *ni = ntfs_i(inode);
struct super_block *sb = inode->i_sb;
struct ntfs_sb_info *sbi = sb->s_fs_info;
unsigned long ino = inode->i_ino;
err = mi_init(&ni->mi, sbi, ino);
... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ntfs_inode *ni = ntfs_i(inode);
struct super_block *sb = inode->i_sb;
struct ntfs_sb_info *sbi = sb->s_fs_info;
/* PLACEHOLDER: DO NOT... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ntfs_inode *ni = ntfs_i(inode);
struct super_block *sb = inode->i_sb;
struct ntfs_sb_info *sbi = sb->s_fs_info;
/* PLACEHOLDER: DO NOT... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
struct ntfs_inode *ni = ntfs_i(inode);
struct super_block *sb = inode->i_sb;
struct ntfs_sb_info *sbi = sb->s_fs_info;
unsigned long ino = inode->i_ino;
err = mi_init(&ni->mi, sbi, ... |
CVE-2022-48502 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ntfs3/index.c | fnd_clear | void fnd_clear(struct ntfs_fnd *fnd) {
int i;
for (i = 0; i < fnd->level; i++) {
struct indx_node *n = fnd->nodes[i];
if (!n) {
continue;
}
put_indx_node(n);
fnd->nodes[i] = NULL;
}
fnd->level = 0;
fnd->root_de = NULL;
} | void fnd_clear(struct ntfs_fnd *fnd) {
int i;
for (i = fnd->level - 1; i >= 0; i--) {
struct indx_node *n = fnd->nodes[i];
if (!n) {
continue;
}
put_indx_node(n);
fnd->nodes[i] = NULL;
}
fnd->level = 0;
fnd->root_de = NULL;
} | void fnd_clear(struct ntfs_fnd *fnd) {
int i;
for (i = 0; i < fnd->level; i++) {
struct indx_node *n = fnd->nodes[i];
if (!n) {
continue;
}
put_indx_node(n);
fnd->nodes[i] = NULL;
}
fnd->level = 0;
fnd->root_de = NULL;
} | void fnd_clear(struct ntfs_fnd *fnd) {
int i;
for (i = fnd->level - 1; i >= 0; i--) {
struct indx_node *n = fnd->nodes[i];
if (!n) {
continue;
}
put_indx_node(n);
fnd->nodes[i] = NULL;
}
fnd->level = 0;
fnd->root_de = NULL;
} | void fnd_clear(struct ntfs_fnd *fnd) {
int i;
for (i = 0; i < fnd->level; i++) {
struct indx_node *n = fnd->nodes[i];
fnd->nodes[i] = NULL;
}
fnd->level = 0;
}
| void fnd_clear(struct ntfs_fnd *fnd) {
int i;
for (i = fnd->level - 1; i >= 0; i--) {
struct indx_node *n = fnd->nodes[i];
fnd->nodes[i] = NULL;
}
fnd->level = 0;
}
| void fnd_clear(struct ntfs_fnd *fnd) {
int i;
for (i = 0; i < fnd->level; i++) {
struct indx_node *n = fnd->nodes[i];
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
fnd->nodes[i] = NULL;
}
fnd->level = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| void fnd_clear(struct ntfs_fnd *fnd) {
int i;
for (i = fnd->level - 1; i >= 0; i--) {
struct indx_node *n = fnd->nodes[i];
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
fnd->nodes[i] = NULL;
}
fnd->level = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | void fnd_clear(struct ntfs_fnd *fnd) {
int i;
- for (i = 0; i < fnd->level; i++) {
+ for (i = fnd->level - 1; i >= 0; i--) {
struct indx_node *n = fnd->nodes[i];
fnd->nodes[i] = NULL;
}
fnd->level = 0;
} |
CVE-2022-48502 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ntfs3/index.c | indx_init | int indx_init(struct ntfs_index *indx, struct ntfs_sb_info *sbi, const struct ATTRIB *attr, enum index_mutex_classed type) {
u32 t32;
const struct DEX_ROOT *root = resident_data(attr);
if (!root->index_block_clst) {
return -EVAL;
}
indx->type = type;
indx->idx2vbn_bits = __ffs(root->inde... | int indx_init(struct ntfs_index *indx, struct ntfs_sb_info *sbi, const struct ATTRIB *attr, enum index_mutex_classed type) {
u32 t32;
const struct DEX_ROOT *root = resident_data(attr);
t32 = le32_to_cpu(attr->res.data_size);
if (t32 <= offsetof(struct DEX_ROOT, ihdr) || !index_hdr_check(&root->ihdr, t32... | int indx_init(struct ntfs_index *indx, struct ntfs_sb_info *sbi, const struct ATTRIB *attr, enum index_mutex_classed type) {
u32 t32;
const struct DEX_ROOT *root = resident_data(attr);
if (!root->index_block_clst) {
return -EVAL;
}
indx->type = type;
indx->idx2vbn_bits = __ffs(root->inde... | int indx_init(struct ntfs_index *indx, struct ntfs_sb_info *sbi, const struct ATTRIB *attr, enum index_mutex_classed type) {
u32 t32;
const struct DEX_ROOT *root = resident_data(attr);
t32 = le32_to_cpu(attr->res.data_size);
if (t32 <= offsetof(struct DEX_ROOT, ihdr) || !index_hdr_check(&root->ihdr, t32... | int indx_init(struct ntfs_index *indx, struct ntfs_sb_info *sbi, const struct ATTRIB *attr, enum index_mutex_classed type) {
const struct DEX_ROOT *root = resident_data(attr);
if (!root->index_block_clst) {
return -EVAL;
}
if (t32 < sbi->cluster_size) {
if (t32 != root->index_block_clst ... | int indx_init(struct ntfs_index *indx, struct ntfs_sb_info *sbi, const struct ATTRIB *attr, enum index_mutex_classed type) {
const struct DEX_ROOT *root = resident_data(attr);
t32 = le32_to_cpu(attr->res.data_size);
if (t32 <= offsetof(struct DEX_ROOT, ihdr) || !index_hdr_check(&root->ihdr, t32 - offsetof(s... | int indx_init(struct ntfs_index *indx, struct ntfs_sb_info *sbi, const struct ATTRIB *attr, enum index_mutex_classed type) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
const struct DEX_ROOT *root = resident_data(attr);
if (!root->index_block_clst) {
return -EVAL;
}
/* PLACEHOLDER: DO NOT ... | int indx_init(struct ntfs_index *indx, struct ntfs_sb_info *sbi, const struct ATTRIB *attr, enum index_mutex_classed type) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
const struct DEX_ROOT *root = resident_data(attr);
t32 = le32_to_cpu(attr->res.data_size);
if (t32 <= offsetof(struct DEX_ROOT, ihdr)... | int indx_init(struct ntfs_index *indx, struct ntfs_sb_info *sbi, const struct ATTRIB *attr, enum index_mutex_classed type) {
const struct DEX_ROOT *root = resident_data(attr);
+ t32 = le32_to_cpu(attr->res.data_size);
+ if (t32 <= offsetof(struct DEX_ROOT, ihdr) || !index_hdr_check(&root->ihdr, t32 - offset... |
CVE-2022-48502 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ntfs3/index.c | indx_read | int indx_read(struct ntfs_index *indx, struct ntfs_inode *ni, CLST vbn, struct indx_node **node) {
int err;
struct DEX_BUFFER *ib;
struct runs_tree *run = &indx->alloc_run;
struct rw_semaphore *lock = &indx->run_lock;
u64 vbo = (u64)vbn << indx->vbn2vbo_bits;
u32 bytes = 1u << indx->index_bits;
... | int indx_read(struct ntfs_index *indx, struct ntfs_inode *ni, CLST vbn, struct indx_node **node) {
int err;
struct DEX_BUFFER *ib;
struct runs_tree *run = &indx->alloc_run;
struct rw_semaphore *lock = &indx->run_lock;
u64 vbo = (u64)vbn << indx->vbn2vbo_bits;
u32 bytes = 1u << indx->index_bits;
... | int indx_read(struct ntfs_index *indx, struct ntfs_inode *ni, CLST vbn, struct indx_node **node) {
int err;
struct DEX_BUFFER *ib;
struct runs_tree *run = &indx->alloc_run;
struct rw_semaphore *lock = &indx->run_lock;
u64 vbo = (u64)vbn << indx->vbn2vbo_bits;
u32 bytes = 1u << indx->index_bits;
... | int indx_read(struct ntfs_index *indx, struct ntfs_inode *ni, CLST vbn, struct indx_node **node) {
int err;
struct DEX_BUFFER *ib;
struct runs_tree *run = &indx->alloc_run;
struct rw_semaphore *lock = &indx->run_lock;
u64 vbo = (u64)vbn << indx->vbn2vbo_bits;
u32 bytes = 1u << indx->index_bits;
... | int indx_read(struct ntfs_index *indx, struct ntfs_inode *ni, CLST vbn, struct indx_node **node) {
struct runs_tree *run = &indx->alloc_run;
u64 vbo = (u64)vbn << indx->vbn2vbo_bits;
u32 bytes = 1u << indx->index_bits;
struct indx_node *in = *node;
if (!in) {
in = kzalloc(sizeof(struct indx_... | int indx_read(struct ntfs_index *indx, struct ntfs_inode *ni, CLST vbn, struct indx_node **node) {
struct runs_tree *run = &indx->alloc_run;
u64 vbo = (u64)vbn << indx->vbn2vbo_bits;
u32 bytes = 1u << indx->index_bits;
struct indx_node *in = *node;
if (!in) {
in = kzalloc(sizeof(struct indx_... | int indx_read(struct ntfs_index *indx, struct ntfs_inode *ni, CLST vbn, struct indx_node **node) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct runs_tree *run = &indx->alloc_run;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u64 vbo = (u64)vbn << indx->vbn2vbo_bits;
u32 bytes = 1u << indx->i... | int indx_read(struct ntfs_index *indx, struct ntfs_inode *ni, CLST vbn, struct indx_node **node) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct runs_tree *run = &indx->alloc_run;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u64 vbo = (u64)vbn << indx->vbn2vbo_bits;
u32 bytes = 1u << indx->i... | int indx_read(struct ntfs_index *indx, struct ntfs_inode *ni, CLST vbn, struct indx_node **node) {
struct runs_tree *run = &indx->alloc_run;
u64 vbo = (u64)vbn << indx->vbn2vbo_bits;
u32 bytes = 1u << indx->index_bits;
struct indx_node *in = *node;
if (!in) {
in = kzalloc(sizeof(struc... |
CVE-2022-48502 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ntfs3/inode.c | ntfs_create_inode | struct inode *ntfs_create_inode(struct user_namespace *mnt_userns, struct inode *dir, struct dentry *dentry, const struct cpu_str *uni, umode_t mode, dev_t dev, const char *symname, u32 size,
struct ntfs_fnd *fnd) {
int err;
struct super_block *sb = dir->i_sb;
struct ntfs_sb_... | struct inode *ntfs_create_inode(struct user_namespace *mnt_userns, struct inode *dir, struct dentry *dentry, const struct cpu_str *uni, umode_t mode, dev_t dev, const char *symname, u32 size,
struct ntfs_fnd *fnd) {
int err;
struct super_block *sb = dir->i_sb;
struct ntfs_sb_... | struct inode *ntfs_create_inode(struct user_namespace *mnt_userns, struct inode *dir, struct dentry *dentry, const struct cpu_str *uni, umode_t mode, dev_t dev, const char *symname, u32 size,
struct ntfs_fnd *fnd) {
int err;
struct super_block *sb = dir->i_sb;
struct ntfs_sb_... | struct inode *ntfs_create_inode(struct user_namespace *mnt_userns, struct inode *dir, struct dentry *dentry, const struct cpu_str *uni, umode_t mode, dev_t dev, const char *symname, u32 size,
struct ntfs_fnd *fnd) {
int err;
struct super_block *sb = dir->i_sb;
struct ntfs_sb_... | struct inode *ntfs_create_inode(struct user_namespace *mnt_userns, struct inode *dir, struct dentry *dentry, const struct cpu_str *uni, umode_t mode, dev_t dev, const char *symname, u32 size,
struct ntfs_fnd *fnd) {
struct super_block *sb = dir->i_sb;
struct ntfs_sb_info *sbi = s... | struct inode *ntfs_create_inode(struct user_namespace *mnt_userns, struct inode *dir, struct dentry *dentry, const struct cpu_str *uni, umode_t mode, dev_t dev, const char *symname, u32 size,
struct ntfs_fnd *fnd) {
struct super_block *sb = dir->i_sb;
struct ntfs_sb_info *sbi = s... | struct inode *ntfs_create_inode(struct user_namespace *mnt_userns, struct inode *dir, struct dentry *dentry, const struct cpu_str *uni, umode_t mode, dev_t dev, const char *symname, u32 size,
struct ntfs_fnd *fnd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct super_block... | struct inode *ntfs_create_inode(struct user_namespace *mnt_userns, struct inode *dir, struct dentry *dentry, const struct cpu_str *uni, umode_t mode, dev_t dev, const char *symname, u32 size,
struct ntfs_fnd *fnd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct super_block... | struct inode *ntfs_create_inode(struct user_namespace *mnt_userns, struct inode *dir, struct dentry *dentry, const struct cpu_str *uni, umode_t mode, dev_t dev, const char *symname, u32 size,
struct ntfs_fnd *fnd) {
struct super_block *sb = dir->i_sb;
struct ntfs_sb_info *sbi... |
CVE-2022-48502 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ntfs3/inode.c | ntfs_iget5 | struct inode *ntfs_iget5(struct super_block *sb, const struct MFT_REF *ref, const struct cpu_str *name) {
struct inode *inode;
inode = iget5_locked(sb, ino_get(ref), ntfs_test_inode, ntfs_set_inode, (void *)ref);
if (unlikely(!inode)) {
return ERR_PTR(-ENOMEM);
}
if (inode->i_state & I_NEW) ... | struct inode *ntfs_iget5(struct super_block *sb, const struct MFT_REF *ref, const struct cpu_str *name) {
struct inode *inode;
inode = iget5_locked(sb, ino_get(ref), ntfs_test_inode, ntfs_set_inode, (void *)ref);
if (unlikely(!inode)) {
return ERR_PTR(-ENOMEM);
}
if (inode->i_state & I_NEW) ... | struct inode *ntfs_iget5(struct super_block *sb, const struct MFT_REF *ref, const struct cpu_str *name) {
struct inode *inode;
inode = iget5_locked(sb, ino_get(ref), ntfs_test_inode, ntfs_set_inode, (void *)ref);
if (unlikely(!inode)) {
return ERR_PTR(-ENOMEM);
}
if (inode->i_state & I_NEW) ... | struct inode *ntfs_iget5(struct super_block *sb, const struct MFT_REF *ref, const struct cpu_str *name) {
struct inode *inode;
inode = iget5_locked(sb, ino_get(ref), ntfs_test_inode, ntfs_set_inode, (void *)ref);
if (unlikely(!inode)) {
return ERR_PTR(-ENOMEM);
}
if (inode->i_state & I_NEW) ... | struct inode *ntfs_iget5(struct super_block *sb, const struct MFT_REF *ref, const struct cpu_str *name) {
inode = iget5_locked(sb, ino_get(ref), ntfs_test_inode, ntfs_set_inode, (void *)ref);
if (unlikely(!inode)) {
return ERR_PTR(-ENOMEM);
}
if (inode->i_state & I_NEW) {
inode = ntfs_re... | struct inode *ntfs_iget5(struct super_block *sb, const struct MFT_REF *ref, const struct cpu_str *name) {
inode = iget5_locked(sb, ino_get(ref), ntfs_test_inode, ntfs_set_inode, (void *)ref);
if (unlikely(!inode)) {
return ERR_PTR(-ENOMEM);
}
if (inode->i_state & I_NEW) {
inode = ntfs_re... | struct inode *ntfs_iget5(struct super_block *sb, const struct MFT_REF *ref, const struct cpu_str *name) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
inode = iget5_locked(sb, ino_get(ref), ntfs_test_inode, ntfs_set_inode, (void *)ref);
if (unlikely(!inode)) {
return ERR_PTR(-ENOMEM);
}
if ... | struct inode *ntfs_iget5(struct super_block *sb, const struct MFT_REF *ref, const struct cpu_str *name) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
inode = iget5_locked(sb, ino_get(ref), ntfs_test_inode, ntfs_set_inode, (void *)ref);
if (unlikely(!inode)) {
return ERR_PTR(-ENOMEM);
}
if ... | struct inode *ntfs_iget5(struct super_block *sb, const struct MFT_REF *ref, const struct cpu_str *name) {
inode = iget5_locked(sb, ino_get(ref), ntfs_test_inode, ntfs_set_inode, (void *)ref);
if (unlikely(!inode)) {
return ERR_PTR(-ENOMEM);
}
if (inode->i_state & I_NEW) {
inode = ... |
CVE-2022-48502 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ntfs3/inode.c | ntfs_read_mft | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
int err = 0;
struct ntfs_inode *ni = ntfs_i(inode);
struct super_block *sb = inode->i_sb;
struct ntfs_sb_info *sbi = sb->s_fs_info;
mode_t mode = 0;
struct ATTR_STD_FO5 *std5 = NULL;
... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
int err = 0;
struct ntfs_inode *ni = ntfs_i(inode);
struct super_block *sb = inode->i_sb;
struct ntfs_sb_info *sbi = sb->s_fs_info;
mode_t mode = 0;
struct ATTR_STD_FO5 *std5 = NULL;
... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
int err = 0;
struct ntfs_inode *ni = ntfs_i(inode);
struct super_block *sb = inode->i_sb;
struct ntfs_sb_info *sbi = sb->s_fs_info;
mode_t mode = 0;
struct ATTR_STD_FO5 *std5 = NULL;
... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
int err = 0;
struct ntfs_inode *ni = ntfs_i(inode);
struct super_block *sb = inode->i_sb;
struct ntfs_sb_info *sbi = sb->s_fs_info;
mode_t mode = 0;
struct ATTR_STD_FO5 *std5 = NULL;
... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
if (sbi->flags & NTFS_FLAGS_LOG_REPLAYG) {
} else if (ref->seq != rec->seq) {
goto out;
} else if (!is_rec_inuse(rec)) {
err = -EVAL;
ntfs_err(sb, "Inode r=%x is not in us... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
if (sbi->flags & NTFS_FLAGS_LOG_REPLAYG) {
} else if (ref->seq != rec->seq) {
goto out;
} else if (!is_rec_inuse(rec)) {
err = -ESTALE;
ntfs_err(sb, "Inode r=%x is not in ... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (sbi->flags & NTFS_FLAGS_LOG_REPLAYG) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else if (ref->seq != rec->seq) {
/* PLACEHOLDER: D... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (sbi->flags & NTFS_FLAGS_LOG_REPLAYG) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else if (ref->seq != rec->seq) {
/* PLACEHOLDER: D... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
if (sbi->flags & NTFS_FLAGS_LOG_REPLAYG) {
} else if (ref->seq != rec->seq) {
goto out;
} else if (!is_rec_inuse(rec)) {
- err = -EVAL;
+ err = -ESTALE;
ntfs_e... |
CVE-2022-48502 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ntfs3/run.c | run_unpack | int run_unpack(struct runs_tree *run, struct ntfs_sb_info *sbi, CLST ino, CLST svcn, CLST evcn, CLST vcn, const u8 *run_buf, u32 run_buf_size) {
u64 prev_lcn, vcn64, lcn, next_vcn;
const u8 *run_last, *run_0;
bool is_mft = ino == MFT_REC_MFT;
if (evcn + 1 == svcn) {
return 0;
}
if (evcn ... | int run_unpack(struct runs_tree *run, struct ntfs_sb_info *sbi, CLST ino, CLST svcn, CLST evcn, CLST vcn, const u8 *run_buf, int run_buf_size) {
u64 prev_lcn, vcn64, lcn, next_vcn;
const u8 *run_last, *run_0;
bool is_mft = ino == MFT_REC_MFT;
if (run_buf_size < 0) {
return -EVAL;
}
if (e... | int run_unpack(struct runs_tree *run, struct ntfs_sb_info *sbi, CLST ino, CLST svcn, CLST evcn, CLST vcn, const u8 *run_buf, u32 run_buf_size) {
u64 prev_lcn, vcn64, lcn, next_vcn;
const u8 *run_last, *run_0;
bool is_mft = ino == MFT_REC_MFT;
if (evcn + 1 == svcn) {
return 0;
}
if (evcn ... | int run_unpack(struct runs_tree *run, struct ntfs_sb_info *sbi, CLST ino, CLST svcn, CLST evcn, CLST vcn, const u8 *run_buf, int run_buf_size) {
u64 prev_lcn, vcn64, lcn, next_vcn;
const u8 *run_last, *run_0;
bool is_mft = ino == MFT_REC_MFT;
if (run_buf_size < 0) {
return -EVAL;
}
if (e... | int run_unpack(struct runs_tree *run, struct ntfs_sb_info *sbi, CLST ino, CLST svcn, CLST evcn, CLST vcn, const u8 *run_buf, u32 run_buf_size) {
bool is_mft = ino == MFT_REC_MFT;
if (evcn + 1 == svcn) {
return 0;
}
run_last = run_buf + run_buf_size;
while (run_buf < run_last) {
u8 si... | int run_unpack(struct runs_tree *run, struct ntfs_sb_info *sbi, CLST ino, CLST svcn, CLST evcn, CLST vcn, const u8 *run_buf, int run_buf_size) {
bool is_mft = ino == MFT_REC_MFT;
if (run_buf_size < 0) {
return -EVAL;
}
if (evcn + 1 == svcn) {
return 0;
}
run_last = run_buf + run_... | int run_unpack(struct runs_tree *run, struct ntfs_sb_info *sbi, CLST ino, CLST svcn, CLST evcn, CLST vcn, const u8 *run_buf, u32 run_buf_size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bool is_mft = ino == MFT_REC_MFT;
if (evcn + 1 == svcn) {
return 0;
}
/* PLACEHOLDER: DO NOT DELETE T... | int run_unpack(struct runs_tree *run, struct ntfs_sb_info *sbi, CLST ino, CLST svcn, CLST evcn, CLST vcn, const u8 *run_buf, int run_buf_size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bool is_mft = ino == MFT_REC_MFT;
if (run_buf_size < 0) {
return -EVAL;
}
if (evcn + 1 == svcn) {
... | -int run_unpack(struct runs_tree *run, struct ntfs_sb_info *sbi, CLST ino, CLST svcn, CLST evcn, CLST vcn, const u8 *run_buf, u32 run_buf_size) {
+int run_unpack(struct runs_tree *run, struct ntfs_sb_info *sbi, CLST ino, CLST svcn, CLST evcn, CLST vcn, const u8 *run_buf, int run_buf_size) {
bool is_mft = ino == MF... |
CVE-2022-48502 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ntfs3/run.c | run_unpack_ex | int run_unpack_ex(struct runs_tree *run, struct ntfs_sb_info *sbi, CLST ino, CLST svcn, CLST evcn, CLST vcn, const u8 *run_buf, u32 run_buf_size) {
int ret, err;
CLST next_vcn, lcn, len;
size_t index;
bool ok;
struct wnd_bitmap *wnd;
ret = run_unpack(run, sbi, ino, svcn, evcn, vcn, run_buf, run_... | int run_unpack_ex(struct runs_tree *run, struct ntfs_sb_info *sbi, CLST ino, CLST svcn, CLST evcn, CLST vcn, const u8 *run_buf, int run_buf_size) {
int ret, err;
CLST next_vcn, lcn, len;
size_t index;
bool ok;
struct wnd_bitmap *wnd;
ret = run_unpack(run, sbi, ino, svcn, evcn, vcn, run_buf, run_... | int run_unpack_ex(struct runs_tree *run, struct ntfs_sb_info *sbi, CLST ino, CLST svcn, CLST evcn, CLST vcn, const u8 *run_buf, u32 run_buf_size) {
int ret, err;
CLST next_vcn, lcn, len;
size_t index;
bool ok;
struct wnd_bitmap *wnd;
ret = run_unpack(run, sbi, ino, svcn, evcn, vcn, run_buf, run_... | int run_unpack_ex(struct runs_tree *run, struct ntfs_sb_info *sbi, CLST ino, CLST svcn, CLST evcn, CLST vcn, const u8 *run_buf, int run_buf_size) {
int ret, err;
CLST next_vcn, lcn, len;
size_t index;
bool ok;
struct wnd_bitmap *wnd;
ret = run_unpack(run, sbi, ino, svcn, evcn, vcn, run_buf, run_... | int run_unpack_ex(struct runs_tree *run, struct ntfs_sb_info *sbi, CLST ino, CLST svcn, CLST evcn, CLST vcn, const u8 *run_buf, u32 run_buf_size) {
}
| int run_unpack_ex(struct runs_tree *run, struct ntfs_sb_info *sbi, CLST ino, CLST svcn, CLST evcn, CLST vcn, const u8 *run_buf, int run_buf_size) {
}
| int run_unpack_ex(struct runs_tree *run, struct ntfs_sb_info *sbi, CLST ino, CLST svcn, CLST evcn, CLST vcn, const u8 *run_buf, u32 run_buf_size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| int run_unpack_ex(struct runs_tree *run, struct ntfs_sb_info *sbi, CLST ino, CLST svcn, CLST evcn, CLST vcn, const u8 *run_buf, int run_buf_size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | -int run_unpack_ex(struct runs_tree *run, struct ntfs_sb_info *sbi, CLST ino, CLST svcn, CLST evcn, CLST vcn, const u8 *run_buf, u32 run_buf_size) {
+int run_unpack_ex(struct runs_tree *run, struct ntfs_sb_info *sbi, CLST ino, CLST svcn, CLST evcn, CLST vcn, const u8 *run_buf, int run_buf_size) {
} |
CVE-2022-48502 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ntfs3/xattr.c | find_ea | static inline bool find_ea(const struct EA_FULL *ea_all, u32 bytes, const char *name, u8 name_len, u32 *off) {
*off = 0;
if (!ea_all || !bytes) {
return false;
}
for (;;) {
const struct EA_FULL *ea = Add2Ptr(ea_all, *off);
u32 next_off = *off + unpacked_ea_size(ea);
if (n... | static inline bool find_ea(const struct EA_FULL *ea_all, u32 bytes, const char *name, u8 name_len, u32 *off, u32 *ea_sz) {
u32 ea_size;
*off = 0;
if (!ea_all) {
return false;
}
for (; *off < bytes; *off += ea_size) {
const struct EA_FULL *ea = Add2Ptr(ea_all, *off);
ea_size =... | static inline bool find_ea(const struct EA_FULL *ea_all, u32 bytes, const char *name, u8 name_len, u32 *off) {
*off = 0;
if (!ea_all || !bytes) {
return false;
}
for (;;) {
const struct EA_FULL *ea = Add2Ptr(ea_all, *off);
u32 next_off = *off + unpacked_ea_size(ea);
if (n... | static inline bool find_ea(const struct EA_FULL *ea_all, u32 bytes, const char *name, u8 name_len, u32 *off, u32 *ea_sz) {
u32 ea_size;
*off = 0;
if (!ea_all) {
return false;
}
for (; *off < bytes; *off += ea_size) {
const struct EA_FULL *ea = Add2Ptr(ea_all, *off);
ea_size =... | static inline bool find_ea(const struct EA_FULL *ea_all, u32 bytes, const char *name, u8 name_len, u32 *off) {
*off = 0;
if (!ea_all || !bytes) {
return false;
}
for (;;) {
const struct EA_FULL *ea = Add2Ptr(ea_all, *off);
u32 next_off = *off + unpacked_ea_size(ea);
if (n... | static inline bool find_ea(const struct EA_FULL *ea_all, u32 bytes, const char *name, u8 name_len, u32 *off, u32 *ea_sz) {
u32 ea_size;
*off = 0;
if (!ea_all) {
return false;
}
for (; *off < bytes; *off += ea_size) {
const struct EA_FULL *ea = Add2Ptr(ea_all, *off);
ea_size =... | static inline bool find_ea(const struct EA_FULL *ea_all, u32 bytes, const char *name, u8 name_len, u32 *off) {
*off = 0;
if (!ea_all || !bytes) {
return false;
}
for (;;) {
const struct EA_FULL *ea = Add2Ptr(ea_all, *off);
u32 next_off = *off + unpacked_ea_size(ea);
if (n... | static inline bool find_ea(const struct EA_FULL *ea_all, u32 bytes, const char *name, u8 name_len, u32 *off, u32 *ea_sz) {
u32 ea_size;
*off = 0;
if (!ea_all) {
return false;
}
for (; *off < bytes; *off += ea_size) {
const struct EA_FULL *ea = Add2Ptr(ea_all, *off);
ea_size =... | -static inline bool find_ea(const struct EA_FULL *ea_all, u32 bytes, const char *name, u8 name_len, u32 *off) {
+static inline bool find_ea(const struct EA_FULL *ea_all, u32 bytes, const char *name, u8 name_len, u32 *off, u32 *ea_sz) {
+ u32 ea_size;
*off = 0;
- if (!ea_all || !bytes) {
+ if (!ea_all) {
... |
CVE-2022-48502 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ntfs3/xattr.c | ntfs_get_ea | static int ntfs_get_ea(struct inode *inode, const char *name, size_t name_len, void *buffer, size_t size, size_t *required) {
struct ntfs_inode *ni = ntfs_i(inode);
const struct EA_FO *info;
struct EA_FULL *ea_all = NULL;
const struct EA_FULL *ea;
u32 off, len;
int err;
if (!(ni->ni_flags & ... | static int ntfs_get_ea(struct inode *inode, const char *name, size_t name_len, void *buffer, size_t size, size_t *required) {
struct ntfs_inode *ni = ntfs_i(inode);
const struct EA_FO *info;
struct EA_FULL *ea_all = NULL;
const struct EA_FULL *ea;
u32 off, len;
int err;
if (!(ni->ni_flags & ... | static int ntfs_get_ea(struct inode *inode, const char *name, size_t name_len, void *buffer, size_t size, size_t *required) {
struct ntfs_inode *ni = ntfs_i(inode);
const struct EA_FO *info;
struct EA_FULL *ea_all = NULL;
const struct EA_FULL *ea;
u32 off, len;
int err;
if (!(ni->ni_flags & ... | static int ntfs_get_ea(struct inode *inode, const char *name, size_t name_len, void *buffer, size_t size, size_t *required) {
struct ntfs_inode *ni = ntfs_i(inode);
const struct EA_FO *info;
struct EA_FULL *ea_all = NULL;
const struct EA_FULL *ea;
u32 off, len;
int err;
if (!(ni->ni_flags & ... | static int ntfs_get_ea(struct inode *inode, const char *name, size_t name_len, void *buffer, size_t size, size_t *required) {
struct EA_FULL *ea_all = NULL;
if (name_len > 255) {
goto out;
}
if (!info) {
goto out;
}
if (!find_ea(ea_all, le32_to_cpu(info->size), name, name_len, &o... | static int ntfs_get_ea(struct inode *inode, const char *name, size_t name_len, void *buffer, size_t size, size_t *required) {
struct EA_FULL *ea_all = NULL;
if (name_len > 255) {
goto out;
}
if (!info) {
goto out;
}
if (!find_ea(ea_all, le32_to_cpu(info->size), name, name_len, &o... | static int ntfs_get_ea(struct inode *inode, const char *name, size_t name_len, void *buffer, size_t size, size_t *required) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct EA_FULL *ea_all = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (name_len > 255) {
/* PLACEHOLDER: DO NOT DELETE... | static int ntfs_get_ea(struct inode *inode, const char *name, size_t name_len, void *buffer, size_t size, size_t *required) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct EA_FULL *ea_all = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (name_len > 255) {
/* PLACEHOLDER: DO NOT DELETE... | static int ntfs_get_ea(struct inode *inode, const char *name, size_t name_len, void *buffer, size_t size, size_t *required) {
struct EA_FULL *ea_all = NULL;
if (name_len > 255) {
goto out;
}
if (!info) {
goto out;
}
- if (!find_ea(ea_all, le32_to_cpu(info->size), name, nam... |
CVE-2022-48502 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ntfs3/xattr.c | ntfs_list_ea | static ssize_t ntfs_list_ea(struct ntfs_inode *ni, char *buffer, size_t bytes_per_buffer) {
const struct EA_FO *info;
struct EA_FULL *ea_all = NULL;
const struct EA_FULL *ea;
u32 off, size;
int err;
size_t ret;
err = ntfs_read_ea(ni, &ea_all, 0, &info);
if (err) {
return err;
... | static ssize_t ntfs_list_ea(struct ntfs_inode *ni, char *buffer, size_t bytes_per_buffer) {
const struct EA_FO *info;
struct EA_FULL *ea_all = NULL;
const struct EA_FULL *ea;
u32 off, size;
int err;
int ea_size;
size_t ret;
err = ntfs_read_ea(ni, &ea_all, 0, &info);
if (err) {
... | static ssize_t ntfs_list_ea(struct ntfs_inode *ni, char *buffer, size_t bytes_per_buffer) {
const struct EA_FO *info;
struct EA_FULL *ea_all = NULL;
const struct EA_FULL *ea;
u32 off, size;
int err;
size_t ret;
err = ntfs_read_ea(ni, &ea_all, 0, &info);
if (err) {
return err;
... | static ssize_t ntfs_list_ea(struct ntfs_inode *ni, char *buffer, size_t bytes_per_buffer) {
const struct EA_FO *info;
struct EA_FULL *ea_all = NULL;
const struct EA_FULL *ea;
u32 off, size;
int err;
int ea_size;
size_t ret;
err = ntfs_read_ea(ni, &ea_all, 0, &info);
if (err) {
... | static ssize_t ntfs_list_ea(struct ntfs_inode *ni, char *buffer, size_t bytes_per_buffer) {
struct EA_FULL *ea_all = NULL;
int err;
size_t ret;
if (!info || !ea_all) {
return 0;
}
size = le32_to_cpu(info->size);
for (ret = 0, off = 0; off < size; off += unpacked_ea_size(ea)) {
... | static ssize_t ntfs_list_ea(struct ntfs_inode *ni, char *buffer, size_t bytes_per_buffer) {
struct EA_FULL *ea_all = NULL;
int err;
int ea_size;
size_t ret;
if (!info || !ea_all) {
return 0;
}
size = le32_to_cpu(info->size);
for (ret = 0, off = 0; off < size; off += ea_size) {
... | static ssize_t ntfs_list_ea(struct ntfs_inode *ni, char *buffer, size_t bytes_per_buffer) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct EA_FULL *ea_all = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int err;
size_t ret;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!info ... | static ssize_t ntfs_list_ea(struct ntfs_inode *ni, char *buffer, size_t bytes_per_buffer) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct EA_FULL *ea_all = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int err;
int ea_size;
size_t ret;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT ... | static ssize_t ntfs_list_ea(struct ntfs_inode *ni, char *buffer, size_t bytes_per_buffer) {
struct EA_FULL *ea_all = NULL;
int err;
+ int ea_size;
size_t ret;
if (!info || !ea_all) {
return 0;
}
size = le32_to_cpu(info->size);
- for (ret = 0, off = 0; off < size; off += unp... |
CVE-2022-48502 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ntfs3/xattr.c | ntfs_read_ea | static int ntfs_read_ea(struct ntfs_inode *ni, struct EA_FULL **ea, size_t add_bytes, const struct EA_FO **info) {
int err;
struct ntfs_sb_info *sbi = ni->mi.sbi;
struct ATTR_LIST_ENTRY *le = NULL;
struct ATTRIB *attr_info, *attr_ea;
void *ea_p;
u32 size;
static_assert(le32_to_cpu(ATTR_EA_FO... | static int ntfs_read_ea(struct ntfs_inode *ni, struct EA_FULL **ea, size_t add_bytes, const struct EA_FO **info) {
int err = -EVAL;
struct ntfs_sb_info *sbi = ni->mi.sbi;
struct ATTR_LIST_ENTRY *le = NULL;
struct ATTRIB *attr_info, *attr_ea;
void *ea_p;
u32 size, off, ea_size;
static_assert(... | static int ntfs_read_ea(struct ntfs_inode *ni, struct EA_FULL **ea, size_t add_bytes, const struct EA_FO **info) {
int err;
struct ntfs_sb_info *sbi = ni->mi.sbi;
struct ATTR_LIST_ENTRY *le = NULL;
struct ATTRIB *attr_info, *attr_ea;
void *ea_p;
u32 size;
static_assert(le32_to_cpu(ATTR_EA_FO... | static int ntfs_read_ea(struct ntfs_inode *ni, struct EA_FULL **ea, size_t add_bytes, const struct EA_FO **info) {
int err = -EVAL;
struct ntfs_sb_info *sbi = ni->mi.sbi;
struct ATTR_LIST_ENTRY *le = NULL;
struct ATTRIB *attr_info, *attr_ea;
void *ea_p;
u32 size, off, ea_size;
static_assert(... | static int ntfs_read_ea(struct ntfs_inode *ni, struct EA_FULL **ea, size_t add_bytes, const struct EA_FO **info) {
int err;
struct ntfs_sb_info *sbi = ni->mi.sbi;
struct ATTR_LIST_ENTRY *le = NULL;
void *ea_p;
u32 size;
static_assert(le32_to_cpu(ATTR_EA_FO) < le32_to_cpu(ATTR_EA));
attr_info... | static int ntfs_read_ea(struct ntfs_inode *ni, struct EA_FULL **ea, size_t add_bytes, const struct EA_FO **info) {
int err = -EVAL;
struct ntfs_sb_info *sbi = ni->mi.sbi;
struct ATTR_LIST_ENTRY *le = NULL;
void *ea_p;
u32 size, off, ea_size;
static_assert(le32_to_cpu(ATTR_EA_FO) < le32_to_cpu(AT... | static int ntfs_read_ea(struct ntfs_inode *ni, struct EA_FULL **ea, size_t add_bytes, const struct EA_FO **info) {
int err;
struct ntfs_sb_info *sbi = ni->mi.sbi;
struct ATTR_LIST_ENTRY *le = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
void *ea_p;
u32 size;
static_assert(le32_to_cpu(... | static int ntfs_read_ea(struct ntfs_inode *ni, struct EA_FULL **ea, size_t add_bytes, const struct EA_FO **info) {
int err = -EVAL;
struct ntfs_sb_info *sbi = ni->mi.sbi;
struct ATTR_LIST_ENTRY *le = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
void *ea_p;
u32 size, off, ea_size;
stat... | static int ntfs_read_ea(struct ntfs_inode *ni, struct EA_FULL **ea, size_t add_bytes, const struct EA_FO **info) {
- int err;
+ int err = -EVAL;
struct ntfs_sb_info *sbi = ni->mi.sbi;
struct ATTR_LIST_ENTRY *le = NULL;
void *ea_p;
- u32 size;
+ u32 size, off, ea_size;
static_assert(le32... |
CVE-2022-48619 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/input/input.c | input_set_capability | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code) {
switch (type) {
case EV_KEY:
__set_bit(code, dev->keybit);
break;
case EV_REL:
__set_bit(code, dev->relbit);
break;
case EV_ABS:
input_alloc_absinfo(dev);
if (!dev->ab... | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code) {
if (type < EV_CNT && input_max_code[type] && code > input_max_code[type]) {
pr_err("%s: invalid code %u for type %u\n", __func__, code, type);
dump_stack();
return;
}
switch (type) {
case EV_... | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code) {
switch (type) {
case EV_KEY:
__set_bit(code, dev->keybit);
break;
case EV_REL:
__set_bit(code, dev->relbit);
break;
case EV_ABS:
input_alloc_absinfo(dev);
if (!dev->ab... | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code) {
if (type < EV_CNT && input_max_code[type] && code > input_max_code[type]) {
pr_err("%s: invalid code %u for type %u\n", __func__, code, type);
dump_stack();
return;
}
switch (type) {
case EV_... | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code) {
switch (type) {
case EV_KEY:
__set_bit(code, dev->keybit);
break;
case EV_REL:
__set_bit(code, dev->relbit);
break;
case EV_ABS:
__set_bit(code, dev->absbit);
break;
... | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code) {
if (type < EV_CNT && input_max_code[type] && code > input_max_code[type]) {
pr_err("%s: invalid code %u for type %u\n", __func__, code, type);
dump_stack();
return;
}
switch (type) {
case EV_... | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code) {
switch (type) {
case EV_KEY:
__set_bit(code, dev->keybit);
break;
case EV_REL:
__set_bit(code, dev->relbit);
break;
case EV_ABS:
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code) {
if (type < EV_CNT && input_max_code[type] && code > input_max_code[type]) {
pr_err("%s: invalid code %u for type %u\n", __func__, code, type);
dump_stack();
return;
}
switch (type) {
case EV_... | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code) {
+ if (type < EV_CNT && input_max_code[type] && code > input_max_code[type]) {
+ pr_err("%s: invalid code %u for type %u\n", __func__, code, type);
+ dump_stack();
+ return;
+ }
switch (type) {
... |
CVE-2022-48626 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/mmc/host/moxart-mmc.c | moxart_remove | static int moxart_remove(struct platform_device *pdev) {
struct mmc_host *mmc = dev_get_drvdata(&pdev->dev);
struct moxart_host *host = mmc_priv(mmc);
dev_set_drvdata(&pdev->dev, NULL);
if (mmc) {
if (!IS_ERR(host->dma_chan_tx)) {
dma_release_channel(host->dma_chan_tx);
}
... | static int moxart_remove(struct platform_device *pdev) {
struct mmc_host *mmc = dev_get_drvdata(&pdev->dev);
struct moxart_host *host = mmc_priv(mmc);
dev_set_drvdata(&pdev->dev, NULL);
if (mmc) {
if (!IS_ERR(host->dma_chan_tx)) {
dma_release_channel(host->dma_chan_tx);
}
... | static int moxart_remove(struct platform_device *pdev) {
struct mmc_host *mmc = dev_get_drvdata(&pdev->dev);
struct moxart_host *host = mmc_priv(mmc);
dev_set_drvdata(&pdev->dev, NULL);
if (!IS_ERR_OR_NULL(host->dma_chan_tx)) {
dma_release_channel(host->dma_chan_tx);
}
if (!IS_ERR_OR_NUL... | static int moxart_remove(struct platform_device *pdev) {
struct mmc_host *mmc = dev_get_drvdata(&pdev->dev);
struct moxart_host *host = mmc_priv(mmc);
dev_set_drvdata(&pdev->dev, NULL);
if (!IS_ERR_OR_NULL(host->dma_chan_tx)) {
dma_release_channel(host->dma_chan_tx);
}
if (!IS_ERR_OR_NUL... | static int moxart_remove(struct platform_device *pdev) {
struct mmc_host *mmc = dev_get_drvdata(&pdev->dev);
struct moxart_host *host = mmc_priv(mmc);
if (mmc) {
mmc_remove_host(mmc);
mmc_free_host(mmc);
writel(0, host->base + REG_TERRUPT_MASK);
writel(readl(host->base + REG_... | static int moxart_remove(struct platform_device *pdev) {
struct mmc_host *mmc = dev_get_drvdata(&pdev->dev);
struct moxart_host *host = mmc_priv(mmc);
if (mmc) {
mmc_remove_host(mmc);
writel(0, host->base + REG_TERRUPT_MASK);
writel(readl(host->base + REG_CLOCK_CONTROL) | CLK_OFF, ho... | static int moxart_remove(struct platform_device *pdev) {
struct mmc_host *mmc = dev_get_drvdata(&pdev->dev);
struct moxart_host *host = mmc_priv(mmc);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!IS_ERR_OR_NULL(host->dma_chan_tx)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
/* PL... | static int moxart_remove(struct platform_device *pdev) {
struct mmc_host *mmc = dev_get_drvdata(&pdev->dev);
struct moxart_host *host = mmc_priv(mmc);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!IS_ERR_OR_NULL(host->dma_chan_tx)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
/* PL... | static int moxart_remove(struct platform_device *pdev) {
struct mmc_host *mmc = dev_get_drvdata(&pdev->dev);
struct moxart_host *host = mmc_priv(mmc);
if (mmc) {
mmc_remove_host(mmc);
- mmc_free_host(mmc);
writel(0, host->base + REG_TERRUPT_MASK);
writel(readl(host->bas... |
CVE-2022-48627 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/tty/vt/vt.c | delete_char | static void delete_char(struct vc_data *vc, unsigned int nr) {
unsigned short *p = (unsigned short *) vc->vc_pos;
vc_uniscr_delete(vc, nr);
scr_memcpyw(p, p + nr, (vc->vc_cols - vc->state.x - nr) * 2);
scr_memsetw(p + vc->vc_cols - vc->state.x - nr, vc->vc_video_erase_char, nr * 2);
vc->vc_need_wrap... | static void delete_char(struct vc_data *vc, unsigned int nr) {
unsigned short *p = (unsigned short *) vc->vc_pos;
vc_uniscr_delete(vc, nr);
scr_memmovew(p, p + nr, (vc->vc_cols - vc->state.x - nr) * 2);
scr_memsetw(p + vc->vc_cols - vc->state.x - nr, vc->vc_video_erase_char, nr * 2);
vc->vc_need_wra... | static void delete_char(struct vc_data *vc, unsigned int nr) {
unsigned short *p = (unsigned short *) vc->vc_pos;
vc_uniscr_delete(vc, nr);
scr_memcpyw(p, p + nr, (vc->vc_cols - vc->state.x - nr) * 2);
scr_memsetw(p + vc->vc_cols - vc->state.x - nr, vc->vc_video_erase_char, nr * 2);
vc->vc_need_wrap... | static void delete_char(struct vc_data *vc, unsigned int nr) {
unsigned short *p = (unsigned short *) vc->vc_pos;
vc_uniscr_delete(vc, nr);
scr_memmovew(p, p + nr, (vc->vc_cols - vc->state.x - nr) * 2);
scr_memsetw(p + vc->vc_cols - vc->state.x - nr, vc->vc_video_erase_char, nr * 2);
vc->vc_need_wra... | static void delete_char(struct vc_data *vc, unsigned int nr) {
unsigned short *p = (unsigned short *) vc->vc_pos;
vc_uniscr_delete(vc, nr);
scr_memcpyw(p, p + nr, (vc->vc_cols - vc->state.x - nr) * 2);
scr_memsetw(p + vc->vc_cols - vc->state.x - nr, vc->vc_video_erase_char, nr * 2);
if (con_should_u... | static void delete_char(struct vc_data *vc, unsigned int nr) {
unsigned short *p = (unsigned short *) vc->vc_pos;
vc_uniscr_delete(vc, nr);
scr_memmovew(p, p + nr, (vc->vc_cols - vc->state.x - nr) * 2);
scr_memsetw(p + vc->vc_cols - vc->state.x - nr, vc->vc_video_erase_char, nr * 2);
if (con_should_... | static void delete_char(struct vc_data *vc, unsigned int nr) {
unsigned short *p = (unsigned short *) vc->vc_pos;
vc_uniscr_delete(vc, nr);
scr_memcpyw(p, p + nr, (vc->vc_cols - vc->state.x - nr) * 2);
scr_memsetw(p + vc->vc_cols - vc->state.x - nr, vc->vc_video_erase_char, nr * 2);
/* PLACEHOLDER: ... | static void delete_char(struct vc_data *vc, unsigned int nr) {
unsigned short *p = (unsigned short *) vc->vc_pos;
vc_uniscr_delete(vc, nr);
scr_memmovew(p, p + nr, (vc->vc_cols - vc->state.x - nr) * 2);
scr_memsetw(p + vc->vc_cols - vc->state.x - nr, vc->vc_video_erase_char, nr * 2);
/* PLACEHOLDER:... | static void delete_char(struct vc_data *vc, unsigned int nr) {
unsigned short *p = (unsigned short *) vc->vc_pos;
vc_uniscr_delete(vc, nr);
- scr_memcpyw(p, p + nr, (vc->vc_cols - vc->state.x - nr) * 2);
+ scr_memmovew(p, p + nr, (vc->vc_cols - vc->state.x - nr) * 2);
scr_memsetw(p + vc->vc_cols -... |
CVE-2022-48628 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ceph/caps.c | ceph_handle_caps | void ceph_handle_caps(struct ceph_mds_session *session, struct ceph_msg *msg) {
struct ceph_mds_client *mdsc = session->s_mdsc;
struct inode *inode;
struct ceph_inode_info *ci;
struct ceph_cap *cap;
struct ceph_mds_caps *h;
struct ceph_mds_cap_peer *peer = NULL;
struct ceph_snap_realm *realm... | void ceph_handle_caps(struct ceph_mds_session *session, struct ceph_msg *msg) {
struct ceph_mds_client *mdsc = session->s_mdsc;
struct inode *inode;
struct ceph_inode_info *ci;
struct ceph_cap *cap;
struct ceph_mds_caps *h;
struct ceph_mds_cap_peer *peer = NULL;
struct ceph_snap_realm *realm... | void ceph_handle_caps(struct ceph_mds_session *session, struct ceph_msg *msg) {
struct ceph_mds_client *mdsc = session->s_mdsc;
struct inode *inode;
struct ceph_inode_info *ci;
struct ceph_cap *cap;
struct ceph_mds_caps *h;
struct ceph_mds_cap_peer *peer = NULL;
struct ceph_snap_realm *realm... | void ceph_handle_caps(struct ceph_mds_session *session, struct ceph_msg *msg) {
struct ceph_mds_client *mdsc = session->s_mdsc;
struct inode *inode;
struct ceph_inode_info *ci;
struct ceph_cap *cap;
struct ceph_mds_caps *h;
struct ceph_mds_cap_peer *peer = NULL;
struct ceph_snap_realm *realm... | void ceph_handle_caps(struct ceph_mds_session *session, struct ceph_msg *msg) {
struct ceph_mds_client *mdsc = session->s_mdsc;
struct ceph_mds_cap_peer *peer = NULL;
struct cap_extra_info extra_info = {};
end = msg->front.iov_base + msg->front.iov_len;
h = msg->front.iov_base;
op = le32_to_cpu(... | void ceph_handle_caps(struct ceph_mds_session *session, struct ceph_msg *msg) {
struct ceph_mds_client *mdsc = session->s_mdsc;
struct ceph_mds_cap_peer *peer = NULL;
struct cap_extra_info extra_info = {};
if (!ceph_inc_mds_stopping_blocker(mdsc, session)) {
return;
}
end = msg->front.io... | void ceph_handle_caps(struct ceph_mds_session *session, struct ceph_msg *msg) {
struct ceph_mds_client *mdsc = session->s_mdsc;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ceph_mds_cap_peer *peer = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct cap_extra_info extra_info = {};
... | void ceph_handle_caps(struct ceph_mds_session *session, struct ceph_msg *msg) {
struct ceph_mds_client *mdsc = session->s_mdsc;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ceph_mds_cap_peer *peer = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct cap_extra_info extra_info = {};
... | void ceph_handle_caps(struct ceph_mds_session *session, struct ceph_msg *msg) {
struct ceph_mds_client *mdsc = session->s_mdsc;
struct ceph_mds_cap_peer *peer = NULL;
struct cap_extra_info extra_info = {};
+ if (!ceph_inc_mds_stopping_blocker(mdsc, session)) {
+ return;
+ }
end = msg->... |
CVE-2022-48628 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ceph/mds_client.c | ceph_mdsc_init | int ceph_mdsc_init(struct ceph_fs_client *fsc) {
struct ceph_mds_client *mdsc;
int err;
mdsc = kzalloc(sizeof(struct ceph_mds_client), GFP_NOFS);
if (!mdsc) {
return -ENOMEM;
}
mdsc->fsc = fsc;
mutex_init(&mdsc->mutex);
mdsc->mdsmap = kzalloc(sizeof(*mdsc->mdsmap), GFP_NOFS);
... | int ceph_mdsc_init(struct ceph_fs_client *fsc) {
struct ceph_mds_client *mdsc;
int err;
mdsc = kzalloc(sizeof(struct ceph_mds_client), GFP_NOFS);
if (!mdsc) {
return -ENOMEM;
}
mdsc->fsc = fsc;
mutex_init(&mdsc->mutex);
mdsc->mdsmap = kzalloc(sizeof(*mdsc->mdsmap), GFP_NOFS);
... | int ceph_mdsc_init(struct ceph_fs_client *fsc) {
struct ceph_mds_client *mdsc;
int err;
mdsc = kzalloc(sizeof(struct ceph_mds_client), GFP_NOFS);
if (!mdsc) {
return -ENOMEM;
}
mdsc->fsc = fsc;
mutex_init(&mdsc->mutex);
mdsc->mdsmap = kzalloc(sizeof(*mdsc->mdsmap), GFP_NOFS);
... | int ceph_mdsc_init(struct ceph_fs_client *fsc) {
struct ceph_mds_client *mdsc;
int err;
mdsc = kzalloc(sizeof(struct ceph_mds_client), GFP_NOFS);
if (!mdsc) {
return -ENOMEM;
}
mdsc->fsc = fsc;
mutex_init(&mdsc->mutex);
mdsc->mdsmap = kzalloc(sizeof(*mdsc->mdsmap), GFP_NOFS);
... | int ceph_mdsc_init(struct ceph_fs_client *fsc) {
mdsc = kzalloc(sizeof(struct ceph_mds_client), GFP_NOFS);
if (!mdsc) {
return -ENOMEM;
}
init_completion(&mdsc->safe_umount_waiters);
init_waitqueue_head(&mdsc->session_close_wq);
}
| int ceph_mdsc_init(struct ceph_fs_client *fsc) {
mdsc = kzalloc(sizeof(struct ceph_mds_client), GFP_NOFS);
if (!mdsc) {
return -ENOMEM;
}
init_completion(&mdsc->safe_umount_waiters);
spin_lock_init(&mdsc->stopping_lock);
atomic_set(&mdsc->stopping_blockers, 0);
init_completion(&mdsc-... | int ceph_mdsc_init(struct ceph_fs_client *fsc) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
mdsc = kzalloc(sizeof(struct ceph_mds_client), GFP_NOFS);
if (!mdsc) {
return -ENOMEM;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
init_completion(&mdsc->safe_umount_waiters);
init_wait... | int ceph_mdsc_init(struct ceph_fs_client *fsc) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
mdsc = kzalloc(sizeof(struct ceph_mds_client), GFP_NOFS);
if (!mdsc) {
return -ENOMEM;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
init_completion(&mdsc->safe_umount_waiters);
spin_lock... | int ceph_mdsc_init(struct ceph_fs_client *fsc) {
mdsc = kzalloc(sizeof(struct ceph_mds_client), GFP_NOFS);
if (!mdsc) {
return -ENOMEM;
}
init_completion(&mdsc->safe_umount_waiters);
+ spin_lock_init(&mdsc->stopping_lock);
+ atomic_set(&mdsc->stopping_blockers, 0);
+ init_completi... |
CVE-2022-48628 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ceph/mds_client.c | handle_lease | static void handle_lease(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
struct super_block *sb = mdsc->fsc->sb;
struct inode *inode;
struct dentry *parent, *dentry;
struct ceph_dentry_info *di;
int mds = session->s_mds;
struct ceph_mds_lease *h = msg->fro... | static void handle_lease(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
struct super_block *sb = mdsc->fsc->sb;
struct inode *inode;
struct dentry *parent, *dentry;
struct ceph_dentry_info *di;
int mds = session->s_mds;
struct ceph_mds_lease *h = msg->fro... | static void handle_lease(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
struct super_block *sb = mdsc->fsc->sb;
struct inode *inode;
struct dentry *parent, *dentry;
struct ceph_dentry_info *di;
int mds = session->s_mds;
struct ceph_mds_lease *h = msg->fro... | static void handle_lease(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
struct super_block *sb = mdsc->fsc->sb;
struct inode *inode;
struct dentry *parent, *dentry;
struct ceph_dentry_info *di;
int mds = session->s_mds;
struct ceph_mds_lease *h = msg->fro... | static void handle_lease(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
dout("handle_lease from mds%d\n", mds);
if (msg->front.iov_len < sizeof(*h) + sizeof(u32)) {
goto bad;
}
if (msg->front.iov_len < sizeof(*h) + sizeof(u32) + dname.len) {
goto ... | static void handle_lease(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
dout("handle_lease from mds%d\n", mds);
if (!ceph_inc_mds_stopping_blocker(mdsc, session)) {
return;
}
if (msg->front.iov_len < sizeof(*h) + sizeof(u32)) {
goto bad;
}
... | static void handle_lease(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dout("handle_lease from mds%d\n", mds);
if (msg->front.iov_len < sizeof(*h) + sizeof(u32)) {
goto bad;
}
/* PLACEHOLDER: DO NOT DELET... | static void handle_lease(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dout("handle_lease from mds%d\n", mds);
if (!ceph_inc_mds_stopping_blocker(mdsc, session)) {
return;
}
if (msg->front.iov_len < sizeo... | static void handle_lease(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
dout("handle_lease from mds%d\n", mds);
+ if (!ceph_inc_mds_stopping_blocker(mdsc, session)) {
+ return;
+ }
if (msg->front.iov_len < sizeof(*h) + sizeof(u32)) {
goto bad;
... |
CVE-2022-48628 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ceph/quota.c | ceph_handle_quota | void ceph_handle_quota(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
struct super_block *sb = mdsc->fsc->sb;
struct ceph_mds_quota *h = msg->front.iov_base;
struct ceph_vino vino;
struct inode *inode;
struct ceph_inode_info *ci;
if (msg->front.iov_len < ... | void ceph_handle_quota(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
struct super_block *sb = mdsc->fsc->sb;
struct ceph_mds_quota *h = msg->front.iov_base;
struct ceph_vino vino;
struct inode *inode;
struct ceph_inode_info *ci;
if (!ceph_inc_mds_stoppin... | void ceph_handle_quota(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
struct super_block *sb = mdsc->fsc->sb;
struct ceph_mds_quota *h = msg->front.iov_base;
struct ceph_vino vino;
struct inode *inode;
struct ceph_inode_info *ci;
if (msg->front.iov_len < ... | void ceph_handle_quota(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
struct super_block *sb = mdsc->fsc->sb;
struct ceph_mds_quota *h = msg->front.iov_base;
struct ceph_vino vino;
struct inode *inode;
struct ceph_inode_info *ci;
if (!ceph_inc_mds_stoppin... | void ceph_handle_quota(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
struct ceph_mds_quota *h = msg->front.iov_base;
struct ceph_inode_info *ci;
if (msg->front.iov_len < sizeof(*h)) {
pr_err("%s corrupt message mds%d len %d\n", __func__, session->s_mds, (int... | void ceph_handle_quota(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
struct ceph_mds_quota *h = msg->front.iov_base;
struct ceph_inode_info *ci;
if (!ceph_inc_mds_stopping_blocker(mdsc, session)) {
return;
}
if (msg->front.iov_len < sizeof(*h)) {
... | void ceph_handle_quota(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ceph_mds_quota *h = msg->front.iov_base;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ceph_inode_info *ci;
if (msg->front.iov_le... | void ceph_handle_quota(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ceph_mds_quota *h = msg->front.iov_base;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ceph_inode_info *ci;
if (!ceph_inc_mds_sto... | void ceph_handle_quota(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
struct ceph_mds_quota *h = msg->front.iov_base;
struct ceph_inode_info *ci;
+ if (!ceph_inc_mds_stopping_blocker(mdsc, session)) {
+ return;
+ }
if (msg->front.iov_len < sizeof(*h)... |
CVE-2022-48628 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ceph/snap.c | ceph_handle_snap | void ceph_handle_snap(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
struct super_block *sb = mdsc->fsc->sb;
int mds = session->s_mds;
u64 split;
int op;
int trace_len;
struct ceph_snap_realm *realm = NULL;
void *p = msg->front.iov_base;
void *e =... | void ceph_handle_snap(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
struct super_block *sb = mdsc->fsc->sb;
int mds = session->s_mds;
u64 split;
int op;
int trace_len;
struct ceph_snap_realm *realm = NULL;
void *p = msg->front.iov_base;
void *e =... | void ceph_handle_snap(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
struct super_block *sb = mdsc->fsc->sb;
int mds = session->s_mds;
u64 split;
int op;
int trace_len;
struct ceph_snap_realm *realm = NULL;
void *p = msg->front.iov_base;
void *e =... | void ceph_handle_snap(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
struct super_block *sb = mdsc->fsc->sb;
int mds = session->s_mds;
u64 split;
int op;
int trace_len;
struct ceph_snap_realm *realm = NULL;
void *p = msg->front.iov_base;
void *e =... | void ceph_handle_snap(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
struct super_block *sb = mdsc->fsc->sb;
int mds = session->s_mds;
struct ceph_snap_realm *realm = NULL;
void *p = msg->front.iov_base;
void *e = p + msg->front.iov_len;
bool close_sessio... | void ceph_handle_snap(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
struct super_block *sb = mdsc->fsc->sb;
int mds = session->s_mds;
struct ceph_snap_realm *realm = NULL;
void *p = msg->front.iov_base;
void *e = p + msg->front.iov_len;
bool close_sessio... | void ceph_handle_snap(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
struct super_block *sb = mdsc->fsc->sb;
int mds = session->s_mds;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ceph_snap_realm *realm = NULL;
void *p = msg->front.iov_base;
void ... | void ceph_handle_snap(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
struct super_block *sb = mdsc->fsc->sb;
int mds = session->s_mds;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ceph_snap_realm *realm = NULL;
void *p = msg->front.iov_base;
void ... | void ceph_handle_snap(struct ceph_mds_client *mdsc, struct ceph_mds_session *session, struct ceph_msg *msg) {
struct super_block *sb = mdsc->fsc->sb;
int mds = session->s_mds;
struct ceph_snap_realm *realm = NULL;
void *p = msg->front.iov_base;
void *e = p + msg->front.iov_len;
bool close... |
CVE-2022-48628 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ceph/super.c | ceph_kill_sb | static void ceph_kill_sb(struct super_block *s) {
struct ceph_fs_client *fsc = ceph_sb_to_client(s);
dout("kill_sb %p\n", s);
ceph_mdsc_pre_umount(fsc->mdsc);
flush_fs_workqueues(fsc);
sync_filesystem(s);
fsc->mdsc->stopping = CEPH_MDSC_STOPPG_FLUSHED;
kill_anon_super(s);
fsc->client->ex... | static void ceph_kill_sb(struct super_block *s) {
struct ceph_fs_client *fsc = ceph_sb_to_client(s);
struct ceph_mds_client *mdsc = fsc->mdsc;
bool wait;
dout("kill_sb %p\n", s);
ceph_mdsc_pre_umount(mdsc);
flush_fs_workqueues(fsc);
sync_filesystem(s);
spin_lock(&mdsc->stopping_lock);
... | static void ceph_kill_sb(struct super_block *s) {
struct ceph_fs_client *fsc = ceph_sb_to_client(s);
dout("kill_sb %p\n", s);
ceph_mdsc_pre_umount(fsc->mdsc);
flush_fs_workqueues(fsc);
sync_filesystem(s);
fsc->mdsc->stopping = CEPH_MDSC_STOPPG_FLUSHED;
kill_anon_super(s);
fsc->client->ex... | static void ceph_kill_sb(struct super_block *s) {
struct ceph_fs_client *fsc = ceph_sb_to_client(s);
struct ceph_mds_client *mdsc = fsc->mdsc;
bool wait;
dout("kill_sb %p\n", s);
ceph_mdsc_pre_umount(mdsc);
flush_fs_workqueues(fsc);
sync_filesystem(s);
spin_lock(&mdsc->stopping_lock);
... | static void ceph_kill_sb(struct super_block *s) {
struct ceph_fs_client *fsc = ceph_sb_to_client(s);
dout("kill_sb %p\n", s);
ceph_mdsc_pre_umount(fsc->mdsc);
flush_fs_workqueues(fsc);
sync_filesystem(s);
fsc->mdsc->stopping = CEPH_MDSC_STOPPG_FLUSHED;
kill_anon_super(s);
ceph_fs_debugfs... | static void ceph_kill_sb(struct super_block *s) {
struct ceph_fs_client *fsc = ceph_sb_to_client(s);
struct ceph_mds_client *mdsc = fsc->mdsc;
bool wait;
dout("kill_sb %p\n", s);
ceph_mdsc_pre_umount(mdsc);
flush_fs_workqueues(fsc);
sync_filesystem(s);
spin_lock(&mdsc->stopping_lock);
... | static void ceph_kill_sb(struct super_block *s) {
struct ceph_fs_client *fsc = ceph_sb_to_client(s);
dout("kill_sb %p\n", s);
ceph_mdsc_pre_umount(fsc->mdsc);
flush_fs_workqueues(fsc);
sync_filesystem(s);
fsc->mdsc->stopping = CEPH_MDSC_STOPPG_FLUSHED;
kill_anon_super(s);
/* PLACEHOLDER:... | static void ceph_kill_sb(struct super_block *s) {
struct ceph_fs_client *fsc = ceph_sb_to_client(s);
struct ceph_mds_client *mdsc = fsc->mdsc;
bool wait;
dout("kill_sb %p\n", s);
ceph_mdsc_pre_umount(mdsc);
flush_fs_workqueues(fsc);
sync_filesystem(s);
spin_lock(&mdsc->stopping_lock);
... | static void ceph_kill_sb(struct super_block *s) {
struct ceph_fs_client *fsc = ceph_sb_to_client(s);
+ struct ceph_mds_client *mdsc = fsc->mdsc;
+ bool wait;
dout("kill_sb %p\n", s);
- ceph_mdsc_pre_umount(fsc->mdsc);
+ ceph_mdsc_pre_umount(mdsc);
flush_fs_workqueues(fsc);
sync_filesyst... |
CVE-2022-48629 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/crypto/qcom-rng.c | qcom_rng_generate | static int qcom_rng_generate(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dstn, unsigned int dlen) {
struct qcom_rng_ctx *ctx = crypto_rng_ctx(tfm);
struct qcom_rng *rng = ctx->rng;
int ret;
ret = clk_prepare_enable(rng->clk);
if (ret) {
return ret;
}
mutex_lock(&rng... | static int qcom_rng_generate(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dstn, unsigned int dlen) {
struct qcom_rng_ctx *ctx = crypto_rng_ctx(tfm);
struct qcom_rng *rng = ctx->rng;
int ret;
ret = clk_prepare_enable(rng->clk);
if (ret) {
return ret;
}
mutex_lock(&rng... | static int qcom_rng_generate(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dstn, unsigned int dlen) {
struct qcom_rng_ctx *ctx = crypto_rng_ctx(tfm);
struct qcom_rng *rng = ctx->rng;
int ret;
ret = clk_prepare_enable(rng->clk);
if (ret) {
return ret;
}
mutex_lock(&rng... | static int qcom_rng_generate(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dstn, unsigned int dlen) {
struct qcom_rng_ctx *ctx = crypto_rng_ctx(tfm);
struct qcom_rng *rng = ctx->rng;
int ret;
ret = clk_prepare_enable(rng->clk);
if (ret) {
return ret;
}
mutex_lock(&rng... | static int qcom_rng_generate(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dstn, unsigned int dlen) {
struct qcom_rng_ctx *ctx = crypto_rng_ctx(tfm);
struct qcom_rng *rng = ctx->rng;
ret = qcom_rng_read(rng, dstn, dlen);
clk_disable_unprepare(rng->clk);
return 0;
}
| static int qcom_rng_generate(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dstn, unsigned int dlen) {
struct qcom_rng_ctx *ctx = crypto_rng_ctx(tfm);
struct qcom_rng *rng = ctx->rng;
ret = qcom_rng_read(rng, dstn, dlen);
clk_disable_unprepare(rng->clk);
return ret;
}
| static int qcom_rng_generate(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dstn, unsigned int dlen) {
struct qcom_rng_ctx *ctx = crypto_rng_ctx(tfm);
struct qcom_rng *rng = ctx->rng;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret = qcom_rng_read(rng, dstn, dlen);
/* PLACEHOLDER: D... | static int qcom_rng_generate(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dstn, unsigned int dlen) {
struct qcom_rng_ctx *ctx = crypto_rng_ctx(tfm);
struct qcom_rng *rng = ctx->rng;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret = qcom_rng_read(rng, dstn, dlen);
/* PLACEHOLDER: D... | static int qcom_rng_generate(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dstn, unsigned int dlen) {
struct qcom_rng_ctx *ctx = crypto_rng_ctx(tfm);
struct qcom_rng *rng = ctx->rng;
ret = qcom_rng_read(rng, dstn, dlen);
clk_disable_unprepare(rng->clk);
- return 0;
+ return re... |
CVE-2022-48629 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/crypto/qcom-rng.c | qcom_rng_read | static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max) {
unsigned int currsize = 0;
u32 val;
do {
val = readl_relaxed(rng->base + PRNG_STATUS);
if (!(val & PRNG_STATUS_DATA_AVAIL)) {
break;
}
val = readl_relaxed(rng->base + PRNG_DATA_);
... | static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max) {
unsigned int currsize = 0;
u32 val;
int ret;
do {
ret = readl_poll_timeout(rng->base + PRNG_STATUS, val, val & PRNG_STATUS_DATA_AVAIL, 200, 10000);
if (ret) {
return ret;
}
val = read... | static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max) {
unsigned int currsize = 0;
u32 val;
do {
val = readl_relaxed(rng->base + PRNG_STATUS);
if (!(val & PRNG_STATUS_DATA_AVAIL)) {
break;
}
val = readl_relaxed(rng->base + PRNG_DATA_);
... | static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max) {
unsigned int currsize = 0;
u32 val;
int ret;
do {
ret = readl_poll_timeout(rng->base + PRNG_STATUS, val, val & PRNG_STATUS_DATA_AVAIL, 200, 10000);
if (ret) {
return ret;
}
val = read... | static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max) {
unsigned int currsize = 0;
u32 val;
do {
val = readl_relaxed(rng->base + PRNG_STATUS);
if (!(val & PRNG_STATUS_DATA_AVAIL)) {
break;
}
val = readl_relaxed(rng->base + PRNG_DATA_);
... | static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max) {
unsigned int currsize = 0;
u32 val;
int ret;
do {
ret = readl_poll_timeout(rng->base + PRNG_STATUS, val, val & PRNG_STATUS_DATA_AVAIL, 200, 10000);
if (ret) {
return ret;
}
val = read... | static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max) {
unsigned int currsize = 0;
u32 val;
do {
val = readl_relaxed(rng->base + PRNG_STATUS);
if (!(val & PRNG_STATUS_DATA_AVAIL)) {
break;
}
val = readl_relaxed(rng->base + PRNG_DATA_);
... | static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max) {
unsigned int currsize = 0;
u32 val;
int ret;
do {
ret = readl_poll_timeout(rng->base + PRNG_STATUS, val, val & PRNG_STATUS_DATA_AVAIL, 200, 10000);
if (ret) {
return ret;
}
val = read... | static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max) {
unsigned int currsize = 0;
u32 val;
+ int ret;
do {
- val = readl_relaxed(rng->base + PRNG_STATUS);
- if (!(val & PRNG_STATUS_DATA_AVAIL)) {
- break;
+ ret = readl_poll_timeout(rng->base + PRN... |
CVE-2022-48630 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/crypto/qcom-rng.c | qcom_rng_read | static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max) {
unsigned int currsize = 0;
u32 val;
int ret;
do {
ret = readl_poll_timeout(rng->base + PRNG_STATUS, val, val & PRNG_STATUS_DATA_AVAIL, 200, 10000);
if (ret) {
return ret;
}
val = read... | static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max) {
unsigned int currsize = 0;
u32 val;
int ret;
do {
ret = readl_poll_timeout(rng->base + PRNG_STATUS, val, val & PRNG_STATUS_DATA_AVAIL, 200, 10000);
if (ret) {
return ret;
}
val = read... | static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max) {
unsigned int currsize = 0;
u32 val;
int ret;
do {
ret = readl_poll_timeout(rng->base + PRNG_STATUS, val, val & PRNG_STATUS_DATA_AVAIL, 200, 10000);
if (ret) {
return ret;
}
val = read... | static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max) {
unsigned int currsize = 0;
u32 val;
int ret;
do {
ret = readl_poll_timeout(rng->base + PRNG_STATUS, val, val & PRNG_STATUS_DATA_AVAIL, 200, 10000);
if (ret) {
return ret;
}
val = read... | static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max) {
do {
ret = readl_poll_timeout(rng->base + PRNG_STATUS, val, val & PRNG_STATUS_DATA_AVAIL, 200, 10000);
if (ret) {
return ret;
}
val = readl_relaxed(rng->base + PRNG_DATA_);
if (!val) {
... | static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max) {
do {
ret = readl_poll_timeout(rng->base + PRNG_STATUS, val, val & PRNG_STATUS_DATA_AVAIL, 200, 10000);
if (ret) {
return ret;
}
val = readl_relaxed(rng->base + PRNG_DATA_);
if (!val) {
... | static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
do {
ret = readl_poll_timeout(rng->base + PRNG_STATUS, val, val & PRNG_STATUS_DATA_AVAIL, 200, 10000);
if (ret) {
return ret;
}
val = readl_relax... | static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
do {
ret = readl_poll_timeout(rng->base + PRNG_STATUS, val, val & PRNG_STATUS_DATA_AVAIL, 200, 10000);
if (ret) {
return ret;
}
val = readl_relax... | static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max) {
do {
ret = readl_poll_timeout(rng->base + PRNG_STATUS, val, val & PRNG_STATUS_DATA_AVAIL, 200, 10000);
if (ret) {
return ret;
}
val = readl_relaxed(rng->base + PRNG_DATA_);
if (!v... |
CVE-2023-0045 | 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 (!is_spec_ib_user_controlled() || task_spec_ib_forc... | 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 (!is_spec_ib_user_controlled() || task_spec_ib_forc... | 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 (!is_spec_ib_user_controlled() || task_spec_ib_forc... | 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 (!is_spec_ib_user_controlled() || task_spec_ib_forc... | static int ib_prctl_set(struct task_struct *task, unsigned long ctrl) {
switch (ctrl) {
case PR_SPEC_FORCE_DISABLE:
task_set_spec_ib_disable(task);
if (ctrl == PR_SPEC_FORCE_DISABLE) {
task_set_spec_ib_force_disable(task);
}
task_update_spec_tif(task);
break;
... | static int ib_prctl_set(struct task_struct *task, unsigned long ctrl) {
switch (ctrl) {
case PR_SPEC_FORCE_DISABLE:
task_set_spec_ib_disable(task);
if (ctrl == PR_SPEC_FORCE_DISABLE) {
task_set_spec_ib_force_disable(task);
}
task_update_spec_tif(task);
if (tas... | static int ib_prctl_set(struct task_struct *task, unsigned long ctrl) {
switch (ctrl) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case PR_SPEC_FORCE_DISABLE:
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
task_set_spec_ib_disable(task);
if (ctrl == PR_SPEC_FORCE_DISABLE) {
... | static int ib_prctl_set(struct task_struct *task, unsigned long ctrl) {
switch (ctrl) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case PR_SPEC_FORCE_DISABLE:
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
task_set_spec_ib_disable(task);
if (ctrl == PR_SPEC_FORCE_DISABLE) {
... | static int ib_prctl_set(struct task_struct *task, unsigned long ctrl) {
switch (ctrl) {
case PR_SPEC_FORCE_DISABLE:
task_set_spec_ib_disable(task);
if (ctrl == PR_SPEC_FORCE_DISABLE) {
task_set_spec_ib_force_disable(task);
}
task_update_spec_tif(task);
+ ... |
CVE-2023-0047 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | mm/oom_kill.c | pagefault_out_of_memory | void pagefault_out_of_memory(void) {
struct oom_control oc = {
.zonelist = NULL, .nodemask = NULL, .memcg = NULL, .gfp_mask = 0, .order = 0,
};
if (mem_cgroup_oom_synchronize(true)) {
return;
}
if (fatal_signal_pending(current)) {
return;
}
if (!mutex_trylock(&oom_loc... | void pagefault_out_of_memory(void) {
static DEFE_RATELIMIT_STATE(pfoom_rs, DEFAULT_RATELIMIT_TERVAL, DEFAULT_RATELIMIT_BURST);
if (mem_cgroup_oom_synchronize(true)) {
return;
}
if (fatal_signal_pending(current)) {
return;
}
if (__ratelimit(&pfoom_rs)) {
pr_warn("Huh VM_FA... | void pagefault_out_of_memory(void) {
struct oom_control oc = {
.zonelist = NULL, .nodemask = NULL, .memcg = NULL, .gfp_mask = 0, .order = 0,
};
if (mem_cgroup_oom_synchronize(true)) {
return;
}
if (fatal_signal_pending(current)) {
return;
}
if (!mutex_trylock(&oom_loc... | void pagefault_out_of_memory(void) {
static DEFE_RATELIMIT_STATE(pfoom_rs, DEFAULT_RATELIMIT_TERVAL, DEFAULT_RATELIMIT_BURST);
if (mem_cgroup_oom_synchronize(true)) {
return;
}
if (fatal_signal_pending(current)) {
return;
}
if (__ratelimit(&pfoom_rs)) {
pr_warn("Huh VM_FA... | void pagefault_out_of_memory(void) {
struct oom_control oc = {
.zonelist = NULL, .nodemask = NULL, .memcg = NULL, .gfp_mask = 0, .order = 0,
};
if (mem_cgroup_oom_synchronize(true)) {
return;
}
if (fatal_signal_pending(current)) {
return;
}
if (!mutex_trylock(&oom_loc... | void pagefault_out_of_memory(void) {
static DEFE_RATELIMIT_STATE(pfoom_rs, DEFAULT_RATELIMIT_TERVAL, DEFAULT_RATELIMIT_BURST);
if (mem_cgroup_oom_synchronize(true)) {
return;
}
if (fatal_signal_pending(current)) {
return;
}
if (__ratelimit(&pfoom_rs)) {
pr_warn("Huh VM_FA... | void pagefault_out_of_memory(void) {
struct oom_control oc = {
.zonelist = NULL, .nodemask = NULL, .memcg = NULL, .gfp_mask = 0, .order = 0,
};
if (mem_cgroup_oom_synchronize(true)) {
return;
}
if (fatal_signal_pending(current)) {
return;
}
if (!mutex_trylock(&oom_loc... | void pagefault_out_of_memory(void) {
static DEFE_RATELIMIT_STATE(pfoom_rs, DEFAULT_RATELIMIT_TERVAL, DEFAULT_RATELIMIT_BURST);
if (mem_cgroup_oom_synchronize(true)) {
return;
}
if (fatal_signal_pending(current)) {
return;
}
if (__ratelimit(&pfoom_rs)) {
pr_warn("Huh VM_FA... | void pagefault_out_of_memory(void) {
- struct oom_control oc = {
- .zonelist = NULL, .nodemask = NULL, .memcg = NULL, .gfp_mask = 0, .order = 0,
- };
+ static DEFE_RATELIMIT_STATE(pfoom_rs, DEFAULT_RATELIMIT_TERVAL, DEFAULT_RATELIMIT_BURST);
if (mem_cgroup_oom_synchronize(true)) {
return;... |
CVE-2023-0179 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/netfilter/nft_payload.c | nft_payload_copy_vlan | static bool nft_payload_copy_vlan(u32 *d, const struct sk_buff *skb, u8 offset, u8 len) {
int mac_off = skb_mac_header(skb) - skb->data;
u8 *vlanh, *dst_u8 = (u8 *) d;
struct vlan_ethhdr veth;
u8 vlan_hlen = 0;
if ((skb->protocol == htons(ETH_P_8021AD) || skb->protocol == htons(ETH_P_8021Q)) && offs... | static bool nft_payload_copy_vlan(u32 *d, const struct sk_buff *skb, u8 offset, u8 len) {
int mac_off = skb_mac_header(skb) - skb->data;
u8 *vlanh, *dst_u8 = (u8 *) d;
struct vlan_ethhdr veth;
u8 vlan_hlen = 0;
if ((skb->protocol == htons(ETH_P_8021AD) || skb->protocol == htons(ETH_P_8021Q)) && offs... | static bool nft_payload_copy_vlan(u32 *d, const struct sk_buff *skb, u8 offset, u8 len) {
int mac_off = skb_mac_header(skb) - skb->data;
u8 *vlanh, *dst_u8 = (u8 *) d;
struct vlan_ethhdr veth;
u8 vlan_hlen = 0;
if ((skb->protocol == htons(ETH_P_8021AD) || skb->protocol == htons(ETH_P_8021Q)) && offs... | static bool nft_payload_copy_vlan(u32 *d, const struct sk_buff *skb, u8 offset, u8 len) {
int mac_off = skb_mac_header(skb) - skb->data;
u8 *vlanh, *dst_u8 = (u8 *) d;
struct vlan_ethhdr veth;
u8 vlan_hlen = 0;
if ((skb->protocol == htons(ETH_P_8021AD) || skb->protocol == htons(ETH_P_8021Q)) && offs... | static bool nft_payload_copy_vlan(u32 *d, const struct sk_buff *skb, u8 offset, u8 len) {
int mac_off = skb_mac_header(skb) - skb->data;
u8 vlan_hlen = 0;
if ((skb->protocol == htons(ETH_P_8021AD) || skb->protocol == htons(ETH_P_8021Q)) && offset >= VLAN_ETH_HLEN && offset < VLAN_ETH_HLEN + VLAN_HLEN) {
... | static bool nft_payload_copy_vlan(u32 *d, const struct sk_buff *skb, u8 offset, u8 len) {
int mac_off = skb_mac_header(skb) - skb->data;
u8 vlan_hlen = 0;
if ((skb->protocol == htons(ETH_P_8021AD) || skb->protocol == htons(ETH_P_8021Q)) && offset >= VLAN_ETH_HLEN && offset < VLAN_ETH_HLEN + VLAN_HLEN) {
... | static bool nft_payload_copy_vlan(u32 *d, const struct sk_buff *skb, u8 offset, u8 len) {
int mac_off = skb_mac_header(skb) - skb->data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u8 vlan_hlen = 0;
if ((skb->protocol == htons(ETH_P_8021AD) || skb->protocol == htons(ETH_P_8021Q)) && offset >= VLAN_ETH... | static bool nft_payload_copy_vlan(u32 *d, const struct sk_buff *skb, u8 offset, u8 len) {
int mac_off = skb_mac_header(skb) - skb->data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u8 vlan_hlen = 0;
if ((skb->protocol == htons(ETH_P_8021AD) || skb->protocol == htons(ETH_P_8021Q)) && offset >= VLAN_ETH... | static bool nft_payload_copy_vlan(u32 *d, const struct sk_buff *skb, u8 offset, u8 len) {
int mac_off = skb_mac_header(skb) - skb->data;
u8 vlan_hlen = 0;
if ((skb->protocol == htons(ETH_P_8021AD) || skb->protocol == htons(ETH_P_8021Q)) && offset >= VLAN_ETH_HLEN && offset < VLAN_ETH_HLEN + VLAN_HLEN) {... |
CVE-2023-0210 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ksmbd/auth.c | ksmbd_decode_ntlmssp_auth_blob | int ksmbd_decode_ntlmssp_auth_blob(struct authenticate_message *authblob, int blob_len, struct ksmbd_session *sess) {
char *domain_name;
unsigned int nt_off, dn_off;
unsigned short nt_len, dn_len;
int ret;
if (blob_len < sizeof(struct authenticate_message)) {
ksmbd_debug(AUTH, "negotiate blo... | int ksmbd_decode_ntlmssp_auth_blob(struct authenticate_message *authblob, int blob_len, struct ksmbd_session *sess) {
char *domain_name;
unsigned int nt_off, dn_off;
unsigned short nt_len, dn_len;
int ret;
if (blob_len < sizeof(struct authenticate_message)) {
ksmbd_debug(AUTH, "negotiate blo... | int ksmbd_decode_ntlmssp_auth_blob(struct authenticate_message *authblob, int blob_len, struct ksmbd_conn *conn, struct ksmbd_session *sess) {
char *domain_name;
unsigned int nt_off, dn_off;
unsigned short nt_len, dn_len;
int ret;
if (blob_len < sizeof(struct authenticate_message)) {
ksmbd_d... | int ksmbd_decode_ntlmssp_auth_blob(struct authenticate_message *authblob, int blob_len, struct ksmbd_conn *conn, struct ksmbd_session *sess) {
char *domain_name;
unsigned int nt_off, dn_off;
unsigned short nt_len, dn_len;
int ret;
if (blob_len < sizeof(struct authenticate_message)) {
ksmbd_d... | int ksmbd_decode_ntlmssp_auth_blob(struct authenticate_message *authblob, int blob_len, struct ksmbd_session *sess) {
if (blob_len < sizeof(struct authenticate_message)) {
return -EVAL;
}
nt_off = le32_to_cpu(authblob->NtChallengeResponse.BufferOffset);
nt_len = le16_to_cpu(authblob->NtChallenge... | int ksmbd_decode_ntlmssp_auth_blob(struct authenticate_message *authblob, int blob_len, struct ksmbd_session *sess) {
if (blob_len < sizeof(struct authenticate_message)) {
return -EVAL;
}
nt_off = le32_to_cpu(authblob->NtChallengeResponse.BufferOffset);
nt_len = le16_to_cpu(authblob->NtChallenge... | int ksmbd_decode_ntlmssp_auth_blob(struct authenticate_message *authblob, int blob_len, struct ksmbd_conn *conn, struct ksmbd_session *sess) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (blob_len < sizeof(struct authenticate_message)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return -EVA... | int ksmbd_decode_ntlmssp_auth_blob(struct authenticate_message *authblob, int blob_len, struct ksmbd_conn *conn, struct ksmbd_session *sess) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (blob_len < sizeof(struct authenticate_message)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return -EVA... | int ksmbd_decode_ntlmssp_auth_blob(struct authenticate_message *authblob, int blob_len, struct ksmbd_session *sess) {
if (blob_len < sizeof(struct authenticate_message)) {
return -EVAL;
}
nt_off = le32_to_cpu(authblob->NtChallengeResponse.BufferOffset);
nt_len = le16_to_cpu(authblob->NtCha... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.