HomeFreeBSD

sfxge(4): check buffer size for hash flags

Description

sfxge(4): check buffer size for hash flags

The efx_rx_scale_hash_flags_get interface is unsafe, as it does not
have an argument for the size of the output buffer used to return
the flags. While the only caller currently supplies a sufficiently
large buffer, this should be checked at runtime to avoid writing
past the end of the buffer.

Submitted by: Ivan Malov <ivan.malov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18267

Details

Provenance
arybchikAuthored on
Differential Revision
D18267: sfxge(4): check buffer size for hash flags
Parents
rS341304: sfxge(4): use simpler code to check hash algorithm type
Branches
Unknown
Tags
Unknown