]> git.ipfire.org Git - thirdparty/man-pages.git/commit
seccomp_user_notif.2: EXAMPLE: ensure path read() by the supervisor is null-terminated
authorMichael Kerrisk <mtk.manpages@gmail.com>
Fri, 16 Oct 2020 09:02:08 +0000 (11:02 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Sun, 25 Oct 2020 21:08:30 +0000 (22:08 +0100)
commit315d5bf84cdc338205f2fdb002f7d69c3b35a97f
tree3c7ee8bb87eb7439922a3718a71653e5ef57439b
parent3120bc5dd04112af33f34947d94449461443f989
seccomp_user_notif.2: EXAMPLE: ensure path read() by the supervisor is null-terminated

From a conversation with Jann Horn:

    >> We should probably make sure here that the value we read is actually
    >> NUL-terminated?
    >
    > So, I was curious about that point also. But, (why) are we not
    > guaranteed that it will be NUL-terminated?

    Because it's random memory filled by another process, which we don't
    necessarily trust. While seccomp notifiers aren't usable for applying
    *extra* security restrictions, the supervisor will still often be more
    privileged than the supervised process.

Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/seccomp_user_notif.2