diff options
| author | 2026-07-02 07:07:29 +0900 | |
|---|---|---|
| committer | 2026-07-31 10:09:06 +0200 | |
| commit | d30b5a954e0a4dcc16bba9c310c13709a6169a52 (patch) | |
| tree | 73428f2dcd430dfa530a95d4d55fe7ebd47d0ab5 /scripts/Makefile.thinlto | |
| parent | Merge patch series "vfs: pass S_IFDIR mode to vfs_prepare_mode()" (diff) | |
romfs: detect hard link cycles
romfs_iget() follows on-disk hard link entries until it reaches a non-hard
link inode:
pos = be32_to_cpu(ri.spec) & ROMFH_MASK;
The target position is image-controlled, and the loop does not detect
cycles. A crafted romfs image can make the root inode a hard link. The hard
link can point back to itself and leave mount(2) spinning in the kernel.
Reject excessive hard link indirection with -ELOOP. Normal romfs images do
not need long hard link chains. This bounds corrupted-image traversal.
Propagate romfs_iget() errors from lookup because hard link traversal can
now fail with -ELOOP.
Signed-off-by: 이상호 <kudo3228@gmail.com>
Link: https://patch.msgid.link/20260701220729.822112-1-kudo3228@gmail.com
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
