summaryrefslogtreecommitdiff
path: root/lib/mpi/mpiutil.c
diff options
context:
space:
mode:
authorBert Kenward <bkenward@solarflare.com>2017-08-15 14:55:32 +0100
committerDavid S. Miller <davem@davemloft.net>2017-08-15 17:19:34 -0700
commit61deee962896f7eb547adc66ef09c8f1e7ddf7d7 (patch)
treea342ee636b165b5ef500aa18d79f2ff55f43427c /lib/mpi/mpiutil.c
parentc90e95147c27b1780e76c6e8fea1b5c78d7d387f (diff)
sfc: don't try and read ef10 data on non-ef10 NIC
The MAC stats command takes a port ID, which doesn't exist on pre-ef10 NICs (5000- and 6000- series). This is extracted from the NIC specific data; we misinterpret this as the ef10 data structure, causing us to read potentially unallocated data. With a KASAN kernel this can cause errors with: BUG: KASAN: slab-out-of-bounds in efx_mcdi_mac_stats Fixes: 0a2ab4d988d7 ("sfc: set the port-id when calling MC_CMD_MAC_STATS") Reported-by: Stefano Brivio <sbrivio@redhat.com> Tested-by: Stefano Brivio <sbrivio@redhat.com> Signed-off-by: Bert Kenward <bkenward@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions