I suspect this bug is actually an AppArmor version issue. Kernels above 6.16 need AppArmor 5.x according to AppArmor release notes quoted here:
"AppArmor 4.1.x does not support upstream kernel 6.17+ fine grained unix mediation. The regression test suite has been updated to detect the existence of upstream 6.17 fine grained unix mediation so that it does not give false positives or failures for 6.17+ unix and dbus support. To use upstream kernel 6.17+ unix and dbus mediation support an AppArmor 5.x series release is needed." https://gitlab.com/apparmor/apparmor/-/wikis/Release_Notes_4.1.7

