]> git.proxmox.com Git - pve-kernel.git/commit
add apparmor patch to fix recvmsg returning EINVAL
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 10 Apr 2024 12:17:05 +0000 (14:17 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 10 Apr 2024 13:40:00 +0000 (15:40 +0200)
commit57cd0485a73f75d338d2df8610d5e2a82f9dce51
treebf3c690333ccff64f165f717a11f26deaacf0386
parentb48d4b9d7b31e3297b141affdc2ca6765327c66d
add apparmor patch to fix recvmsg returning EINVAL

With apparmor 4, when recvmsg() calls are checked by the apparmor LSM
they will always return EINVAL.
This causes very weird issues when apparmor profiles are in use, and a
lot of networking issues in containers (which are always using
apparmor).

When coming from sys_recvmsg, msg->msg_namelen is explicitly set to
zero early on. (see ____sys_recvmsg in net/socket.c)
We still end up in 'map_addr' where the assumption is that addr !=
NULL means addrlen has a valid size.

This is likely not a final fix, it was suggested by jjohansen on irc
to get things going until this is resolved properly.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
patches/kernel/0012-apparmor-expect-msg_namelen-0-for-recvmsg-calls.patch [new file with mode: 0644]