FS#78578 - [ncurses] CVE-2023-29491
Attached to Project:
Arch Linux
Opened by T.J. Townsend (blakkheim) - Tuesday, 23 May 2023, 14:34 GMT
Last edited by T.J. Townsend (blakkheim) - Saturday, 03 June 2023, 17:04 GMT
Opened by T.J. Townsend (blakkheim) - Tuesday, 23 May 2023, 14:34 GMT
Last edited by T.J. Townsend (blakkheim) - Saturday, 03 June 2023, 17:04 GMT
|
Details
Description:
The ncurses package is currently vulnerable to CVE-2023-29491. Due to the strange/closed nature of ncurses' development, there is no one single commit to backport to the current release. The two choices are as follows: Backport this huge commit with unrelated changes: https://github.com/ThomasDickey/ncurses-snapshots/commit/a6d3f92bb5bba1a71c7c3df39497abbe5fe999ff Or, what I propose, simply add "--disable-root-environ" to the configure arguments. (diff attached) Debian's security tracker says: "6.4-3 upload configures with '--disable-root-environ' to disallow loading of custom terminfo entries in setuid/setgid programs, mitigating the impact of the vulnerability." |
This task depends upon
A third option and this appears to be the only one not requiring using patches is to use --disable-setuid-environ.
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1034372#34
[2] https://sources.debian.org/src/ncurses/6.4-4/debian/patches/debian-env-access.diff/
[3] https://sources.debian.org/src/ncurses/6.4-4/debian/patches/fix-configure-root-args-option.diff/
I think I'll opt for blakkheim's initial proposal (and what Debian is doing currently).
After application with disable-root-access include/ncurses_cfg.h does not contain a define for USE_ROOT_ACCESS it does contain #define USE_ROOT_ENVIRON 1
Which should mean the _nc_env_access patched by debian-env-access.diff is used.
Please check if 6.4_20230520-1 in [core-testing] works alright.
Edit:
I missed you had all of --disable-root-access --disable-root-environ and --disable-setuid-environ set.
fbterm can build with --disable-root-environ removed with --disable-root-access and --disable-setuid-environ still set.
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1034372#29
[2] https://aur.archlinux.org/packages/fbterm
[3] fbterm-1.7_5-5-x86_64-package.log
I may remove the current fix from [testing] again and try the the route of ncurses 6.4 + `--disable-root-access` + `--disable-root-environ`.
What a mess.... /o\