Skip to content

seccomp: add 64-bit time_t syscalls#40739

Merged
kolyshkin merged 1 commit intomoby:masterfrom
thaJeztah:seccomp_time64
Apr 2, 2020
Merged

seccomp: add 64-bit time_t syscalls#40739
kolyshkin merged 1 commit intomoby:masterfrom
thaJeztah:seccomp_time64

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

(hopefully) fixes / addresses: #40734

Relates to https://patchwork.kernel.org/patch/10756415/

Added to whitelist:

  • clock_getres_time64 (equivalent of clock_getres, which was whitelisted)
  • clock_gettime64 (equivalent of clock_gettime, which was whitelisted)
  • clock_nanosleep_time64 (equivalent of clock_nanosleep, which was whitelisted)
  • futex_time64 (equivalent of futex, which was whitelisted)
  • io_pgetevents_time64 (equivalent of io_pgetevents, which was whitelisted)
  • mq_timedreceive_time64 (equivalent of mq_timedreceive, which was whitelisted)
  • mq_timedsend_time64 (equivalent of mq_timedsend, which was whitelisted)
  • ppoll_time64 (equivalent of ppoll, which was whitelisted)
    • ⚠️ ppoll was removed in libseccomp; was it confused for poll?
    • update: looks like it, and fixed in seccomp/libseccomp@e3647f5
  • pselect6_time64 (equivalent of pselect6, which was whitelisted)
  • recvmmsg_time64 (equivalent of recvmmsg, which was whitelisted)
    • no _time64 equivalent for recvmsg ?
  • rt_sigtimedwait_time64 (equivalent of rt_sigtimedwait, which was whitelisted)
  • sched_rr_get_interval_time64 (equivalent of sched_rr_get_interval, which was whitelisted)
  • semtimedop_time64 (equivalent of semtimedop, which was whitelisted)
  • timer_gettime64 (equivalent of timer_gettime, which was whitelisted)
  • timer_settime64 (equivalent of timer_settime, which was whitelisted)
  • timerfd_gettime64 (equivalent of timerfd_gettime, which was whitelisted)
  • timerfd_settime64 (equivalent of timerfd_settime, which was whitelisted)
  • utimensat_time64 (equivalent of utimensat, which was whitelisted)
    • no _time64 equivalent for utime and utimes ?

Not added to whitelist:

  • clock_adjtime64 (equivalent of clock_adjtime, which was not whitelisted)
  • clock_settime64 (equivalent of clock_settime, which was not whitelisted)

To be looked at:

These syscalls are also new (and added to libseccomp in seccomp/libseccomp@bf747eb), but need to be looked at separately

  • clone3 (equivalent of clone? which was not whitelisted)
  • fsconfig
  • fsmount
  • fsopen
  • fspick
  • move_mount
  • open_tree
  • pidfd_open
  • pidfd_send_signal

- Description for the changelog

- Fix 64-bit time_t syscalls being blocked by default seccomp profile

- A picture of a cute animal (not mandatory but encouraged)

Relates to https://patchwork.kernel.org/patch/10756415/

Added to whitelist:

- `clock_getres_time64` (equivalent of `clock_getres`, which was whitelisted)
- `clock_gettime64` (equivalent of `clock_gettime`, which was whitelisted)
- `clock_nanosleep_time64` (equivalent of `clock_nanosleep`, which was whitelisted)
- `futex_time64` (equivalent of `futex`, which was whitelisted)
- `io_pgetevents_time64` (equivalent of `io_pgetevents`, which was whitelisted)
- `mq_timedreceive_time64` (equivalent of `mq_timedreceive`, which was whitelisted)
- `mq_timedsend_time64 ` (equivalent of `mq_timedsend`, which was whitelisted)
- `ppoll_time64` (equivalent of `ppoll`, which was whitelisted)
- `pselect6_time64` (equivalent of `pselect6`, which was whitelisted)
- `recvmmsg_time64` (equivalent of `recvmmsg`, which was whitelisted)
- `rt_sigtimedwait_time64` (equivalent of `rt_sigtimedwait`, which was whitelisted)
- `sched_rr_get_interval_time64` (equivalent of `sched_rr_get_interval`, which was whitelisted)
- `semtimedop_time64` (equivalent of `semtimedop`, which was whitelisted)
- `timer_gettime64` (equivalent of `timer_gettime`, which was whitelisted)
- `timer_settime64` (equivalent of `timer_settime`, which was whitelisted)
- `timerfd_gettime64` (equivalent of `timerfd_gettime`, which was whitelisted)
- `timerfd_settime64` (equivalent of `timerfd_settime`, which was whitelisted)
- `utimensat_time64` (equivalent of `utimensat`, which was whitelisted)

Not added to whitelist:

- `clock_adjtime64` (equivalent of `clock_adjtime`, which was not whitelisted)
- `clock_settime64` (equivalent of `clock_settime`, which was not whitelisted)

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
Copy link
Copy Markdown
Member Author

ping @justincormack @cpuguy83 @AkihiroSuda PTAL

Copy link
Copy Markdown

@xantares xantares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

Copy link
Copy Markdown
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kolyshkin
Copy link
Copy Markdown
Contributor

no _time64 equivalent for recvmsg ?

recvmsg, unlike recvmmsg, does not have a timeout argument

no _time64 equivalent for utime and utimes ?

These two are obsoleted in favor of utimensat(2).

Comment thread profiles/seccomp/default.json
"mq_notify",
"mq_open",
"mq_timedreceive",
"mq_timedreceive_time64",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Copy Markdown
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix the name for mq_timedreceiv_time64, otherwise lgtm

Copy link
Copy Markdown
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants