fscrypt: destroy keyring after security_sb_delete()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
fscrypt: destroy keyring after security_sb_delete()
fscrypt_destroy_keyring() must be called after all potentially-encrypted inodes were evicted; otherwise it cannot safely destroy the keyring. Since inodes that are in-use by the Landlock LSM don't get evicted until security_sb_delete(), this means that fscrypt_destroy_keyring() must be called *after* security_sb_delete().
This fixes a WARN_ON followed by a NULL dereference, only possible if Landlock was being used on encrypted files.
From the CVE record · Linux
The Linux kernel can destroy an fscrypt keyring before Landlock-held encrypted inodes are evicted. When Landlock is used on encrypted files, this can cause a warning followed by a NULL dereference. The input does not specify authentication requirements or additional user interaction.
Anyone running the Linux kernel with Landlock and encrypted files should check their kernel; affected versions are not specified.