diff options
author | Willem de Bruijn <willemb@google.com> | 2016-03-09 21:58:32 -0500 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2016-07-10 23:07:01 -0400 |
commit | 1df16498dfd0d5a129bdf2982d9a08df73e8923d (patch) | |
tree | 9cdf290040db4b018dd485363ec2769a5eeaec39 /block/blk-map.c | |
parent | 58c92f1359c6811478159cfe3cc3118bdb995608 (diff) |
net: validate variable length ll headers
[ Upstream commit 2793a23aacbd754dbbb5cb75093deb7e4103bace ]
Netdevice parameter hard_header_len is variously interpreted both as
an upper and lower bound on link layer header length. The field is
used as upper bound when reserving room at allocation, as lower bound
when validating user input in PF_PACKET.
Clarify the definition to be maximum header length. For validation
of untrusted headers, add an optional validate member to header_ops.
Allow bypassing of validation by passing CAP_SYS_RAWIO, for instance
for deliberate testing of corrupt input. In this case, pad trailing
bytes, as some device drivers expect completely initialized headers.
See also http://comments.gmane.org/gmane.linux.network/401064
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'block/blk-map.c')
0 files changed, 0 insertions, 0 deletions