In the Linux kernel, the following vulnerability has been resolved:
userfaultfd: don't BUG_ON() if khugepaged yanks our page table
Since khugepaged was changed to allow retracting page tables in file mappings without holding the mmap lock, these BUG_ON()s are wrong - get rid of them.
We could also remove the preceding "if (unlikely(...))" block, but then we could reach pteoffsetmap_lock() with transhuge pages not just for file mappings but also for anonymous mappings - which would probably be fine but I think is not necessarily expected.
{ "vanir_signatures": [ { "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4828d207dc5161dc7ddf9a4f6dcfd80c7dd7d20a", "signature_type": "Line", "target": { "file": "mm/userfaultfd.c" }, "deprecated": false, "digest": { "line_hashes": [ "96004666317817565490530309859873995859", "241633244378867718815318597344981592374", "141521045634378977496508178583805378610", "337467240914743176470093672690867559397", "306209937873552094189038798601210212862" ], "threshold": 0.9 }, "id": "CVE-2024-46838-ad2ede8f" }, { "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4828d207dc5161dc7ddf9a4f6dcfd80c7dd7d20a", "signature_type": "Function", "target": { "function": "mfill_atomic", "file": "mm/userfaultfd.c" }, "deprecated": false, "digest": { "length": 2467.0, "function_hash": "142792275286545535933077538691253461308" }, "id": "CVE-2024-46838-fbd742b0" } ] }