{"api_version":"1","generated_at":"2026-09-21T11:38:08+00:00","cve":"CVE-2026-90179","urls":{"html":"https://cve.report/CVE-2026-90179","api":"https://cve.report/api/cve/CVE-2026-90179.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-90179","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-90179"},"summary":{"title":"apparmor: fix deadlock in complain-mode change_hat","description":"In the Linux kernel, the following vulnerability has been resolved:\n\napparmor: fix deadlock in complain-mode change_hat\n\nThe use of change_hat when in complain mode can cause a deadlock\nwhen the hat doesn't exist and a new learning profile is created\nfor the missing profile. This is because change_hat() has taken\nthe lock to search the hat list and creating the new learning\nprofile needs to take the lock to add it to the list.\n\nFrom the bug report:\n\nOriginally found in 7.0.0 in LTS ubuntu 26.04 with pam_apparmor + su\nin complain mode set to change hats.  Then verified in newest\navailable vanilla kernel I've compiled to see if still present:\n\n7.2-rc7 vanilla -> affected\n\nchecked also some other kernels:\n6.18.44 vanilla -> affected\n6.12.95 with debian patches -> unaffected\n\nOn systems without bug (for example 6.12.95 debian) it just prints:\n\naa_change_hat rc=0\n\nOn systems with bug, the executable always hangs, prints nothing and\nbecomes unkillable.  (And once stuck this way, it will cause any\nfurther hat changes to also cause the changing process to get stuck)\n\nThen in syslog you can find hint about cause:\n\nkernel: INFO: task hat:3409 blocked for more than 483 seconds.\nkernel:       Not tainted 7.2.0-rc7 #1\nkernel: \"echo 0 > /proc/sys/kernel/hung_task_timeout_secs\" disables this message.\nkernel: task:hat             state:D stack:0     pid:3409  tgid:3409  ppid:2605   task_flags:0x400000 flags:0x00080800\nkernel: Call Trace:\nkernel:  <TASK>\nkernel:  __schedule+0x48f/0xfe0\nkernel:  schedule+0x27/0xa0\nkernel:  schedule_preempt_disabled+0x15/0x30\nkernel:  __mutex_lock.constprop.0+0x569/0xa10\nkernel:  aa_new_learning_profile+0x15f/0x210\nkernel:  build_change_hat+0x19f/0x3b0\nkernel:  change_hat.isra.0+0x5dd/0xd60\nkernel:  aa_change_hat+0x2f3/0x710\nkernel:  aa_setprocattr_changehat+0x121/0x1f0\nkernel:  do_setattr+0x28c/0x340\nkernel:  apparmor_setselfattr+0x20/0x50\nkernel:  security_setselfattr+0xf6/0x110\nkernel:  __x64_sys_lsm_set_self_attr+0x53/0x90\nkernel:  do_syscall_64+0xdd/0x5e0\nkernel:  ? __mod_memcg_lruvec_state+0xfd/0x260\nkernel:  ? lruvec_stat_mod_folio+0x8d/0xd0\nkernel:  ? __folio_mod_stat+0x2d/0x90\nkernel:  ? map_anon_folio_pte_nopf+0xd1/0x1f0\nkernel:  ? do_anonymous_page+0x184/0xa10\nkernel:  ? __handle_mm_fault+0x805/0x870\nkernel:  ? count_memcg_events+0xef/0x230\nkernel:  ? handle_mm_fault+0x1f0/0x2f0\nkernel:  ? do_user_addr_fault+0x2bb/0x7b0\nkernel:  ? do_syscall_64+0x94/0x5e0\nkernel:  ? exc_page_fault+0x75/0x160\nkernel:  entry_SYSCALL_64_after_hwframe+0x76/0x7e\nkernel: RIP: 0033:0x7f815e134c8d\nkernel: RSP: 002b:00007fff6df94ea8 EFLAGS: 00000246 ORIG_RAX: 00000000000001cc\nkernel: RAX: ffffffffffffffda RBX: 0000556d8c81d040 RCX: 00007f815e134c8d\nkernel: RDX: 0000000000000046 RSI: 0000556d8c81d040 RDI: 0000000000000064\nkernel: RBP: 00007fff6df94ef0 R08: 00007f815e212ac8 R09: 000000000000000c\nkernel: R10: 0000000000000000 R11: 0000000000000246 R12: 0000556d8c81d010\nkernel: R13: 0000000000000026 R14: 0000000000000046 R15: 0000000000000064\nkernel:  </TASK>\nkernel: INFO: task hat:3409 is blocked on a mutex likely owned by task hat:3409.\n\nTo fix the issue, lift the locking out of the core of\naa_new_learning_profile(), introduce a wrapper function that takes the\nlock where needed, and have build_change_hat() call the core function\nthat no longer takes the lock.\n\nIn addition fix 4 other issues introduced by commit\n32e92764d6f8d (\"apparmor: grab ns lock and refresh when looking up changehat child profiles\")\n- aa_get_profile_rcu() was replaced-by: aa_get_profile without the\n  accompanying rcu_dereference_protected()\n- an extra aa_get_label(label) was introduced at the start of\n  change_hat() without an accompanying aa_put_label() causing a\n  reference count leak.\n- a reference count leak was introduced in the label_is_stale(label)\n  case, where the newest profile would be leaked instead of the\n  label passed to the function.\n- a potential UAF when the lookup walks up the tree with new_ns != ns\n  the new label refere\n---truncated---","state":"PUBLISHED","assigner":"Linux","published_at":"2026-09-17 17:17:11","updated_at":"2026-09-17 17:17:11"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/4ec11f14d1d6fdda787d991b142537be7841d395","name":"https://git.kernel.org/stable/c/4ec11f14d1d6fdda787d991b142537be7841d395","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/00cce5e457cb690a3b3b3d334e76e71049ec8ae5","name":"https://git.kernel.org/stable/c/00cce5e457cb690a3b3b3d334e76e71049ec8ae5","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/072fb5aeec2eac7d445bf28c7119a1d6f6a2e333","name":"https://git.kernel.org/stable/c/072fb5aeec2eac7d445bf28c7119a1d6f6a2e333","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-90179","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-90179","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected b427061ca498309bf581bb6f8df4ffcfe4c772cd 00cce5e457cb690a3b3b3d334e76e71049ec8ae5 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 32e92764d6f8d251c1bca62be33793287b453a81 072fb5aeec2eac7d445bf28c7119a1d6f6a2e333 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 32e92764d6f8d251c1bca62be33793287b453a81 4ec11f14d1d6fdda787d991b142537be7841d395 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 862ae1fcc78aea9acab2ac87cccf6431f4682b8e git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 65f95c1e7ce70bf339504e22473879e02026cfc4 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 9735e300a1c9259bfe4dc5ecdba472bb25574e8a git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5acb878db41328dae4d3249bc87b9ee4f290a663 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6446dbe02f4a3592bf062b4d12105927993086af git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 67ee65ec1a3eebdde76ccaa664d20dcf5b125a2f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.18.40 6.18.52 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.10.261 5.11 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.15.212 5.16 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.1.178 6.2 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.6.145 6.7 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.12.97 6.13 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 7.1.5 7.2 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 7.2","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.2 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.52 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.2.6 7.2.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["security/apparmor/domain.c","security/apparmor/include/policy.h","security/apparmor/policy.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"00cce5e457cb690a3b3b3d334e76e71049ec8ae5","status":"affected","version":"b427061ca498309bf581bb6f8df4ffcfe4c772cd","versionType":"git"},{"lessThan":"072fb5aeec2eac7d445bf28c7119a1d6f6a2e333","status":"affected","version":"32e92764d6f8d251c1bca62be33793287b453a81","versionType":"git"},{"lessThan":"4ec11f14d1d6fdda787d991b142537be7841d395","status":"affected","version":"32e92764d6f8d251c1bca62be33793287b453a81","versionType":"git"},{"status":"affected","version":"862ae1fcc78aea9acab2ac87cccf6431f4682b8e","versionType":"git"},{"status":"affected","version":"65f95c1e7ce70bf339504e22473879e02026cfc4","versionType":"git"},{"status":"affected","version":"9735e300a1c9259bfe4dc5ecdba472bb25574e8a","versionType":"git"},{"status":"affected","version":"5acb878db41328dae4d3249bc87b9ee4f290a663","versionType":"git"},{"status":"affected","version":"6446dbe02f4a3592bf062b4d12105927993086af","versionType":"git"},{"status":"affected","version":"67ee65ec1a3eebdde76ccaa664d20dcf5b125a2f","versionType":"git"},{"lessThan":"6.18.52","status":"affected","version":"6.18.40","versionType":"semver"},{"lessThan":"5.11","status":"affected","version":"5.10.261","versionType":"semver"},{"lessThan":"5.16","status":"affected","version":"5.15.212","versionType":"semver"},{"lessThan":"6.2","status":"affected","version":"6.1.178","versionType":"semver"},{"lessThan":"6.7","status":"affected","version":"6.6.145","versionType":"semver"},{"lessThan":"6.13","status":"affected","version":"6.12.97","versionType":"semver"},{"lessThan":"7.2","status":"affected","version":"7.1.5","versionType":"semver"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["security/apparmor/domain.c","security/apparmor/include/policy.h","security/apparmor/policy.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"7.2"},{"lessThan":"7.2","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.52","versionType":"semver"},{"lessThanOrEqual":"7.2.*","status":"unaffected","version":"7.2.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.3-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.52","versionStartIncluding":"6.18.40","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.2.6","versionStartIncluding":"7.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3-rc1","versionStartIncluding":"7.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10.261","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15.212","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1.178","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6.145","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12.97","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.1.5","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\napparmor: fix deadlock in complain-mode change_hat\n\nThe use of change_hat when in complain mode can cause a deadlock\nwhen the hat doesn't exist and a new learning profile is created\nfor the missing profile. This is because change_hat() has taken\nthe lock to search the hat list and creating the new learning\nprofile needs to take the lock to add it to the list.\n\nFrom the bug report:\n\nOriginally found in 7.0.0 in LTS ubuntu 26.04 with pam_apparmor + su\nin complain mode set to change hats.  Then verified in newest\navailable vanilla kernel I've compiled to see if still present:\n\n7.2-rc7 vanilla -> affected\n\nchecked also some other kernels:\n6.18.44 vanilla -> affected\n6.12.95 with debian patches -> unaffected\n\nOn systems without bug (for example 6.12.95 debian) it just prints:\n\naa_change_hat rc=0\n\nOn systems with bug, the executable always hangs, prints nothing and\nbecomes unkillable.  (And once stuck this way, it will cause any\nfurther hat changes to also cause the changing process to get stuck)\n\nThen in syslog you can find hint about cause:\n\nkernel: INFO: task hat:3409 blocked for more than 483 seconds.\nkernel:       Not tainted 7.2.0-rc7 #1\nkernel: \"echo 0 > /proc/sys/kernel/hung_task_timeout_secs\" disables this message.\nkernel: task:hat             state:D stack:0     pid:3409  tgid:3409  ppid:2605   task_flags:0x400000 flags:0x00080800\nkernel: Call Trace:\nkernel:  <TASK>\nkernel:  __schedule+0x48f/0xfe0\nkernel:  schedule+0x27/0xa0\nkernel:  schedule_preempt_disabled+0x15/0x30\nkernel:  __mutex_lock.constprop.0+0x569/0xa10\nkernel:  aa_new_learning_profile+0x15f/0x210\nkernel:  build_change_hat+0x19f/0x3b0\nkernel:  change_hat.isra.0+0x5dd/0xd60\nkernel:  aa_change_hat+0x2f3/0x710\nkernel:  aa_setprocattr_changehat+0x121/0x1f0\nkernel:  do_setattr+0x28c/0x340\nkernel:  apparmor_setselfattr+0x20/0x50\nkernel:  security_setselfattr+0xf6/0x110\nkernel:  __x64_sys_lsm_set_self_attr+0x53/0x90\nkernel:  do_syscall_64+0xdd/0x5e0\nkernel:  ? __mod_memcg_lruvec_state+0xfd/0x260\nkernel:  ? lruvec_stat_mod_folio+0x8d/0xd0\nkernel:  ? __folio_mod_stat+0x2d/0x90\nkernel:  ? map_anon_folio_pte_nopf+0xd1/0x1f0\nkernel:  ? do_anonymous_page+0x184/0xa10\nkernel:  ? __handle_mm_fault+0x805/0x870\nkernel:  ? count_memcg_events+0xef/0x230\nkernel:  ? handle_mm_fault+0x1f0/0x2f0\nkernel:  ? do_user_addr_fault+0x2bb/0x7b0\nkernel:  ? do_syscall_64+0x94/0x5e0\nkernel:  ? exc_page_fault+0x75/0x160\nkernel:  entry_SYSCALL_64_after_hwframe+0x76/0x7e\nkernel: RIP: 0033:0x7f815e134c8d\nkernel: RSP: 002b:00007fff6df94ea8 EFLAGS: 00000246 ORIG_RAX: 00000000000001cc\nkernel: RAX: ffffffffffffffda RBX: 0000556d8c81d040 RCX: 00007f815e134c8d\nkernel: RDX: 0000000000000046 RSI: 0000556d8c81d040 RDI: 0000000000000064\nkernel: RBP: 00007fff6df94ef0 R08: 00007f815e212ac8 R09: 000000000000000c\nkernel: R10: 0000000000000000 R11: 0000000000000246 R12: 0000556d8c81d010\nkernel: R13: 0000000000000026 R14: 0000000000000046 R15: 0000000000000064\nkernel:  </TASK>\nkernel: INFO: task hat:3409 is blocked on a mutex likely owned by task hat:3409.\n\nTo fix the issue, lift the locking out of the core of\naa_new_learning_profile(), introduce a wrapper function that takes the\nlock where needed, and have build_change_hat() call the core function\nthat no longer takes the lock.\n\nIn addition fix 4 other issues introduced by commit\n32e92764d6f8d (\"apparmor: grab ns lock and refresh when looking up changehat child profiles\")\n- aa_get_profile_rcu() was replaced-by: aa_get_profile without the\n  accompanying rcu_dereference_protected()\n- an extra aa_get_label(label) was introduced at the start of\n  change_hat() without an accompanying aa_put_label() causing a\n  reference count leak.\n- a reference count leak was introduced in the label_is_stale(label)\n  case, where the newest profile would be leaked instead of the\n  label passed to the function.\n- a potential UAF when the lookup walks up the tree with new_ns != ns\n  the new label refere\n---truncated---"}],"providerMetadata":{"dateUpdated":"2026-09-17T16:07:04.413Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/00cce5e457cb690a3b3b3d334e76e71049ec8ae5"},{"url":"https://git.kernel.org/stable/c/072fb5aeec2eac7d445bf28c7119a1d6f6a2e333"},{"url":"https://git.kernel.org/stable/c/4ec11f14d1d6fdda787d991b142537be7841d395"}],"title":"apparmor: fix deadlock in complain-mode change_hat","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-90179","datePublished":"2026-09-17T16:07:04.413Z","dateReserved":"2026-09-11T19:38:34.791Z","dateUpdated":"2026-09-17T16:07:04.413Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-09-17 17:17:11","lastModifiedDate":"2026-09-17 17:17:11","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"90179","Ordinal":"1","Title":"apparmor: fix deadlock in complain-mode change_hat","CVE":"CVE-2026-90179","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"90179","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\napparmor: fix deadlock in complain-mode change_hat\n\nThe use of change_hat when in complain mode can cause a deadlock\nwhen the hat doesn't exist and a new learning profile is created\nfor the missing profile. This is because change_hat() has taken\nthe lock to search the hat list and creating the new learning\nprofile needs to take the lock to add it to the list.\n\nFrom the bug report:\n\nOriginally found in 7.0.0 in LTS ubuntu 26.04 with pam_apparmor + su\nin complain mode set to change hats.  Then verified in newest\navailable vanilla kernel I've compiled to see if still present:\n\n7.2-rc7 vanilla -> affected\n\nchecked also some other kernels:\n6.18.44 vanilla -> affected\n6.12.95 with debian patches -> unaffected\n\nOn systems without bug (for example 6.12.95 debian) it just prints:\n\naa_change_hat rc=0\n\nOn systems with bug, the executable always hangs, prints nothing and\nbecomes unkillable.  (And once stuck this way, it will cause any\nfurther hat changes to also cause the changing process to get stuck)\n\nThen in syslog you can find hint about cause:\n\nkernel: INFO: task hat:3409 blocked for more than 483 seconds.\nkernel:       Not tainted 7.2.0-rc7 #1\nkernel: \"echo 0 > /proc/sys/kernel/hung_task_timeout_secs\" disables this message.\nkernel: task:hat             state:D stack:0     pid:3409  tgid:3409  ppid:2605   task_flags:0x400000 flags:0x00080800\nkernel: Call Trace:\nkernel:  <TASK>\nkernel:  __schedule+0x48f/0xfe0\nkernel:  schedule+0x27/0xa0\nkernel:  schedule_preempt_disabled+0x15/0x30\nkernel:  __mutex_lock.constprop.0+0x569/0xa10\nkernel:  aa_new_learning_profile+0x15f/0x210\nkernel:  build_change_hat+0x19f/0x3b0\nkernel:  change_hat.isra.0+0x5dd/0xd60\nkernel:  aa_change_hat+0x2f3/0x710\nkernel:  aa_setprocattr_changehat+0x121/0x1f0\nkernel:  do_setattr+0x28c/0x340\nkernel:  apparmor_setselfattr+0x20/0x50\nkernel:  security_setselfattr+0xf6/0x110\nkernel:  __x64_sys_lsm_set_self_attr+0x53/0x90\nkernel:  do_syscall_64+0xdd/0x5e0\nkernel:  ? __mod_memcg_lruvec_state+0xfd/0x260\nkernel:  ? lruvec_stat_mod_folio+0x8d/0xd0\nkernel:  ? __folio_mod_stat+0x2d/0x90\nkernel:  ? map_anon_folio_pte_nopf+0xd1/0x1f0\nkernel:  ? do_anonymous_page+0x184/0xa10\nkernel:  ? __handle_mm_fault+0x805/0x870\nkernel:  ? count_memcg_events+0xef/0x230\nkernel:  ? handle_mm_fault+0x1f0/0x2f0\nkernel:  ? do_user_addr_fault+0x2bb/0x7b0\nkernel:  ? do_syscall_64+0x94/0x5e0\nkernel:  ? exc_page_fault+0x75/0x160\nkernel:  entry_SYSCALL_64_after_hwframe+0x76/0x7e\nkernel: RIP: 0033:0x7f815e134c8d\nkernel: RSP: 002b:00007fff6df94ea8 EFLAGS: 00000246 ORIG_RAX: 00000000000001cc\nkernel: RAX: ffffffffffffffda RBX: 0000556d8c81d040 RCX: 00007f815e134c8d\nkernel: RDX: 0000000000000046 RSI: 0000556d8c81d040 RDI: 0000000000000064\nkernel: RBP: 00007fff6df94ef0 R08: 00007f815e212ac8 R09: 000000000000000c\nkernel: R10: 0000000000000000 R11: 0000000000000246 R12: 0000556d8c81d010\nkernel: R13: 0000000000000026 R14: 0000000000000046 R15: 0000000000000064\nkernel:  </TASK>\nkernel: INFO: task hat:3409 is blocked on a mutex likely owned by task hat:3409.\n\nTo fix the issue, lift the locking out of the core of\naa_new_learning_profile(), introduce a wrapper function that takes the\nlock where needed, and have build_change_hat() call the core function\nthat no longer takes the lock.\n\nIn addition fix 4 other issues introduced by commit\n32e92764d6f8d (\"apparmor: grab ns lock and refresh when looking up changehat child profiles\")\n- aa_get_profile_rcu() was replaced-by: aa_get_profile without the\n  accompanying rcu_dereference_protected()\n- an extra aa_get_label(label) was introduced at the start of\n  change_hat() without an accompanying aa_put_label() causing a\n  reference count leak.\n- a reference count leak was introduced in the label_is_stale(label)\n  case, where the newest profile would be leaked instead of the\n  label passed to the function.\n- a potential UAF when the lookup walks up the tree with new_ns != ns\n  the new label refere\n---truncated---","Type":"Description","Title":"apparmor: fix deadlock in complain-mode change_hat"}]}}}