crypto: af_alg - Annotate struct af_alg_iv with __counted_by
Subsystems (2)
PATCH 1/1 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.
Signed-off-by Thorsten Blum <[email protected]>
--- include/uapi/linux/if_alg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/if_alg.h +1 -1
@@ -42,7 +42,7 @@ struct sockaddr_alg_new {struct af_alg_iv {__u32 ivlen; -__u8 iv[]; + __u8 iv[] __counted_by(ivlen); };/* Socket options */
Signature · 1 line
2.51.1
Quoted 5 lines · Thorsten Blum
Add the
__counted_by()compiler attribute to the flexible array member 'iv' to improve access bounds-checking viaCONFIG_UBSAN_BOUNDSandCONFIG_FORTIFY_SOURCE.Signed-off-by Thorsten Blum <[email protected]>
Reviewed-by Simon Horman <[email protected]>