Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 721150

Summary: net-misc/ntpsec-1.1.8[seccomp] with sys-libs/glibc-2.31: SIGSYS/seccomp bad syscall 305
Product: Gentoo Linux Reporter: Maciej S. Szmigiero <mail>
Component: Current packagesAssignee: Steve Arnold <nerdboy>
Status: RESOLVED FIXED    
Severity: normal CC: blueness
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=705128
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 732234    
Bug Blocks: 708318    
Attachments: fix

Description Maciej S. Szmigiero 2020-05-05 23:13:13 UTC
net-misc/ntpsec-1.1.8[seccomp] with sys-libs/glibc-2.31 crashes when it tries to adjust the system clock with the following error logged in syslog:
ntpd[1234]: ERR: SIGSYS: got a trap.                                                                                                                                                       
ntpd[1234]: ERR: SIGSYS/seccomp bad syscall 305/0xc000003e                                                                                                                                 

Syscall 305 is clock_adjtime.

Upstream has actually already fixed this, but in multiple commits touching the same few lines:
https://github.com/ntpsec/ntpsec/commit/afa74426c816a138dfbab89ce294c78bd5863a1b
https://github.com/ntpsec/ntpsec/commit/444796d1e01c43c6fcda04827989738518d748a2
https://github.com/ntpsec/ntpsec/commit/3aff6247842b315bbc4c16c14766530f697b949d
https://github.com/ntpsec/ntpsec/commit/39a880bb232bc2ee6a7187230e7359bcb216fd07

I've attached a small patch that actually merges the effect of these 4 commits.
Comment 1 Maciej S. Szmigiero 2020-05-05 23:13:52 UTC
Created attachment 636298 [details, diff]
fix
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-05-05 23:18:27 UTC
This isn't a duplicate, but is closely related to, bug 705128. Thanks for the patch.
Comment 3 Larry the Git Cow gentoo-dev 2020-06-27 23:35:09 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=359d7c57fbcbd338d309bada2d67423b94cf6d06

commit 359d7c57fbcbd338d309bada2d67423b94cf6d06
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2020-06-27 23:34:49 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2020-06-27 23:34:49 +0000

    net-misc/ntpsec: Version bump
    
    Bug: https://bugs.gentoo.org/721150
    Package-Manager: Portage-2.3.87, Repoman-2.3.20
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 net-misc/ntpsec/Manifest            |   1 +
 net-misc/ntpsec/ntpsec-1.1.9.ebuild | 155 ++++++++++++++++++++++++++++++++++++
 net-misc/ntpsec/ntpsec-9999.ebuild  |   5 +-
 3 files changed, 157 insertions(+), 4 deletions(-)
Comment 4 Steve Arnold archtester gentoo-dev 2020-10-03 00:47:57 UTC
This fix is only needed up through 1.1.8. Closing since 1.1.9 is stable now.  Sorry I wasn't able to pick this up in a timely fashion.