diff options
| author | Mingli Yu <mingli.yu@windriver.com> | 2020-02-19 15:59:22 +0800 |
|---|---|---|
| committer | Joe MacDonald <joe_macdonald@mentor.com> | 2020-02-19 09:02:01 -0500 |
| commit | 6257da999f5e7ec026d66b6e02d43e9569ef0d1c (patch) | |
| tree | 7d6d6444192a29b7a9b6ddd76bad30eaf1ba8506 | |
| parent | dc8c5e90ec7adebb4c5f3e31bdfb14fc89d63b0e (diff) | |
| download | meta-selinux-6257da999f5e7ec026d66b6e02d43e9569ef0d1c.tar.gz | |
audit: add clock_settime64 syscall
On 32bit system,
After upgrade glibc to 2.31
# strace -o /tmp/test.log date -s 09:16:45
# tail -f /tmp/test.log
close(3) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=114, ...}) = 0
clock_settime64(CLOCK_REALTIME, {tv_sec=1582103805, tv_nsec=0}) = 0
fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(0x4, 0x40), ...}) = 0
ioctl(1, TCGETS, {B115200 opost isig icanon echo ...}) = 0
write(1, "Wed Feb 19 09:16:45 UTC 2020\n", 29) = 29
close(1) = 0
close(2) = 0
exit_group(0) = ?
+++ exited with 0 +++
It means the clock_settime64 syscall is used, so
add the syscall.
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
| -rw-r--r-- | recipes-security/audit/audit/0001-lib-i386_table.h-add-new-syscall.patch | 42 | ||||
| -rw-r--r-- | recipes-security/audit/audit_2.8.5.bb | 1 |
2 files changed, 43 insertions, 0 deletions
diff --git a/recipes-security/audit/audit/0001-lib-i386_table.h-add-new-syscall.patch b/recipes-security/audit/audit/0001-lib-i386_table.h-add-new-syscall.patch new file mode 100644 index 0000000..6e1827c --- /dev/null +++ b/recipes-security/audit/audit/0001-lib-i386_table.h-add-new-syscall.patch | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | From df878b92e01f4d1c3de7f7d8229cea6a431509eb Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Mingli Yu <mingli.yu@windriver.com> | ||
| 3 | Date: Wed, 19 Feb 2020 15:23:40 +0800 | ||
| 4 | Subject: [PATCH] lib/i386_table.h: add new syscall | ||
| 5 | |||
| 6 | On 32bit system, | ||
| 7 | After upgrade glibc to 2.31 | ||
| 8 | # strace -o /tmp/test.log date -s 09:16:45 | ||
| 9 | # tail -f /tmp/test.log | ||
| 10 | close(3) = 0 | ||
| 11 | stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=114, ...}) = 0 | ||
| 12 | clock_settime64(CLOCK_REALTIME, {tv_sec=1582103805, tv_nsec=0}) = 0 | ||
| 13 | fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(0x4, 0x40), ...}) = 0 | ||
| 14 | ioctl(1, TCGETS, {B115200 opost isig icanon echo ...}) = 0 | ||
| 15 | write(1, "Wed Feb 19 09:16:45 UTC 2020\n", 29) = 29 | ||
| 16 | close(1) = 0 | ||
| 17 | close(2) = 0 | ||
| 18 | exit_group(0) = ? | ||
| 19 | +++ exited with 0 +++ | ||
| 20 | |||
| 21 | It means the clock_settime64 syscall is used, so | ||
| 22 | add the syscall. | ||
| 23 | |||
| 24 | Upstream-Status: Submitted [https://github.com/linux-audit/audit-userspace/pull/116] | ||
| 25 | |||
| 26 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | ||
| 27 | --- | ||
| 28 | lib/i386_table.h | 1 + | ||
| 29 | 1 file changed, 1 insertion(+) | ||
| 30 | |||
| 31 | diff --git a/lib/i386_table.h b/lib/i386_table.h | ||
| 32 | index 1a64c88..65fd4d9 100644 | ||
| 33 | --- a/lib/i386_table.h | ||
| 34 | +++ b/lib/i386_table.h | ||
| 35 | @@ -405,3 +405,4 @@ _S(383, "statx") | ||
| 36 | _S(384, "arch_prctl") | ||
| 37 | _S(385, "io_pgetevents") | ||
| 38 | _S(386, "rseq") | ||
| 39 | +_S(404, "clock_settime64") | ||
| 40 | -- | ||
| 41 | 2.7.4 | ||
| 42 | |||
diff --git a/recipes-security/audit/audit_2.8.5.bb b/recipes-security/audit/audit_2.8.5.bb index ee3b3b5..af36ed5 100644 --- a/recipes-security/audit/audit_2.8.5.bb +++ b/recipes-security/audit/audit_2.8.5.bb | |||
| @@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | |||
| 10 | SRC_URI = "git://github.com/linux-audit/${BPN}-userspace.git;branch=2.8_maintenance \ | 10 | SRC_URI = "git://github.com/linux-audit/${BPN}-userspace.git;branch=2.8_maintenance \ |
| 11 | file://Add-substitue-functions-for-strndupa-rawmemchr.patch \ | 11 | file://Add-substitue-functions-for-strndupa-rawmemchr.patch \ |
| 12 | file://Fixed-swig-host-contamination-issue.patch \ | 12 | file://Fixed-swig-host-contamination-issue.patch \ |
| 13 | file://0001-lib-i386_table.h-add-new-syscall.patch \ | ||
| 13 | file://auditd \ | 14 | file://auditd \ |
| 14 | file://auditd.service \ | 15 | file://auditd.service \ |
| 15 | file://audit-volatile.conf \ | 16 | file://audit-volatile.conf \ |
