{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139108","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-11-30T13:22:15.914Z","datePublished":"2026-11-30T13:31:39.325Z","dateUpdated":"2026-12-01T05:41:12.388Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-12-01T05:41:12.388Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\napparmor: fix table_size() integer overflow on 32 bit\n\ntable_size() checks ALIGN(sizeof(struct table_header) + len * el_size, 8)\nin size_t, where @len is td_lolen, a u32 user-provided value from the\npolicy blob. On 32 bit kernels both operations can overflow.\n\nTriggering this bug allows to:\n - overflow a 16 byte allocation with up to 4GiB of policy data\n - store the table header at address ZERO_SIZE_PTR (kvzalloc(0))\n\nHowever, this bug requires CAP_MAC_ADMIN, only affects 32 bit kernels,\nand the copy runs until the machine is destroyed, so it gives no\ncontrollable primitive and is therefore not a security issue.\n\nCompute the size with the checked helpers and return 0 when the result is\nnot representable, so the callers can reject the table. A valid table is\nnever 0 bytes, the header alone is 12.\n\n64 bit kernels cannot overflow (these structs are 32 bit), and are hence\nnot affected."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The wrapping td_lolen is a u32 in the policy blob the attacker write()s to apparmorfs .load/.replace (profile_load → policy_update → aa_replace_profiles → aa_unpack → unpack_pdb → unpack_dfa → aa_dfa_unpack → unpack_table → table_size). No network protocol carries the blob.\nAC:L - The attacker picks td_lolen=0x40000000+k with YYTD_DATA32, so len*4 wraps and tsize=ALIGN(12+4k,8) passes the bsize check every time. There is no race and no outside state. Sizing the write over 4 MiB and placing the table at the buffer's end are the attacker's own choices.\nPR:L - aa_may_manage_policy() → aa_policy_admin_capable() checks CAP_MAC_ADMIN in subj_cred->user_ns. With unprivileged_userns_apparmor_policy=1 (the default) and user_ns->level == view_ns->level, root in an LXC/LXD container with its own AppArmor namespace can load policy without host root. A bare unshare -U fails this level check.\nUI:N - The attacker's own write() of the crafted blob to .load/.replace triggers the overflow. Nobody else has to load policy, mount anything or open a file.\nS:U - The overflow corrupts kernel heap memory next to the kvzalloc'd table in the same kernel that does the policy unpack. Container root reaching the host kernel is ordinary kernel privilege escalation, with no VM or IOMMU boundary crossed.\nC:H - A >4 MiB policy write puts aa_loaddata->data in vmalloc, and the copy faults on its guard page after a length the attacker picks. That makes a controlled-length, controlled-content overflow of a chosen kmalloc-N object, which can corrupt neighbouring objects to build kernel read primitives.\nI:H - UNPACK_ARRAY/memcpy in unpack_table() writes attacker blob bytes past the undersized table, and DATA8 wraps write the header to ZERO_SIZE_PTR. This is an out-of-bounds slab write that can be turned into control-flow hijack.\nA:H - Every trigger oopses: the copy faults on the vmalloc guard page, or a kmalloc'd blob leads to a multi-GiB wild write across lowmem that destroys the machine. The kvzalloc(0) path also faults writing the header at 0x10."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/apparmor/include/match.h","security/apparmor/match.c","security/apparmor/policy_unpack.c"],"versions":[{"version":"e06f75a6a2b43bd3a7a197bd21466f9da130e4af","lessThan":"9a934c8a856423dc55c3f7dd001dd48b455b27a1","status":"affected","versionType":"git"},{"version":"e06f75a6a2b43bd3a7a197bd21466f9da130e4af","lessThan":"60b954df92a58869cbfc0dcc4947f8b5ab309a89","status":"affected","versionType":"git"},{"version":"e06f75a6a2b43bd3a7a197bd21466f9da130e4af","lessThan":"3b2d73aa4c0228b232af7950f2d0cc32b9b8b81a","status":"affected","versionType":"git"},{"version":"e06f75a6a2b43bd3a7a197bd21466f9da130e4af","lessThan":"449195a4bb7d9c456c02b871eec6905edb449bd2","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/apparmor/include/match.h","security/apparmor/match.c","security/apparmor/policy_unpack.c"],"versions":[{"version":"2.6.36","status":"affected"},{"version":"0","lessThan":"2.6.36","status":"unaffected","versionType":"semver"},{"version":"6.12.119","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.18.65","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.3.6","lessThanOrEqual":"7.3.*","status":"unaffected","versionType":"semver"},{"version":"7.4-rc1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.36","versionEndExcluding":"6.12.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.36","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.36","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.36","versionEndExcluding":"7.4-rc1"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/9a934c8a856423dc55c3f7dd001dd48b455b27a1"},{"url":"https://git.kernel.org/stable/c/60b954df92a58869cbfc0dcc4947f8b5ab309a89"},{"url":"https://git.kernel.org/stable/c/3b2d73aa4c0228b232af7950f2d0cc32b9b8b81a"},{"url":"https://git.kernel.org/stable/c/449195a4bb7d9c456c02b871eec6905edb449bd2"}],"title":"apparmor: fix table_size() integer overflow on 32 bit","x_generator":{"engine":"bippy-1.2.0"}}}}