{"id":"CVE-2026-72135","aliases":["CVE-2026-72135"],"related":[],"kind":"vulnerability","state":"published","title":"tpm: Make the TPM character devices non-seekable","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ntpm: Make the TPM character devices non-seekable\n\nThe TPM character devices expose a sequential command/response\ninterface, but their open handlers leave FMODE_PREAD and FMODE_PWRITE\nenabled.\n\nAfter a command leaves a response pending, pread(fd, buf, 16, 0x1400)\npasses 0x1400 as *off to tpm_common_read(). The transfer length is\nbounded by response_length, but the offset is used unchecked when\nforming data_buffer + *off. A sufficiently large offset therefore causes\nan out-of-bounds heap read through copy_to_user() and, if the copy\nsucceeds, an out-of-bounds zero-write through the following memset().\n\nPositional I/O does not provide coherent semantics for this interface.\nAn arbitrary pread offset cannot represent how much of a response has\nbeen consumed sequentially. The write callback always stores a command\nat the start of data_buffer, while pwrite() does not update file->f_pos\nand can leave the sequential read cursor stale.\n\nCall nonseekable_open() from both open handlers. This removes\nFMODE_PREAD and FMODE_PWRITE, causing positional reads and writes to\nfail with -ESPIPE before reaching the TPM callbacks, and explicitly\nmarks the files non-seekable. Normal read() and write() continue to use\nthe existing sequential f_pos cursor, leaving the response state machine\nunchanged.\n\nTested on Linux 6.12 with KASAN and a swtpm TPM2 device:\n\n - sequential partial reads returned the complete response\n - pread() and preadv() with offset 0x1400 returned -ESPIPE\n - pwrite() and pwritev() with offset zero returned -ESPIPE\n - the pending response remained intact after the rejected operations\n - a subsequent normal command/response cycle completed normally\n - no KASAN report was produced.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ntpm: Make the TPM character devices non-seekable\n\nThe TPM character devices expose a sequential command/response\ninterface, but their open handlers leave FMODE_PREAD and FMODE_PWRITE\nenabled.\n\nAfter a command leaves a response pending, pread(fd, buf, 16, 0x1400)\npasses 0x1400 as *off to tpm_common_read(). The transfer length is\nbounded by response_length, but the offset is used unchecked when\nforming data_buffer + *off. A sufficiently large offset therefore causes\nan out-of-bounds heap read through copy_to_user() and, if the copy\nsucceeds, an out-of-bounds zero-write through the following memset().\n\nPositional I/O does not provide coherent semantics for this interface.\nAn arbitrary pread offset cannot represent how much of a response has\nbeen consumed sequentially. The write callback always stores a command\nat the start of data_buffer, while pwrite() does not update file->f_pos\nand can leave the sequential read cursor stale.\n\nCall nonseekable_open() from both open handlers. This removes\nFMODE_PREAD and FMODE_PWRITE, causing positional reads and writes to\nfail with -ESPIPE before reaching the TPM callbacks, and explicitly\nmarks the files non-seekable. Normal read() and write() continue to use\nthe existing sequential f_pos cursor, leaving the response state machine\nunchanged.\n\nTested on Linux 6.12 with KASAN and a swtpm TPM2 device:\n\n - sequential partial reads returned the complete response\n - pread() and preadv() with offset 0x1400 returned -ESPIPE\n - pwrite() and pwritev() with offset zero returned -ESPIPE\n - the pending response remained intact after the rejected operations\n - a subsequent normal command/response cycle completed normally\n - no KASAN report was produced.","source":"cvelist"}],"published":"2026-08-15T05:53:10.315Z","modified":"2026-10-16T19:17:11.267Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"9488585b21bef0df1217e510c7134905d1d376a7","fixed":"ed0ffc2c016629e40ba041ed0424a772d8b02e2c","status":"affected"},{"type":"git","introduced":"9488585b21bef0df1217e510c7134905d1d376a7","fixed":"232dcf908eb7eb9d8046a9597975caf44270966e","status":"affected"},{"type":"git","introduced":"9488585b21bef0df1217e510c7134905d1d376a7","fixed":"dda695fab5e21f923d29e8cb01df256468ddfbd1","status":"affected"},{"type":"git","introduced":"9488585b21bef0df1217e510c7134905d1d376a7","fixed":"9c513dabd4540f811585a2087f23069767a284da","status":"affected"},{"type":"git","introduced":"9488585b21bef0df1217e510c7134905d1d376a7","fixed":"21a13f932972bc9836f58c44fcd47c62abdecd95","status":"affected"},{"type":"git","introduced":"9488585b21bef0df1217e510c7134905d1d376a7","fixed":"ada4b9a5087ea7f30dd8e4c6411a4fb6547eb1ed","status":"affected"},{"type":"git","introduced":"9488585b21bef0df1217e510c7134905d1d376a7","fixed":"947b773caaa548672184df025271b29bdc80b0f1","status":"affected"},{"type":"git","introduced":"9488585b21bef0df1217e510c7134905d1d376a7","fixed":"f20d61c22bcaf172d6790b6500e3838e532e71c8","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.0","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.0","status":"unaffected"},{"type":"semver","introduced":"5.10.261","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.212","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.178","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.145","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.97","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.40","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.1.5","lastAffected":"7.1.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.2","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/ed0ffc2c016629e40ba041ed0424a772d8b02e2c","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/232dcf908eb7eb9d8046a9597975caf44270966e","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/dda695fab5e21f923d29e8cb01df256468ddfbd1","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9c513dabd4540f811585a2087f23069767a284da","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/21a13f932972bc9836f58c44fcd47c62abdecd95","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ada4b9a5087ea7f30dd8e4c6411a4fb6547eb1ed","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/947b773caaa548672184df025271b29bdc80b0f1","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f20d61c22bcaf172d6790b6500e3838e532e71c8","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-10-16T18:42:38.338Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-72135","url":"https://www.cve.org/CVERecord?id=CVE-2026-72135","licence":"CVE Terms of Use","modified":"2026-10-16T18:44:58.643Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-72135","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-72135","licence":"Public domain","modified":"2026-10-16T19:17:11.267Z"}],"updatedAt":"2026-11-25T22:59:33.018Z","epss":{"score":0.00169,"percentile":0.06506,"date":"2026-12-01T12:00:22.000Z"}}