diff options
| author | Eric Dumazet <edumazet@google.com> | 2023-01-20 16:02:49 +0300 | 
|---|---|---|
| committer | Steffen Klassert <steffen.klassert@secunet.com> | 2023-01-23 09:44:09 +0300 | 
| commit | b6ee896385380aa621102e8ea402ba12db1cabff (patch) | |
| tree | 1f75e8c6dd19eef4cff00fa77933120fbe40c4cc /tools/perf/scripts/python/powerpc-hcalls.py | |
| parent | eb6c59b735aa6cca77cdbb59cc69d69a0d63d986 (diff) | |
| download | linux-b6ee896385380aa621102e8ea402ba12db1cabff.tar.xz | |
xfrm/compat: prevent potential spectre v1 gadget in xfrm_xlate32_attr()
  int type = nla_type(nla);
  if (type > XFRMA_MAX) {
            return -EOPNOTSUPP;
  }
@type is then used as an array index and can be used
as a Spectre v1 gadget.
  if (nla_len(nla) < compat_policy[type].len) {
array_index_nospec() can be used to prevent leaking
content of kernel memory to malicious users.
Fixes: 5106f4a8acff ("xfrm/compat: Add 32=>64-bit messages translator")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Dmitry Safonov <dima@arista.com>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Reviewed-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'tools/perf/scripts/python/powerpc-hcalls.py')
0 files changed, 0 insertions, 0 deletions
