{"id":"CVE-2026-139010","summary":"platform/x86: hp-bioscfg: fix slab-out-of-bounds write in hp_convert_hexstr_to_str()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nplatform/x86: hp-bioscfg: fix slab-out-of-bounds write in hp_convert_hexstr_to_str()\n\nhp_convert_hexstr_to_str() decodes an ACPI string made up of\nspace-separated ASCII hex-byte tokens of the form \"0xHH\". For\nexample, the four-byte input \"0x41\" decodes to the single\ncharacter 'A', and the nine-byte input \"0x09 0x41\" decodes to\n\"\\tA\": each token is read in a five-byte step (four characters for\nthe token, one for the trailing delimiter), and produces one output\nbyte, or two if that byte is '\\\\', '\\r', '\\n', or '\\t', which are\nwritten back out as a backslash followed by the matching letter.\n\nThe output buffer is sized with kmalloc(input_len, GFP_KERNEL), the\nraw encoded length of the input, not the decoded length. For\nwell-formed input this is generous, since five input bytes never\ndecode to more than two output bytes. But input_len comes directly\nfrom the ACPI string length reported by firmware and isn't\nguaranteed to respect the five-byte encoding, so a short input_len\ncan undersize the allocation. With input_len == 1, only one byte is\nallocated, yet decoding still produces at least one output byte\nplus the NUL terminator written unconditionally afterwards, so two\nbytes are needed. That terminator write then lands one byte past\nthe end of the allocation.\n\nKASAN caught exactly this during BIOS attribute enumeration on\nboot, triggered by a one-byte encoded input value:\n\nBUG: KASAN: slab-out-of-bounds in hp_convert_hexstr_to_str+0x6d8/0x710 [hp_bioscfg]\nWrite of size 1 at addr ffff8881032e5d81 by task (udev-worker)/520\nThe buggy address is located 0 bytes to the right of\nallocated 1-byte region [ffff8881032e5d80, ffff8881032e5d81)\n\nSize the allocation to the worst-case decoded length instead of the\nraw input length: two output bytes for every five-byte input chunk\n(DIV_ROUND_UP(input_len, 5)), plus one byte for the terminator.","modified":"2026-11-30T15:01:46.237681815Z","published":"2026-11-30T13:27:02.268Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139010.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/43562e40e0b2c70bffbd7cada5a176891a49da9d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6a6f3051e705b5c8facb0bf5984d5b981509e0b7"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a7e2d7c8aef36cfa6042c9152756c89ca2f853ff"},{"type":"WEB","url":"https://git.kernel.org/stable/c/bce7b522aeb3a0494230f68b0f66e2873e4b6aa6"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d857f6a24c7d29c564c625a896ee46fee0682746"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139010.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139010"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"a34fc329b1895fc8a6eb12099adc47009421ba6a"},{"fixed":"d857f6a24c7d29c564c625a896ee46fee0682746"},{"fixed":"bce7b522aeb3a0494230f68b0f66e2873e4b6aa6"},{"fixed":"a7e2d7c8aef36cfa6042c9152756c89ca2f853ff"},{"fixed":"43562e40e0b2c70bffbd7cada5a176891a49da9d"},{"fixed":"6a6f3051e705b5c8facb0bf5984d5b981509e0b7"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139010.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.6.0"},{"fixed":"6.6.163"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.117"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.63"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.4"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139010.json"}}],"schema_version":"1.9.2"}