CVE-2022-50785
published high CVSS 3.1 · 7.8fsi: occ: Prevent use after free
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux008d3825a805557464c5e75f9eb806a3aa2f5e6d to < 1d5ad0a874ddfcee9f932f54b1d34cbe8b9ddcfe · 008d3825a805557464c5e75f9eb806a3aa2f5e6d to < 3593e8efc9f0dac6be70bd5c964eadaa86bf2713 · 008d3825a805557464c5e75f9eb806a3aa2f5e6d to < d3e1e24604031b0d83b6c2d38f54eeea265cfcc0 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux5.16 (affected) · 0 to < 5.16 (unaffected · semver) · 5.19.17 through 5.19.* (unaffected · semver) · 6.0.3 through 6.0.* (unaffected · semver) · 6.1 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
Description
In the Linux kernel, the following vulnerability has been resolved: fsi: occ: Prevent use after free Use get_device and put_device in the open and close functions to make sure the device doesn't get freed while a file descriptor is open. Also, lock around the freeing of the device buffer and check the buffer before using it in the submit function.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - The bug is reached by opening/writing the local /dev/occN miscdevice or by reading OCC hwmon sysfs attributes that call fsi_occ_submit(); it is not reachable from network packet processing. AC:L - An attacker can continuously drive fsi_occ_submit via hwmon reads or /dev/occ I/O while inducing OCC/FSI teardown (host power-cycle or FSI rescan on OpenBMC), so both sides of the remove-vs-submit race are attacker-controlled. PR:L - OCC hwmon sensor attributes are mode 0444, so any local user can invoke the vulnerable fsi_occ_submit path; OpenBMC deployments also commonly grant /dev/occ to non-root service/operator accounts without requiring real root. UI:N - The attacker directly performs the device I/O and teardown sequence; no separate victim action is required. S:U - This is a same-host kernel heap use-after-free within the BMC kernel's security authority and does not cross a VM, IOMMU, or sandbox boundary. C:H - occ_remove kvfree()s the shared ~8KB occ->buffer while submit still uses it, yielding a reclaimable use-after-free that enables arbitrary kernel memory disclosure. I:H - The same buffer/device UAF is exploitable for heap corruption and control-flow hijacking via reclaim of the freed kvmalloc object or the freed struct occ. A:H - Use-after-free of occ->buffer or the occ device object reliably causes kernel oops/panic even when not fully exploited for code execution.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 008d3825a805557464c5e75f9eb806a3aa2f5e6d to < 1d5ad0a874ddfcee9f932f54b1d34cbe8b9ddcfe (affected · git)008d3825a805557464c5e75f9eb806a3aa2f5e6d to < 3593e8efc9f0dac6be70bd5c964eadaa86bf2713 (affected · git)008d3825a805557464c5e75f9eb806a3aa2f5e6d to < d3e1e24604031b0d83b6c2d38f54eeea265cfcc0 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 5.16 (affected)0 to < 5.16 (unaffected · semver)5.19.17 through 5.19.* (unaffected · semver)6.0.3 through 6.0.* (unaffected · semver)6.1 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
3Provider assertions
1Linux · cna
fsi: occ: Prevent use after free
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 9bff8ff8a3addacb624efa1d99f5ae337b9e1754479ebe515bf9a2c07ed0db28
- Ingested
- 23 Sep 2026, 08:04:58 UTC
- Source record
- Official CVE record