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.

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>

authored by

Thorsten Blum and committed by
Kees Cook
dacbfc16 1d1fd188

+1 -1
+1 -1
include/uapi/linux/if_alg.h
··· 42 42 43 43 struct af_alg_iv { 44 44 __u32 ivlen; 45 - __u8 iv[]; 45 + __u8 iv[] __counted_by(ivlen); 46 46 }; 47 47 48 48 /* Socket options */