diff options
| author | Thorsten Blum <thorsten.blum@linux.dev> | 2026-01-12 12:53:11 +0100 |
|---|---|---|
| committer | Kees Cook <kees@kernel.org> | 2026-01-14 14:43:19 -0800 |
| commit | cc34c669abe0c198daec20de5185c8187f4b240d (patch) | |
| tree | 9baba02ee3b45860a48e652660e73a73e4a2d95e /fs | |
| parent | 7583873c31147be9869902e3274e3faa67e06176 (diff) | |
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>
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/ecryptfs/ecryptfs_kernel.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h index 62a2ea7f59ed..f58b12be8267 100644 --- a/fs/ecryptfs/ecryptfs_kernel.h +++ b/fs/ecryptfs/ecryptfs_kernel.h @@ -359,7 +359,7 @@ struct ecryptfs_message { /* Inherits from msg_ctx->index */ u32 index; u32 data_len; - u8 data[]; + u8 data[] __counted_by(data_len); }; struct ecryptfs_msg_ctx { |
