Searched hist:"6 d2e4e56576f37e8edbb4032778403a6423d99b6" (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/security/apparmor/ |
H A D | mount.c | diff 6d2e4e56576f37e8edbb4032778403a6423d99b6 Mon Dec 18 03:10:03 CST 2023 John Johansen <john.johansen@canonical.com> apparmor: Fix move_mount mediation by detecting if source is detached
[ Upstream commit 8026e40608b4d552216d2a818ca7080a4264bb44 ]
Prevent move_mount from applying the attach_disconnected flag to move_mount(). This prevents detached mounts from appearing as / when applying mount mediation, which is not only incorrect but could result in bad policy being generated.
Basic mount rules like allow mount, allow mount options=(move) -> /target/,
will allow detached mounts, allowing older policy to continue to function. New policy gains the ability to specify `detached` as a source option allow mount detached -> /target/,
In addition make sure support of move_mount is advertised as a feature to userspace so that applications that generate policy can respond to the addition.
Note: this fixes mediation of move_mount when a detached mount is used, it does not fix the broader regression of apparmor mediation of mounts under the new mount api.
Link: https://lore.kernel.org/all/68c166b8-5b4d-4612-8042-1dee3334385b@leemhuis.info/T/#mb35fdde37f999f08f0b02d58dc1bf4e6b65b8da2 Fixes: 157a3537d6bc ("apparmor: Fix regression in mount mediation") Reviewed-by: Georgia Garcia <georgia.garcia@canonical.com> Signed-off-by: John Johansen <john.johansen@canonical.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
|
H A D | apparmorfs.c | diff 6d2e4e56576f37e8edbb4032778403a6423d99b6 Mon Dec 18 03:10:03 CST 2023 John Johansen <john.johansen@canonical.com> apparmor: Fix move_mount mediation by detecting if source is detached
[ Upstream commit 8026e40608b4d552216d2a818ca7080a4264bb44 ]
Prevent move_mount from applying the attach_disconnected flag to move_mount(). This prevents detached mounts from appearing as / when applying mount mediation, which is not only incorrect but could result in bad policy being generated.
Basic mount rules like allow mount, allow mount options=(move) -> /target/,
will allow detached mounts, allowing older policy to continue to function. New policy gains the ability to specify `detached` as a source option allow mount detached -> /target/,
In addition make sure support of move_mount is advertised as a feature to userspace so that applications that generate policy can respond to the addition.
Note: this fixes mediation of move_mount when a detached mount is used, it does not fix the broader regression of apparmor mediation of mounts under the new mount api.
Link: https://lore.kernel.org/all/68c166b8-5b4d-4612-8042-1dee3334385b@leemhuis.info/T/#mb35fdde37f999f08f0b02d58dc1bf4e6b65b8da2 Fixes: 157a3537d6bc ("apparmor: Fix regression in mount mediation") Reviewed-by: Georgia Garcia <georgia.garcia@canonical.com> Signed-off-by: John Johansen <john.johansen@canonical.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
|