{"id":"CVE-2026-139107","state":"PUBLISHED","title":"apparmor: convert duplicated dfa transitions to match_char()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\napparmor: convert duplicated dfa transitions to match_char()\n\nFor historical reasons several matchers duplicate the dfa character\ntransition instead of using match_char().\n\nThis is because aa_dfa_match_until() and aa_dfa_matchn_until() were\nwritten on a branch that did not yet have match_char(), and copied code\nfrom aa_dfa_match(). leftmatch_fb() used the same pattern.\n\nWhen match_char() added support for diff-encoded states, the change was\nnever ported to these copies.\n\nmatch_char() resolves a diff encoded state by using def[state] and\nretrying the same character, until it reaches a state with a valid\ntransition. The copies instead do a simple `state = def[state];` after\nthe character is consumed, so on a diff encoded state one byte is dropped\nand the walk continues from the diff parent in the wrong state.\n\nThis makes an unnamed px/Px/cx/Cx transition resolve to no profile, and\nexec fails with\n\n  apparmor=\"DENIED\" operation=\"exec\" info=\"profile transition not found\"\n\nConvert the three copies to match_char(). For a dfa with no diff\nencoded state this is a no-op.\n\nThis bug is latent until the kernel advertises policy/diff-encode.","publishedAt":"2026-11-30T13:31:38.759Z","updatedAt":"2026-11-30T13:31:38.759Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"031dcc8f4e84fea37dc6f78fdc7288aa7f8386c3","status":"affected","lessThan":"56ad6b6c08459b5b3ba4cb1ee2cfe0bbda799dbf","versionType":"git"},{"version":"031dcc8f4e84fea37dc6f78fdc7288aa7f8386c3","status":"affected","lessThan":"76ecd1412c4a038475c25b82c60b16a1a8f0b0d6","versionType":"git"},{"version":"031dcc8f4e84fea37dc6f78fdc7288aa7f8386c3","status":"affected","lessThan":"edddb2e907ccbf70600a1dca3c0c0841630c4a53","versionType":"git"},{"version":"031dcc8f4e84fea37dc6f78fdc7288aa7f8386c3","status":"affected","lessThan":"920e782ca7c6026865200d7901e1459ee5915aa5","versionType":"git"},{"version":"031dcc8f4e84fea37dc6f78fdc7288aa7f8386c3","status":"affected","lessThan":"e667fc72f7f4a54674962c324048ca2cc58bc703","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/apparmor/match.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.17","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/apparmor/match.c"]}],"references":["https://git.kernel.org/stable/c/56ad6b6c08459b5b3ba4cb1ee2cfe0bbda799dbf","https://git.kernel.org/stable/c/76ecd1412c4a038475c25b82c60b16a1a8f0b0d6","https://git.kernel.org/stable/c/edddb2e907ccbf70600a1dca3c0c0841630c4a53","https://git.kernel.org/stable/c/920e782ca7c6026865200d7901e1459ee5915aa5","https://git.kernel.org/stable/c/e667fc72f7f4a54674962c324048ca2cc58bc703"],"weaknesses":[],"ingestedAt":"2026-11-30T13:42:04.437Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139107.json","commit":"5317bbbde1916a58cb1fadabb726eb126daf44c1","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139107","state":"PUBLISHED","datePublished":"2026-11-30T13:31:38.759Z","dateUpdated":"2026-11-30T13:31:38.759Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.914Z"},"containers":{"cna":{"title":"apparmor: convert duplicated dfa transitions to match_char()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\napparmor: convert duplicated dfa transitions to match_char()\n\nFor historical reasons several matchers duplicate the dfa character\ntransition instead of using match_char().\n\nThis is because aa_dfa_match_until() and aa_dfa_matchn_until() were\nwritten on a branch that did not yet have match_char(), and copied code\nfrom aa_dfa_match(). leftmatch_fb() used the same pattern.\n\nWhen match_char() added support for diff-encoded states, the change was\nnever ported to these copies.\n\nmatch_char() resolves a diff encoded state by using def[state] and\nretrying the same character, until it reaches a state with a valid\ntransition. The copies instead do a simple `state = def[state];` after\nthe character is consumed, so on a diff encoded state one byte is dropped\nand the walk continues from the diff parent in the wrong state.\n\nThis makes an unnamed px/Px/cx/Cx transition resolve to no profile, and\nexec fails with\n\n  apparmor=\"DENIED\" operation=\"exec\" info=\"profile transition not found\"\n\nConvert the three copies to match_char(). For a dfa with no diff\nencoded state this is a no-op.\n\nThis bug is latent until the kernel advertises policy/diff-encode."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"031dcc8f4e84fea37dc6f78fdc7288aa7f8386c3","status":"affected","lessThan":"56ad6b6c08459b5b3ba4cb1ee2cfe0bbda799dbf","versionType":"git"},{"version":"031dcc8f4e84fea37dc6f78fdc7288aa7f8386c3","status":"affected","lessThan":"76ecd1412c4a038475c25b82c60b16a1a8f0b0d6","versionType":"git"},{"version":"031dcc8f4e84fea37dc6f78fdc7288aa7f8386c3","status":"affected","lessThan":"edddb2e907ccbf70600a1dca3c0c0841630c4a53","versionType":"git"},{"version":"031dcc8f4e84fea37dc6f78fdc7288aa7f8386c3","status":"affected","lessThan":"920e782ca7c6026865200d7901e1459ee5915aa5","versionType":"git"},{"version":"031dcc8f4e84fea37dc6f78fdc7288aa7f8386c3","status":"affected","lessThan":"e667fc72f7f4a54674962c324048ca2cc58bc703","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/apparmor/match.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.17","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/apparmor/match.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/56ad6b6c08459b5b3ba4cb1ee2cfe0bbda799dbf"},{"url":"https://git.kernel.org/stable/c/76ecd1412c4a038475c25b82c60b16a1a8f0b0d6"},{"url":"https://git.kernel.org/stable/c/edddb2e907ccbf70600a1dca3c0c0841630c4a53"},{"url":"https://git.kernel.org/stable/c/920e782ca7c6026865200d7901e1459ee5915aa5"},{"url":"https://git.kernel.org/stable/c/e667fc72f7f4a54674962c324048ca2cc58bc703"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:31:38.759Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.17","versionEndExcluding":"6.6.163"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.17","versionEndExcluding":"6.12.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.17","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.17","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.17","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}