diff options
| author | Tetsuo Handa <[email protected]> | 2025-10-23 13:25:49 +0000 |
|---|---|---|
| committer | Christian Brauner <[email protected]> | 2025-10-29 13:39:34 +0000 |
| commit | 34ab4c75588c07cca12884f2bf6b0347c7a13872 (patch) | |
| tree | a455c650e2cab7a5f2d053f3ff6f08b474ccc59d /lib/mpi/mpi-mod.c | |
| parent | afs: Fix dynamic lookup to fail on cell lookup failure (diff) | |
| download | kernel-34ab4c75588c07cca12884f2bf6b0347c7a13872.tar.gz kernel-34ab4c75588c07cca12884f2bf6b0347c7a13872.zip | |
bfs: Reconstruct file type when loading from disk
syzbot is reporting that S_IFMT bits of inode->i_mode can become bogus when
the S_IFMT bits of the 32bits "mode" field loaded from disk are corrupted
or when the 32bits "attributes" field loaded from disk are corrupted.
A documentation says that BFS uses only lower 9 bits of the "mode" field.
But I can't find an explicit explanation that the unused upper 23 bits
(especially, the S_IFMT bits) are initialized with 0.
Therefore, ignore the S_IFMT bits of the "mode" field loaded from disk.
Also, verify that the value of the "attributes" field loaded from disk is
either BFS_VREG or BFS_VDIR (because BFS supports only regular files and
the root directory).
Reported-by: [email protected]
Closes: https://syzkaller.appspot.com/bug?extid=895c23f6917da440ed0d
Signed-off-by: Tetsuo Handa <[email protected]>
Link: https://patch.msgid.link/[email protected]
Reviewed-by: Tigran Aivazian <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions
