Skip to content

Commit

Permalink
run: Only compare the lowest 32 ioctl arg bits for TIOCSTI
Browse files Browse the repository at this point in the history
Closes #2782.

Closes: #2783
Approved by: alexlarsson

(cherry picked from commit a9107fe)
  • Loading branch information
refi64 authored and alexlarsson committed Mar 26, 2019
1 parent 43fc48e commit 8e0aaf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/flatpak-run.c
Expand Up @@ -2394,7 +2394,7 @@ setup_seccomp (FlatpakBwrap *bwrap,
{SCMP_SYS (clone), &SCMP_A0 (SCMP_CMP_MASKED_EQ, CLONE_NEWUSER, CLONE_NEWUSER)},

/* Don't allow faking input to the controlling tty (CVE-2017-5226) */
{SCMP_SYS (ioctl), &SCMP_A1 (SCMP_CMP_EQ, (int) TIOCSTI)},
{SCMP_SYS (ioctl), &SCMP_A1 (SCMP_CMP_MASKED_EQ, 0xFFFFFFFFu, (int) TIOCSTI)},
};

struct
Expand Down

0 comments on commit 8e0aaf4

Please sign in to comment.