diff options
| author | Thorsten Blum <thorsten.blum@linux.dev> | 2026-01-05 13:24:03 +0100 |
|---|---|---|
| committer | Kees Cook <kees@kernel.org> | 2026-01-14 14:43:18 -0800 |
| commit | dacbfc16780837aa3e00c684d89492d211fd809f (patch) | |
| tree | b54103a881379dd4677d1dbc7db37994df6490c8 /include | |
| parent | 1d1fd188691242fe4a66f7aca91f39a42425d3e8 (diff) | |
| download | linux-dacbfc16780837aa3e00c684d89492d211fd809f.tar.gz linux-dacbfc16780837aa3e00c684d89492d211fd809f.zip | |
crypto: af_alg - Annotate struct af_alg_iv with __counted_by
Add the __counted_by() compiler attribute to the flexible array member
'iv' to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and
CONFIG_FORTIFY_SOURCE.
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20260105122402.2685-2-thorsten.blum@linux.dev
Signed-off-by: Kees Cook <kees@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/uapi/linux/if_alg.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/uapi/linux/if_alg.h b/include/uapi/linux/if_alg.h index b35871cbeed7..4f51e198ac2e 100644 --- a/include/uapi/linux/if_alg.h +++ b/include/uapi/linux/if_alg.h @@ -42,7 +42,7 @@ struct sockaddr_alg_new { struct af_alg_iv { __u32 ivlen; - __u8 iv[]; + __u8 iv[] __counted_by(ivlen); }; /* Socket options */ |
