fs/iso9660: System Use bytes are parsed without SUSP negotiation
On current trunk (95c91326ad8b9f698f2c7b7ae8b65bdb1437207a),
load_name() parses every ISO 9660 System Use field as SUSP/Rock Ridge data.
SUSP requires a valid SP entry in the root directory's . record before its
entries have that meaning.
A plain ISO with Rock Ridge and Joliet disabled contains KERNEL.BIN;1. Adding
the opaque System Use bytes NM 09 01 00 EVIL to that directory record, without
adding a root SP entry, makes Limine hide /KERNEL.BIN and expose /EVIL.
xorriso continues to list /KERNEL.BIN, because the volume never negotiated
SUSP.
Expected behaviour
Only parse Rock Ridge NM entries after the root . record contains the exact
SUSP indicator SP 07 01 be ef LEN_SKP. Apply LEN_SKP before parsing System
Use entries in other directory records. If negotiation is absent or malformed,
use the canonical ISO 9660 name.
Reproduction
An exact-source harness around iso9660_open() produces:
plain-original.iso /KERNEL.BIN: OPEN
plain-unsignalled-nm.iso /KERNEL.BIN: MISS
plain-unsignalled-nm.iso /EVIL: OPEN
rockridge.iso /alias-name-long.txt: OPEN
The first fixture is generated by xorriso with Rock Ridge and Joliet disabled.
The second differs only by the nine opaque System Use bytes above. The third is
a normal xorriso -R positive control.
The prepared fix is pushed as
aba29abd. Its focused
matrix also covers nonzero LEN_SKP and malformed SP signature, length,
version, and check bytes. Optimised and ASan/UBSan builds pass, as does the
configured --enable-all --enable-werror build for BIOS and every UEFI target.
Fixed by #685