Linux
fsverity: Fix bpf_get_fsverity_digest() dynptr assumptions
In the Linux kernel, the following vulnerability has been resolved: fsverity: Fix bpf_get_fsverity_digest() dynptr assumptions The BPF verifier and the dynptr abstraction ensure that the memory space referenced by a dynptr remains valid. They do not, however, provide any guarantee that the contents of the memory are stable. kfuncs are expected to remain memory-safe even if concurrent modifications occur. bpf_get_fsverity_digest() didn't follow that: it could crash if arg->digest_size was concurrently modified. Fix that by using the known-good value hash_alg->digest_size instead. Also widen 'dynptr_sz' and 'out_digest_sz' to u64 to match the return type of __bpf_dynptr_size(). It doesn't appear that it can actually be more than INT_MAX currently (since __bpf_dynptr_data_rw() excludes file-based pointers), but the correct type might as well be used.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 67814c00de3161181cddd06c77aeaf86ac4cc584, < 1344b632cb5043e32939a84568125719111c5af3
- >= 67814c00de3161181cddd06c77aeaf86ac4cc584, < 2a5cfcad1d56e26d645b7887b0ed24c371851525
- >= 67814c00de3161181cddd06c77aeaf86ac4cc584, < 5bd63cad9df4328a184c409fbdad4f17944bcdb8
- >= 67814c00de3161181cddd06c77aeaf86ac4cc584, < 3e8ec7c0387273329374f5c7bd61f5f38af71fe1
Fixed in 1344b632cb5043e32939a84568125719111c5af3, 2a5cfcad1d56e26d645b7887b0ed24c371851525, 5bd63cad9df4328a184c409fbdad4f17944bcdb8, 3e8ec7c0387273329374f5c7bd61f5f38af71fe1
- 6.8
Fixed in 0, 6.12.104, 6.18.45, 7.1.9, 7.2
Mitigation
Upgrade Linux to 1344b632cb5043e32939a84568125719111c5af3 or 2a5cfcad1d56e26d645b7887b0ed24c371851525 or 5bd63cad9df4328a184c409fbdad4f17944bcdb8 or 3e8ec7c0387273329374f5c7bd61f5f38af71fe1 or later.
Upgrade Linux to 0 or 6.12.104 or 6.18.45 or 7.1.9 or 7.2 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.