Re: [PATCH 39/64] mac80211: Use memset_after() to clear tx status

2021-08-13 Thread Johannes Berg
On Fri, 2021-08-13 at 09:08 -0700, Kees Cook wrote: > > > > The common helper should also clear ack_signal, but that was broken by > > commit e3e1a0bcb3f1 ("mac80211: reduce IEEE80211_TX_MAX_RATES"), because > > that commit changed the order of the fields and updated carl9170 and p54 > > properly

Re: [PATCH 39/64] mac80211: Use memset_after() to clear tx status

2021-08-13 Thread Kees Cook
On Fri, Aug 13, 2021 at 09:40:07AM +0200, Johannes Berg wrote: > On Sat, 2021-07-31 at 08:55 -0700, Kees Cook wrote: > > On Tue, Jul 27, 2021 at 01:58:30PM -0700, Kees Cook wrote: > > > In preparation for FORTIFY_SOURCE performing compile-time and run-time > > > field bounds checking for memset(),

Re: [PATCH 39/64] mac80211: Use memset_after() to clear tx status

2021-08-13 Thread Johannes Berg
On Sat, 2021-07-31 at 08:55 -0700, Kees Cook wrote: > > > @@ -278,9 +278,7 @@ static void carl9170_tx_release(struct kref *ref) > >   BUILD_BUG_ON( > >   offsetof(struct ieee80211_tx_info, status.ack_signal) != 20); > >   > > > > - memset(>status.ack_signal, 0, > > -

Re: [PATCH 39/64] mac80211: Use memset_after() to clear tx status

2021-08-13 Thread Johannes Berg
On Sat, 2021-07-31 at 08:55 -0700, Kees Cook wrote: > On Tue, Jul 27, 2021 at 01:58:30PM -0700, Kees Cook wrote: > > In preparation for FORTIFY_SOURCE performing compile-time and run-time > > field bounds checking for memset(), avoid intentionally writing across > > neighboring fields. > > > >

Re: [PATCH 39/64] mac80211: Use memset_after() to clear tx status

2021-07-31 Thread Kees Cook
On Tue, Jul 27, 2021 at 01:58:30PM -0700, Kees Cook wrote: > In preparation for FORTIFY_SOURCE performing compile-time and run-time > field bounds checking for memset(), avoid intentionally writing across > neighboring fields. > > Use memset_after() so memset() doesn't get confused about writing

[PATCH 39/64] mac80211: Use memset_after() to clear tx status

2021-07-27 Thread Kees Cook
In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memset(), avoid intentionally writing across neighboring fields. Use memset_after() so memset() doesn't get confused about writing beyond the destination member that is intended to be the starting