UBUNTU-CVE-2026-99304: Integer Overflow
In the Linux kernel, the following vulnerability has been resolved: ceph: fix integer overflow in the snap trace bounds check cephupdatesnaptrace() bounds the two encoded snapid arrays that follow a struct cephmdssnaprealm with sizeof(u64) (numsnaps + numpriorparentsnaps). Both counts come straight off the wire as le32, so the addition is evaluated in unsigned int and wraps before sizeof(u64) promotes it to sizet: an MDS sending numsnaps = 1 and numpriorparentsnaps = 0xffffffff makes the sum zero and the check degenerates to cephdecodeneed(&p, e, 0, bad), which always passes. duparray() then reads numsnaps 8 bytes past the end of the message front, which cephmsgnew2() allocates at exactly frontlen bytes. An unsolicited CEPHMSGCLIENTSNAP reaches this from a malicious or compromised MDS with no client-side action, as do the snaptraces carried in an MDS reply and in a cap import. Compute the length with sizeadd()/sizemul() so it saturates at SIZEMAX instead of wrapping, in the style fs/ceph/mdsmap.c already uses for numexporttargets. BUG: KASAN: slab-out-of-bounds in duparray (include/linux/unaligned.h:28 fs/ceph/snap.c:500) Read of size 8 at addr ffff8880102a16c8 by task kworker/1:2/129 Workqueue: ceph-msgr cephconworkfn Call Trace: dumpstacklvl (lib/dumpstack.c:94 lib/dumpstack.c:120) printreport (mm/kasan/report.c:378 mm/kasan/report.c:482) kasanreport (mm/kasan/report.c:595) duparray (include/linux/unaligned.h:28 fs/ceph/snap.c:500) cephupdatesnaptrace (fs/ceph/snap.c:836) cephhandlesnap (fs/ceph/snap.c:1155) mdsdispatch (fs/ceph/mdsclient.c:7234) cephconprocessmessage (net/ceph/messenger.c:1424) cephconv1tryread (net/ceph/messengerv1.c:1430) cephconworkfn (net/ceph/messenger.c:1576) processonework (kernel/workqueue.c:3396) workerthread (kernel/workqueue.c:3479 kernel/workqueue.c:3560) kthread (kernel/kthread.c:436) retfromfork (arch/x86/kernel/process.c:158) retfromforkasm (arch/x86/entry/entry64.S:245) ... The buggy address is located 0 bytes to the right of allocated 72-byte region [ffff8880102a1680, ffff8880102a16c8)
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In ceph_update_snap_trace(), use size_add() and size_mul() to calculate the encoded snap-array length, preventing integer wraparound in the bounds check.
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems using the Ceph client in the listed Ubuntu kernel packages are exposed when they communicate with an MDS. The affected packages include linux, linux-fips, and the AWS, Azure, GCP, Oracle, and related FIPS kernel variants.
What does an attacker need to exploit it?
An attacker needs control of, or the ability to compromise, a Ceph MDS so it can send crafted snap-trace data with malicious count fields. No action is required on the client once it receives an unsolicited CEPH_MSG_CLIENT_SNAP; snap traces in MDS replies and capability imports are also affected paths.
What is the observed failure mode?
The integer overflow can make the message bounds check accept an invalid encoded array length. The client can then read past the allocated message front buffer in dup_array(), producing a slab out-of-bounds read; the report includes a KASAN detection of an 8-byte read.