Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ecryptfs: Annotate struct ecryptfs_message with __counted_by

Add the __counted_by() compiler attribute to the flexible array member
'data' to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and
CONFIG_FORTIFY_SOURCE.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Acked-by: Tyler Hicks <code@tyhicks.com>
Link: https://patch.msgid.link/20260112115314.739612-2-thorsten.blum@linux.dev
Signed-off-by: Kees Cook <kees@kernel.org>

authored by

Thorsten Blum and committed by
Kees Cook
cc34c669 7583873c

+1 -1
+1 -1
fs/ecryptfs/ecryptfs_kernel.h
··· 359 359 /* Inherits from msg_ctx->index */ 360 360 u32 index; 361 361 u32 data_len; 362 - u8 data[]; 362 + u8 data[] __counted_by(data_len); 363 363 }; 364 364 365 365 struct ecryptfs_msg_ctx {