diff options
author | Steffen Klassert <steffen.klassert@secunet.com> | 2017-05-05 08:40:42 +0300 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2017-09-15 20:30:40 +0300 |
commit | 3d8757e4703f0025ea70f97e39e3b992f0cc3733 (patch) | |
tree | fd38f5c57d189ed3bb93c81abfa6018f79c5fd46 /net/ipv4/tcp_input.c | |
parent | e8c2adcc49ad1e7c33f5d160dcb21b4d7eb5212a (diff) | |
download | linux-3d8757e4703f0025ea70f97e39e3b992f0cc3733.tar.xz |
af_key: Fix slab-out-of-bounds in pfkey_compile_policy.
commit d90c902449a7561f1b1d58ba5a0d11728ce8b0b2 upstream.
The sadb_x_sec_len is stored in the unit 'byte divided by eight'.
So we have to multiply this value by eight before we can do
size checks. Otherwise we may get a slab-out-of-bounds when
we memcpy the user sec_ctx.
Fixes: df71837d502 ("[LSM-IPSec]: Security association restriction.")
Reported-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net/ipv4/tcp_input.c')
0 files changed, 0 insertions, 0 deletions