# CVE-2023-53431: scsi: ses: Handle enclosure with just a primary component gracefully

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.8
- **CVSS:** 8.8 (v3.1, CNA) `CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Adjacent network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.35% (percentile 21, 2026-11-26)
- **Published:** 2025-09-18T16:04:11.748Z
- **Modified:** 2026-08-05T09:14:06.042Z

## Who should check

- Anyone running Linux \>= 9927c68864e9c39cc317b4f559309ba29e642168, \< 4e7c498c3713b09bef20c76c7319555637e8bbd5; \>= 9927c68864e9c39cc317b4f559309ba29e642168, \< 110d425cdfb15006f3c4fde5264e786a247b6b36; \>= 9927c68864e9c39cc317b4f559309ba29e642168, \< 176d7345b89ced72020a313bfa4e7f345d1c3aed; \>= 9927c68864e9c39cc317b4f559309ba29e642168, \< 05143d90ac90b7abc6692285895a1ef460e008ee; \>= 9927c68864e9c39cc317b4f559309ba29e642168, \< f8e702c54413eee2d8f94f61d18adadac7c87e87; \>= 9927c68864e9c39cc317b4f559309ba29e642168, \< eabc4872f172ecb8dd8536bc366a51868154a450; \>= 9927c68864e9c39cc317b4f559309ba29e642168, \< c8e22b7a1694bb8d025ea636816472739d859145
- Anyone running Linux 2.6.25

## Description

In the Linux kernel, the following vulnerability has been resolved:

scsi: ses: Handle enclosure with just a primary component gracefully

This reverts commit 3fe97ff3d949 ("scsi: ses: Don't attach if enclosure
has no components") and introduces proper handling of case where there are
no detected secondary components, but primary component (enumerated in
num\_enclosures) does exist. That fix was originally proposed by Ding Hui
\<dinghui@sangfor.com.cn\>.

Completely ignoring devices that have one primary enclosure and no
secondary one results in ses\_intf\_add() bailing completely

	scsi 2:0:0:254: enclosure has no enumerated components
        scsi 2:0:0:254: Failed to bind enclosure -12ven in valid configurations such

even on valid configurations with 1 primary and 0 secondary enclosures as
below:

	\# sg\_ses /dev/sg0
	  3PARdata  SES               3321
	Supported diagnostic pages:
	  Supported Diagnostic Pages \[sdp\] \[0x0\]
	  Configuration (SES) \[cf\] \[0x1\]
	  Short Enclosure Status (SES) \[ses\] \[0x8\]
	\# sg\_ses -p cf /dev/sg0
	  3PARdata  SES               3321
	Configuration diagnostic page:
	  number of secondary subenclosures: 0
	  generation code: 0x0
	  enclosure descriptor list
	    Subenclosure identifier: 0 \[primary\]
	      relative ES process id: 0, number of ES processes: 1
	      number of type descriptor headers: 1
	      enclosure logical identifier (hex): 20000002ac02068d
	      enclosure vendor: 3PARdata  product: VV                rev: 3321
	  type descriptor header and text list
	    Element type: Unspecified, subenclosure id: 0
	      number of possible elements: 1

The changelog for the original fix follows

=====
We can get a crash when disconnecting the iSCSI session,
the call trace like this:

  \[ffff00002a00fb70\] kfree at ffff00000830e224
  \[ffff00002a00fba0\] ses\_intf\_remove at ffff000001f200e4
  \[ffff00002a00fbd0\] device\_del at ffff0000086b6a98
  \[ffff00002a00fc50\] device\_unregister at ffff0000086b6d58
  \[ffff00002a00fc70\] \_\_scsi\_remove\_device at ffff00000870608c
  \[ffff00002a00fca0\] scsi\_remove\_device at ffff000008706134
  \[ffff00002a00fcc0\] \_\_scsi\_remove\_target at ffff0000087062e4
  \[ffff00002a00fd10\] scsi\_remove\_target at ffff0000087064c0
  \[ffff00002a00fd70\] \_\_iscsi\_unbind\_session at ffff000001c872c4
  \[ffff00002a00fdb0\] process\_one\_work at ffff00000810f35c
  \[ffff00002a00fe00\] worker\_thread at ffff00000810f648
  \[ffff00002a00fe70\] kthread at ffff000008116e98

In ses\_intf\_add, components count could be 0, and kcalloc 0 size scomp,
but not saved in edev-\>component\[i\].scratch

In this situation, edev-\>component\[0\].scratch is an invalid pointer,
when kfree it in ses\_intf\_remove\_enclosure, a crash like above would happen
The call trace also could be other random cases when kfree cannot catch
the invalid pointer

We should not use edev-\>component\[\] array when the components count is 0
We also need check index when use edev-\>component\[\] array in
ses\_enclosure\_data\_process
=====

## Affected and fixed versions

- Linux: \>= 9927c68864e9c39cc317b4f559309ba29e642168, \< 4e7c498c3713b09bef20c76c7319555637e8bbd5; \>= 9927c68864e9c39cc317b4f559309ba29e642168, \< 110d425cdfb15006f3c4fde5264e786a247b6b36; \>= 9927c68864e9c39cc317b4f559309ba29e642168, \< 176d7345b89ced72020a313bfa4e7f345d1c3aed; \>= 9927c68864e9c39cc317b4f559309ba29e642168, \< 05143d90ac90b7abc6692285895a1ef460e008ee; \>= 9927c68864e9c39cc317b4f559309ba29e642168, \< f8e702c54413eee2d8f94f61d18adadac7c87e87; \>= 9927c68864e9c39cc317b4f559309ba29e642168, \< eabc4872f172ecb8dd8536bc366a51868154a450; \>= 9927c68864e9c39cc317b4f559309ba29e642168, \< c8e22b7a1694bb8d025ea636816472739d859145 (cvelist)
- Linux: 2.6.25 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-53431. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-53431.md
Affected: Linux >= 9927c68864e9c39cc317b4f559309ba29e642168, < 4e7c498c3713b09bef20c76c7319555637e8bbd5; >= 9927c68864e9c39cc317b4f559309ba29e642168, < 110d425cdfb15006f3c4fde5264e786a247b6b36; >= 9927c68864e9c39cc317b4f559309ba29e642168, < 176d7345b89ced72020a313bfa4e7f345d1c3aed; >= 9927c68864e9c39cc317b4f…
Fixed in: Linux 4e7c498c3713b09bef20c76c7319555637e8bbd5, Linux 110d425cdfb15006f3c4fde5264e786a247b6b36, Linux 176d7345b89ced72020a313bfa4e7f345d1c3aed, Linux 05143d90ac90b7abc6692285895a1ef460e008ee

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-53431 being exploited?

There is no confirmed exploitation: CVE-2023-53431 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.35% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-53431?

High: CVSS 8.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2023-53431?

Linux \>= 9927c68864e9c39cc317b4f559309ba29e642168, \< 4e7c498c3713b09bef20c76c7319555637e8bbd5; \>= 9927c68864e9c39cc317b4f559309ba29e642168, \< 110d425cdfb15006f3c4fde5264e786a247b6b36; \>= 9927c68864e9c39cc317b4f559309ba29e642168, \< 176d7345b89ced72020a313bfa4e7f345d1c3aed; \>= 9927c68864e9c39cc317b4f559309ba29e642168, \< 05143d90ac90b7abc6692285895a1ef460e008ee; \>= 9927c68864e9c39cc317b4f559309ba29e642168, \< f8e702c54413eee2d8f94f61d18adadac7c87e87; \>= 9927c68864e9c39cc317b4f559309ba29e642168, \< eabc4872f172ecb8dd8536bc366a51868154a450; \>= 9927c68864e9c39cc317b4f559309ba29e642168, \< c8e22b7a1694bb8d025ea636816472739d859145; Linux 2.6.25.

### Is there a fix for CVE-2023-53431?

Yes. Fixed in Linux 4e7c498c3713b09bef20c76c7319555637e8bbd5, Linux 110d425cdfb15006f3c4fde5264e786a247b6b36, Linux 176d7345b89ced72020a313bfa4e7f345d1c3aed, Linux 05143d90ac90b7abc6692285895a1ef460e008ee. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2023-53431?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/4e7c498c3713b09bef20c76c7319555637e8bbd5>
- patch: <https://git.kernel.org/stable/c/110d425cdfb15006f3c4fde5264e786a247b6b36>
- patch: <https://git.kernel.org/stable/c/176d7345b89ced72020a313bfa4e7f345d1c3aed>
- patch: <https://git.kernel.org/stable/c/05143d90ac90b7abc6692285895a1ef460e008ee>
- patch: <https://git.kernel.org/stable/c/f8e702c54413eee2d8f94f61d18adadac7c87e87>
- patch: <https://git.kernel.org/stable/c/eabc4872f172ecb8dd8536bc366a51868154a450>
- patch: <https://git.kernel.org/stable/c/c8e22b7a1694bb8d025ea636816472739d859145>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-53431>

HTML: <https://flawdb.com/CVE-2023-53431> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-53431>
