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
4242
4343 struct af_alg_iv {
4444 __u32 ivlen;
45− __u8 iv[];
45+ __u8 iv[] __counted_by(ivlen);
4646 };
4747
4848 /* Socket options */