diff options
author | Sargun Dhillon <[email protected]> | 2019-12-30 12:35:03 -0800 |
---|---|---|
committer | Kees Cook <[email protected]> | 2020-01-02 13:03:39 -0800 |
commit | 771b894f2f3dfedc2ba5561731fffa0e39b1bbb6 (patch) | |
tree | 95902c0d8e6275f848b929faa0ed21fd6e7246e3 /scripts/gcc-plugins/cyc_complexity_plugin.c | |
parent | fd6988496e79a6a4bdb514a4655d2920209eb85d (diff) |
samples/seccomp: Zero out members based on seccomp_notif_sizes
The sizes by which seccomp_notif and seccomp_notif_resp are allocated are
based on the SECCOMP_GET_NOTIF_SIZES ioctl. This allows for graceful
extension of these datastructures. If userspace zeroes out the
datastructure based on its version, and it is lagging behind the kernel's
version, it will end up sending trailing garbage. On the other hand,
if it is ahead of the kernel version, it will write extra zero space,
and potentially cause corruption.
Signed-off-by: Sargun Dhillon <[email protected]>
Suggested-by: Tycho Andersen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Fixes: fec7b6690541 ("samples: add an example of seccomp user trap")
Cc: [email protected]
Signed-off-by: Kees Cook <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/cyc_complexity_plugin.c')
0 files changed, 0 insertions, 0 deletions