{"id":"CVE-2026-139337","aliases":["CVE-2026-139337"],"related":[],"kind":"vulnerability","state":"published","title":"ima: reject a kexec buffer whose declared size exceeds the buffer","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nima: reject a kexec buffer whose declared size exceeds the buffer\n\nima_restore_measurement_list() parses the measurement list persisted across\nkexec.  It computes the parse end directly from the blob:\n\n\tbufendp = buf + khdr->buffer_size;\n\nkhdr->buffer_size is a u64 read straight from the persisted buffer.  The\nonly length checks in the function are size >= sizeof(*khdr), version == 1\nand count -- none relates buffer_size to size, the actual buffer size the\ncaller (ima_load_kexec_buffer()) obtained from the ima-kexec-buffer region.\nima_parse_buf() bounds every field read to bufendp, so a blob whose\ninternal buffer_size exceeds the real size makes the parse loop read past\nthe end of the buffer (CWE-125).\n\nThe buffer's memory range is validated against addressable RAM by\ncommit cbf9c4b9617b (\"of: check previous kernel's ima-kexec-buffer\nagainst memory bounds\") and commit c5489d04337b (\"x86/kexec: add a\nsanity check on previous kernel's ima kexec buffer\"), but the blob's\nown declared size is never clamped to it.  Reject a buffer_size larger\nthan size before the loop.\n\nThis is on the boot-time kexec-restore path (__init) and the buffer comes\nfrom the previous kernel, so triggering it requires control of the\npersisted buffer; it is an out-of-bounds read only.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nima: reject a kexec buffer whose declared size exceeds the buffer\n\nima_restore_measurement_list() parses the measurement list persisted across\nkexec.  It computes the parse end directly from the blob:\n\n\tbufendp = buf + khdr->buffer_size;\n\nkhdr->buffer_size is a u64 read straight from the persisted buffer.  The\nonly length checks in the function are size >= sizeof(*khdr), version == 1\nand count -- none relates buffer_size to size, the actual buffer size the\ncaller (ima_load_kexec_buffer()) obtained from the ima-kexec-buffer region.\nima_parse_buf() bounds every field read to bufendp, so a blob whose\ninternal buffer_size exceeds the real size makes the parse loop read past\nthe end of the buffer (CWE-125).\n\nThe buffer's memory range is validated against addressable RAM by\ncommit cbf9c4b9617b (\"of: check previous kernel's ima-kexec-buffer\nagainst memory bounds\") and commit c5489d04337b (\"x86/kexec: add a\nsanity check on previous kernel's ima kexec buffer\"), but the blob's\nown declared size is never clamped to it.  Reject a buffer_size larger\nthan size before the loop.\n\nThis is on the boot-time kexec-restore path (__init) and the buffer comes\nfrom the previous kernel, so triggering it requires control of the\npersisted buffer; it is an out-of-bounds read only.","source":"cvelist"}],"published":"2026-11-30T13:33:49.769Z","modified":"2026-11-30T14:18:58.590Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"94c3aac567a9ddb9e868a7fae3c927c08b51b7c6","fixed":"86d5ca8cd79fec82865b9b32a06f0c28e19062cf","status":"affected"},{"type":"git","introduced":"94c3aac567a9ddb9e868a7fae3c927c08b51b7c6","fixed":"3d1660732042d4c2ae7795255141185372bce6e2","status":"affected"},{"type":"git","introduced":"94c3aac567a9ddb9e868a7fae3c927c08b51b7c6","fixed":"afacba62cd4a6d5fbf1a2b44a8e201e6bc69401e","status":"affected"},{"type":"git","introduced":"94c3aac567a9ddb9e868a7fae3c927c08b51b7c6","fixed":"3343fc0c5d3e6df67f7d09b5bb59982db03a5c1d","status":"affected"},{"type":"git","introduced":"94c3aac567a9ddb9e868a7fae3c927c08b51b7c6","fixed":"9f867274b208d0830232f01ac26ef5a92f4ec0e4","status":"affected"},{"type":"git","introduced":"94c3aac567a9ddb9e868a7fae3c927c08b51b7c6","fixed":"6d76d153afa3ac90701a23f5715bdb3648be2f7b","status":"affected"},{"type":"git","introduced":"94c3aac567a9ddb9e868a7fae3c927c08b51b7c6","fixed":"0f33ef07be4121c87df3d5b2fa05609d743a4570","status":"affected"},{"type":"git","introduced":"94c3aac567a9ddb9e868a7fae3c927c08b51b7c6","fixed":"ceb24c7052cc4649e3b52a51a7cca7dfe4896cec","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.10","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.10","status":"unaffected"},{"type":"semver","introduced":"5.10.275","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.226","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.193","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.119","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.65","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.6","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","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/86d5ca8cd79fec82865b9b32a06f0c28e19062cf","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3d1660732042d4c2ae7795255141185372bce6e2","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/afacba62cd4a6d5fbf1a2b44a8e201e6bc69401e","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3343fc0c5d3e6df67f7d09b5bb59982db03a5c1d","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9f867274b208d0830232f01ac26ef5a92f4ec0e4","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6d76d153afa3ac90701a23f5715bdb3648be2f7b","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0f33ef07be4121c87df3d5b2fa05609d743a4570","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ceb24c7052cc4649e3b52a51a7cca7dfe4896cec","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-139337","url":"https://www.cve.org/CVERecord?id=CVE-2026-139337","licence":"CVE Terms of Use","modified":"2026-11-30T13:33:49.769Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-139337","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139337","licence":"Public domain","modified":"2026-11-30T14:18:58.590Z"}],"updatedAt":"2026-11-30T14:33:21.356Z","epss":{"score":0.00211,"percentile":0.12002,"date":"2026-12-01T12:00:22.000Z"}}