]> git.ipfire.org Git - thirdparty/lxc.git/commit
Patching an incoming CVE (CVE-2022-47952) 4303/head
authorMaher Azzouzi <maherazz04@gmail.com>
Sun, 25 Dec 2022 12:50:25 +0000 (13:50 +0100)
committerRanjitsinh Rathod <ranjitsinhrathod1991@gmail.com>
Thu, 20 Apr 2023 10:10:02 +0000 (15:40 +0530)
commita14c8c1fab2b3f3e8dcc5e7f2c2c216b6da7ad5d
treefb89fa2adabf1e2623eefd6973c7c9f6d3f98180
parent7fc2f34daecdec35367210df0ccef0eca54da87f
Patching an incoming CVE (CVE-2022-47952)

lxc-user-nic in lxc through 5.0.1 is installed setuid root, and may
allow local users to infer whether any file exists, even within a
protected directory tree, because "Failed to open" often indicates
that a file does not exist, whereas "does not refer to a network
namespace path" often indicates that a file exists. NOTE: this is
different from CVE-2018-6556 because the CVE-2018-6556 fix design was
based on the premise that "we will report back to the user that the
open() failed but the user has no way of knowing why it failed";
however, in many realistic cases, there are no plausible reasons for
failing except that the file does not exist.

PoC:
> % ls /l
> ls: cannot open directory '/l': Permission denied
> % /usr/lib/x86_64-linux-gnu/lxc/lxc-user-nic delete lol lol /l/h/tt h h
> cmd/lxc_user_nic.c: 1096: main: Failed to open "/l/h/tt" <----- file does not exist.
> % /usr/lib/x86_64-linux-gnu/lxc/lxc-user-nic delete lol lol /l/h/t h h
> cmd/lxc_user_nic.c: 1101: main: Path "/l/h/t" does not refer to a network namespace path <---- file exist!

Signed-off-by: MaherAzzouzi <maherazz04@gmail.com>
Acked-by: Serge Hallyn <serge@hallyn.com>
(cherry picked from commit 1b0469530d7a38b8f8990e114b52530d1bf7f3b8)
Signed-off-by: Ranjitsinh Rathod <ranjitsinhrathod1991@gmail.com>
src/lxc/cmd/lxc_user_nic.c