lkml.org 
[lkml]   [2021]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] mac80211: Use memset_after() to clear tx status
From
On 18/11/2021 21:38, 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
> beyond the destination member that is intended to be the starting point
> of zeroing through the end of the struct.
>
> Additionally fix the common helper, ieee80211_tx_info_clear_status(),
> which was not clearing ack_signal, but the open-coded versions
> did. Johannes Berg points out this bug was introduced by commit
> e3e1a0bcb3f1 ("mac80211: reduce IEEE80211_TX_MAX_RATES") but was harmless.
>
> Also drops the associated unneeded BUILD_BUG_ON()s, and adds a note to
> carl9170 about usage.
>
> Signed-off-by: Kees Cook <keescook@chromium.org>
Tested-by: Christian Lamparter <chunkeey@gmail.com> [both CARL9170+P54USB on real HW]

\
 
 \ /
  Last update: 2021-11-20 16:18    [W:0.056 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site