hfsplus: Verify inode mode when loading from disk
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < 91f114bffa36ce56d0e1f60a0a44fc09baaefc79| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
hfsplus: Verify inode mode 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 16bits "mode" field loaded from disk are corrupted.
According to [1], the permissions field was treated as reserved in Mac OS 8 and 9. According to [2], the reserved field was explicitly initialized with 0, and that field must remain 0 as long as reserved. Therefore, when the "mode" field is not 0 (i.e. no longer reserved), the file must be S_IFDIR if dir == 1, and the file must be one of S_IFREG/S_IFLNK/S_IFCHR/ S_IFBLK/S_IFIFO/S_IFSOCK if dir == 0.
From the CVE record · Linux
The hfsplus code can load an inode with invalid file-type bits when its on-disk mode field is corrupted. An attacker who can supply corrupted HFS+ disk metadata could trigger this condition when the inode is loaded. The input does not specify an authentication requirement, network exposure, or user interaction.
Teams running the Linux kernel with HFS+ filesystem support should check their deployments; affected versions are not specified.