History

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.

Thorsten Blum committed 10 months ago

Commit dacbfc11 parent 1d1fd181 file · +1 −1Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

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