Vulnerability record
mm: memory: fix truncation removing mapped folios
In the Linux kernel, the following vulnerability has been resolved:
mm: memory: fix truncation removing mapped folios
Ayush reported an issue that shmem/tmpfs folios are still mapped when truncating them on production: " BUG: Bad page cache in process ... pfn:... page dumped because: still mapped when deleted "
I reproduced the issue with Ayush's reproducer [1] with the latest mm-unstable branch, and I got the following crash info. From the dump message, we can see that truncate_inode_folio() is really trying to remove mapped folios, which is incorrect.
" [ 189.171977] page: refcount:3…
Remediation
No fixed version has been published for this vulnerability yet. Check the references below for vendor advisories, workarounds and mitigation guidance.
Sources