[lxc/lxc] 1b0469: Patching an incoming CVE (CVE-2022-47952)

0 views
Skip to first unread message

Serge Hallyn

unread,
Jan 6, 2023, 1:59:37 PM1/6/23
to lxc-...@lists.linuxcontainers.org
Branch: refs/heads/master
Home: https://github.com/lxc/lxc
Commit: 1b0469530d7a38b8f8990e114b52530d1bf7f3b8
https://github.com/lxc/lxc/commit/1b0469530d7a38b8f8990e114b52530d1bf7f3b8
Author: Maher Azzouzi <maher...@gmail.com>
Date: 2023-01-06 (Fri, 06 Jan 2023)

Changed paths:
M src/lxc/cmd/lxc_user_nic.c

Log Message:
-----------
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 <maher...@gmail.com>
Acked-by: Serge Hallyn <se...@hallyn.com>


Commit: 1b25a401b7bd4b0baad9bba48c67e7ba4dd9e43b
https://github.com/lxc/lxc/commit/1b25a401b7bd4b0baad9bba48c67e7ba4dd9e43b
Author: Serge Hallyn <se...@hallyn.com>
Date: 2023-01-06 (Fri, 06 Jan 2023)

Changed paths:
M src/lxc/cmd/lxc_user_nic.c

Log Message:
-----------
Merge pull request #4245 from MaherAzzouzi/master

Patching an incoming CVE (CVE-2022-47952)


Compare: https://github.com/lxc/lxc/compare/440727ea38ff...1b25a401b7bd
Reply all
Reply to author
Forward
0 new messages