Re: [PATCH v2] bpf: Add length check for SK_DIAG_BPF_STORAGE_REQ_MAP_FD parsing
From: Lin Ma
Date: Tue Jul 25 2023 - 02:06:15 EST
Hello Leon,
>
> My concern is related to maintainability in long run. Your check adds
> another layer of cabal knowledge which will be copied/pasted in other
> places.
>
> Thanks
>
Yeah, I guess you are right. I guess I should not just *fix* this issue
but also think of the maintainability. The very first idea pop into my
mind is to complete the necessary nla_policy hence the invalid nlattrs
could be rejected at the very first place.
Will spend more time on this.
Regards
Lin