public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Fixes for CVE-2021-3998 and CVE-2021-3999
@ 2022-01-18  9:07 Siddhesh Poyarekar
  2022-01-18  9:07 ` [PATCH 1/3] support: Add helpers to create paths longer than PATH_MAX Siddhesh Poyarekar
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Siddhesh Poyarekar @ 2022-01-18  9:07 UTC (permalink / raw)
  To: libc-alpha; +Cc: adhemerval.zanella, fweimer

Add functions to make directory trees with paths longer than PATH_MAX
and use them to test fixes for CVE-2021-3998 and CVE-2021-3999.

Tested on x86_64.  Hurd build seems to already been broken, so I was
unable to test it.

Siddhesh Poyarekar (3):
  support: Add helpers to create paths longer than PATH_MAX
  realpath: Set errno to ENAMETOOLONG for result larger than PATH_MAX
    [BZ #28770]
  getcwd: Set errno to ERANGE for size == 1 (CVE-2021-3999)

 NEWS                                          |  10 +
 stdlib/Makefile                               |   1 +
 stdlib/canonicalize.c                         |  12 +-
 stdlib/tst-realpath-toolong.c                 |  48 ++++
 support/temp_file.c                           | 157 ++++++++++-
 support/temp_file.h                           |  11 +
 sysdeps/posix/getcwd.c                        |   7 +
 sysdeps/unix/sysv/linux/Makefile              |   7 +-
 sysdeps/unix/sysv/linux/getcwd.c              |   7 +
 .../unix/sysv/linux/tst-getcwd-smallbuff.c    | 245 ++++++++++++++++++
 10 files changed, 494 insertions(+), 11 deletions(-)
 create mode 100644 stdlib/tst-realpath-toolong.c
 create mode 100644 sysdeps/unix/sysv/linux/tst-getcwd-smallbuff.c

-- 
2.34.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2022-01-19  1:33 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-18  9:07 [PATCH 0/3] Fixes for CVE-2021-3998 and CVE-2021-3999 Siddhesh Poyarekar
2022-01-18  9:07 ` [PATCH 1/3] support: Add helpers to create paths longer than PATH_MAX Siddhesh Poyarekar
2022-01-18 19:42   ` Adhemerval Zanella
2022-01-19  1:33     ` Siddhesh Poyarekar
2022-01-18  9:07 ` [PATCH 2/3] realpath: Set errno to ENAMETOOLONG for result larger than PATH_MAX [BZ #28770] Siddhesh Poyarekar
2022-01-18 19:43   ` Adhemerval Zanella
2022-01-18  9:07 ` [PATCH 3/3] getcwd: Set errno to ERANGE for size == 1 (CVE-2021-3999) Siddhesh Poyarekar
2022-01-18 11:52   ` Andreas Schwab
2022-01-18 13:10     ` Siddhesh Poyarekar
2022-01-18 13:13       ` Andreas Schwab
2022-01-18 13:16         ` Siddhesh Poyarekar
2022-01-18 13:30           ` Andreas Schwab
2022-01-18 13:33             ` Siddhesh Poyarekar
2022-01-18 13:41               ` Andreas Schwab
2022-01-18 13:45                 ` Siddhesh Poyarekar
2022-01-18 13:56                   ` Siddhesh Poyarekar
2022-01-18 13:57                   ` Andreas Schwab
2022-01-18 14:40                     ` Siddhesh Poyarekar
2022-01-18 13:59                   ` Adhemerval Zanella
2022-01-18 14:44                     ` Siddhesh Poyarekar
2022-01-18 16:30                       ` Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).