On 4/14/20 9:35 AM, Magnus Karlsson wrote:
Add a check that the headroom cannot be larger than the available space in the chunk. In the current code, a malicious user can set the headroom to a value larger than the chunk size minus the fixed XDP headroom. That way packets with a length larger than the supported size in the umem could get accepted and result in an out-of-bounds write. Fixes: c0c77d8fb787 ("xsk: add user memory registration support sockopt") Reported-by: Bui Quang Minh <minhquangbui99@xxxxxxxxx> Link: https://bugzilla.kernel.org/show_bug.cgi?id=207225 Signed-off-by: Magnus Karlsson <magnus.karlsson@xxxxxxxxx>
Applied, thanks everyone!