{"id":"CVE-2026-98171","summary":"smb: client: fix next_buffer UAF and NextCommand bounds in compound PDUs","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fix next_buffer UAF and NextCommand bounds in compound PDUs\n\nFix several related bounds checking and pointer lifecycle issues in\nreceive_encrypted_standard()'s handling of compound encrypted frames:\n\n- Clear next_buffer after assigning it to server-\u003ebigbuf. A stale\n  next_buffer pointer can lead to a use-after-free on subsequent\n  error paths.\n- Update pdu_length to the decrypted plaintext size (buf_size). Using\n  the pre-decryption length allows NextCommand to point into stale\n  ciphertext residue.\n- Reject next_cmd values smaller than MID_HEADER_SIZE(server).\n- Fix an integer overflow in the upper bound check by verifying\n  pdu_length - next_cmd \u003c MID_HEADER_SIZE(server), ensuring the\n  trailing slice is large enough for a header.","modified":"2026-10-08T02:52:52.140124151Z","published":"2026-10-06T08:44:15.927Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98171.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/05762c5bc1cfdcac36747994fde2c04387a457f1"},{"type":"WEB","url":"https://git.kernel.org/stable/c/491e33144dee872cffda207f6fcb09260728f803"},{"type":"WEB","url":"https://git.kernel.org/stable/c/72eaef1f37a3b6bec11c342736834dc3707be3e4"},{"type":"WEB","url":"https://git.kernel.org/stable/c/858d5ac22cb889266993e7670f9f0c4f4aeedd78"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8749946579708ea0d339034bb7f423a67dbe89cf"},{"type":"WEB","url":"https://git.kernel.org/stable/c/96c436e4b010711452b2872558938f4ef276492a"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98171.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-98171"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"b24df3e30cbf48255db866720fb71f14bf9d2f39"},{"fixed":"72eaef1f37a3b6bec11c342736834dc3707be3e4"},{"fixed":"491e33144dee872cffda207f6fcb09260728f803"},{"fixed":"8749946579708ea0d339034bb7f423a67dbe89cf"},{"fixed":"96c436e4b010711452b2872558938f4ef276492a"},{"fixed":"858d5ac22cb889266993e7670f9f0c4f4aeedd78"},{"fixed":"05762c5bc1cfdcac36747994fde2c04387a457f1"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98171.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.19.0"},{"fixed":"6.1.189"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.158"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.112"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.54"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.2.8"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98171.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"}]}