public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] qnx4: Avoid confusing compiler about buffer lengths
@ 2023-11-30 20:51 Kees Cook
  2023-11-30 20:51 ` [PATCH v2 1/2] qnx4: Extract dir entry filename processing into helper Kees Cook
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Kees Cook @ 2023-11-30 20:51 UTC (permalink / raw)
  To: Anders Larsen; +Cc: Kees Cook, Ronald Monthero, linux-kernel, linux-hardening

Hi,

This attempts to fix the issue Ronald Monthero found[1]. Avoids using a
too-short struct buffer when reading the string, by using the existing
struct union.

-Kees

[1] https://lore.kernel.org/lkml/20231112095353.579855-1-debug.penguin32@gmail.com/

v2:
 - Use BUILD_BUG_ON() instead of _Static_assert()
v1: https://lore.kernel.org/all/20231118032638.work.955-kees@kernel.org/

Kees Cook (2):
  qnx4: Extract dir entry filename processing into helper
  qnx4: Use get_directory_fname() in qnx4_match()

 fs/qnx4/dir.c   | 52 ++++++------------------------------------
 fs/qnx4/namei.c | 29 +++++++++---------------
 fs/qnx4/qnx4.h  | 60 +++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 78 insertions(+), 63 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2023-12-15  9:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-30 20:51 [PATCH v2 0/2] qnx4: Avoid confusing compiler about buffer lengths Kees Cook
2023-11-30 20:51 ` [PATCH v2 1/2] qnx4: Extract dir entry filename processing into helper Kees Cook
2023-11-30 20:51 ` [PATCH v2 2/2] qnx4: Use get_directory_fname() in qnx4_match() Kees Cook
2023-12-04 15:46 ` [PATCH v2 0/2] qnx4: Avoid confusing compiler about buffer lengths Ronald Monthero
2023-12-04 22:10   ` Kees Cook
2023-12-15  9:29     ` Ronald Monthero
2023-12-12 21:19 ` Kees Cook
2023-12-13 16:43   ` Anders Larsen
2023-12-13 19:18     ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox