Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1638138

Re: [PATCH v7 0/5] skb_to_sgvec hardening

From Johannes Berg <johannes@sipsolutions.net>
Newsgroups linux.kernel
Subject Re: [PATCH v7 0/5] skb_to_sgvec hardening
Date 2017-05-09 16:10 +0200
Message-ID <tFdZU-2JX-5@gated-at.bofh.it> (permalink)
References <tFdQe-2qF-5@gated-at.bofh.it> <tFdZU-2JX-7@gated-at.bofh.it> <tFdQe-2qF-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 2017-05-09 at 15:50 +0200, Jason A. Donenfeld wrote:
> The recent bug with macsec and historical one with virtio have
> indicated that letting skb_to_sgvec trounce all over an sglist
> without checking the length is probably a bad idea. And it's not
> necessary either: an sglist already explicitly marks its last
> item, and the initialization functions are diligent in doing so.
> Thus there's a clear way of avoiding future overflows.
> 
> So, this patchset, from a high level, makes skb_to_sgvec return
> a potential error code, and then adjusts all callers to check
> for the error code.

Perhaps you should add __must_check annotation to the function
prototype(s)?

johannes

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v7 0/5] skb_to_sgvec hardening "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-05-09 16:00 +0200
  [PATCH v7 4/5] macsec: check return value of skb_to_sgvec always "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-05-09 16:00 +0200
  [PATCH v7 1/5] skbuff: return -EMSGSIZE in skb_to_sgvec to prevent overflow "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-05-09 16:00 +0200
  Re: [PATCH v7 0/5] skb_to_sgvec hardening Johannes Berg <johannes@sipsolutions.net> - 2017-05-09 16:10 +0200
    Re: [PATCH v7 0/5] skb_to_sgvec hardening "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-05-09 16:10 +0200

csiph-web