--- v2
+++ v6
@@ -1,396 +1,176 @@
-Test propagation of noexec mount points or file executability through
-files open with or without O_MAYEXEC.
+When the O_MAYEXEC flag is passed, openat2(2) may be subject to
+additional restrictions depending on a security policy managed by the
+kernel through a sysctl or implemented by an LSM thanks to the
+inode_permission hook. This new flag is ignored by open(2) and
+openat(2) because of their unspecified flags handling.
+
+The underlying idea is to be able to restrict scripts interpretation
+according to a policy defined by the system administrator. For this to
+be possible, script interpreters must use the O_MAYEXEC flag
+appropriately. To be fully effective, these interpreters also need to
+handle the other ways to execute code: command line parameters (e.g.,
+option -e for Perl), module loading (e.g., option -m for Python), stdin,
+file sourcing, environment variables, configuration files, etc.
+According to the threat model, it may be acceptable to allow some script
+interpreters (e.g. Bash) to interpret commands from stdin, may it be a
+TTY or a pipe, because it may not be enough to (directly) perform
+syscalls. Further documentation can be found in a following patch.
+
+Even without enforced security policy, userland interpreters can set it
+to enforce the system policy at their level, knowing that it will not
+break anything on running systems which do not care about this feature.
+However, on systems which want this feature enforced, there will be
+knowledgeable people (i.e. sysadmins who enforced O_MAYEXEC
+deliberately) to manage it. A simple security policy implementation,
+configured through a dedicated sysctl, is available in a following
+patch.
+
+O_MAYEXEC should not be confused with the O_EXEC flag which is intended
+for execute-only, which obviously doesn't work for scripts. However, a
+similar behavior could be implemented in userland with O_PATH:
+https://lore.kernel.org/lkml/1e2f6913-42f2-3578-28ed-567f6a4bdda1@digikod.net/
+
+The implementation of O_MAYEXEC almost duplicates what execve(2) and
+uselib(2) are already doing: setting MAY_OPENEXEC in acc_mode (which can
+then be checked as MAY_EXEC, if enforced), and propagating FMODE_EXEC to
+_fmode via __FMODE_EXEC flag (which can then trigger a
+fanotify/FAN_OPEN_EXEC event).
+
+This is an updated subset of the patch initially written by Vincent
+Strubel for CLIP OS 4:
+https://github.com/clipos-archive/src_platform_clip-patches/blob/f5cb330d6b684752e403b4e41b39f7004d88e561/1901_open_mayexec.patch
+This patch has been used for more than 12 years with customized script
+interpreters. Some examples (with the original name O_MAYEXEC) can be
+found here:
+https://github.com/clipos-archive/clipos4_portage-overlay/search?q=O_MAYEXEC
+
+Co-developed-by: Vincent Strubel <vincent.strubel@ssi.gouv.fr>
+Signed-off-by: Vincent Strubel <vincent.strubel@ssi.gouv.fr>
+Co-developed-by: Thibaut Sautereau <thibaut.sautereau@ssi.gouv.fr>
+Signed-off-by: Thibaut Sautereau <thibaut.sautereau@ssi.gouv.fr>
+Signed-off-by: Mickaël Salaün <mic@digikod.net>
+Reviewed-by: Deven Bowers <deven.desai@linux.microsoft.com>
+Reviewed-by: Kees Cook <keescook@chromium.org>
+Cc: Aleksa Sarai <cyphar@cyphar.com>
+Cc: Al Viro <viro@zeniv.linux.org.uk>
+---
+
+Changes since v5:
+* Update commit message.
+
+Changes since v3:
+* Switch back to O_MAYEXEC, but only handle it with openat2(2) which
+ checks unknown flags (suggested by Aleksa Sarai). Cf.
+ https://lore.kernel.org/lkml/20200430015429.wuob7m5ofdewubui@yavin.dot.cyphar.com/
+
+Changes since v2:
+* Replace O_MAYEXEC with RESOLVE_MAYEXEC from openat2(2). This change
+ enables to not break existing application using bogus O_* flags that
+ may be ignored by current kernels by using a new dedicated flag, only
+ usable through openat2(2) (suggested by Jeff Layton). Using this flag
+ will results in an error if the running kernel does not support it.
+ User space needs to manage this case, as with other RESOLVE_* flags.
+ The best effort approach to security (for most common distros) will
+ simply consists of ignoring such an error and retry without
+ RESOLVE_MAYEXEC. However, a fully controlled system may which to
+ error out if such an inconsistency is detected.
Changes since v1:
-* move tests from yama to exec
-* fix _GNU_SOURCE in kselftest_harness.h
-* add a new test sysctl_access_write to check if CAP_MAC_ADMIN is taken
- into account
-* test directory execution which is always forbidden since commit
- 73601ea5b7b1 ("fs/open.c: allow opening only regular files during
- execve()"), and also check that even the root user can not bypass file
- execution checks
-* make sure delete_workspace() always as enough right to succeed
-* cosmetic cleanup
+* Set __FMODE_EXEC when using O_MAYEXEC to make this information
+ available through the new fanotify/FAN_OPEN_EXEC event (suggested by
+ Jan Kara and Matthew Bobrowski):
+ https://lore.kernel.org/lkml/20181213094658.GA996@lithium.mbobrowski.org/
+---
+ fs/fcntl.c | 2 +-
+ fs/open.c | 8 ++++++++
+ include/linux/fcntl.h | 2 +-
+ include/linux/fs.h | 2 ++
+ include/uapi/asm-generic/fcntl.h | 7 +++++++
+ 5 files changed, 19 insertions(+), 2 deletions(-)
-Signed-off-by: Mickaël Salaün <mic@digikod.net>
-Cc: Kees Cook <keescook@chromium.org>
-Cc: Mickaël Salaün <mickael.salaun@ssi.gouv.fr>
-Cc: Shuah Khan <shuah@kernel.org>
----
- tools/testing/selftests/exec/.gitignore | 1 +
- tools/testing/selftests/exec/Makefile | 4 +-
- tools/testing/selftests/exec/omayexec.c | 317 ++++++++++++++++++++
- tools/testing/selftests/kselftest_harness.h | 3 +
- 4 files changed, 324 insertions(+), 1 deletion(-)
- create mode 100644 tools/testing/selftests/exec/omayexec.c
+diff --git a/fs/fcntl.c b/fs/fcntl.c
+index 2e4c0fa2074b..0357ad667563 100644
+--- a/fs/fcntl.c
++++ b/fs/fcntl.c
+@@ -1033,7 +1033,7 @@ static int __init fcntl_init(void)
+ * Exceptions: O_NONBLOCK is a two bit define on parisc; O_NDELAY
+ * is defined as O_NONBLOCK on some platforms and not on others.
+ */
+- BUILD_BUG_ON(21 - 1 /* for O_RDONLY being 0 */ !=
++ BUILD_BUG_ON(22 - 1 /* for O_RDONLY being 0 */ !=
+ HWEIGHT32(
+ (VALID_OPEN_FLAGS & ~(O_NONBLOCK | O_NDELAY)) |
+ __FMODE_EXEC | __FMODE_NONOTIFY));
+diff --git a/fs/open.c b/fs/open.c
+index 623b7506a6db..38e434bdbbb6 100644
+--- a/fs/open.c
++++ b/fs/open.c
+@@ -987,6 +987,8 @@ inline struct open_how build_open_how(int flags, umode_t mode)
+ .mode = mode & S_IALLUGO,
+ };
+
++ /* O_MAYEXEC is ignored by syscalls relying on build_open_how(). */
++ how.flags &= ~O_MAYEXEC;
+ /* O_PATH beats everything else. */
+ if (how.flags & O_PATH)
+ how.flags &= O_PATH_FLAGS;
+@@ -1054,6 +1056,12 @@ inline int build_open_flags(const struct open_how *how, struct open_flags *op)
+ if (flags & __O_SYNC)
+ flags |= O_DSYNC;
+
++ /* Checks execution permissions on open. */
++ if (flags & O_MAYEXEC) {
++ acc_mode |= MAY_OPENEXEC;
++ flags |= __FMODE_EXEC;
++ }
++
+ op->open_flag = flags;
+
+ /* O_TRUNC implies we need access checks for write permissions */
+diff --git a/include/linux/fcntl.h b/include/linux/fcntl.h
+index 7bcdcf4f6ab2..e188a360fa5f 100644
+--- a/include/linux/fcntl.h
++++ b/include/linux/fcntl.h
+@@ -10,7 +10,7 @@
+ (O_RDONLY | O_WRONLY | O_RDWR | O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC | \
+ O_APPEND | O_NDELAY | O_NONBLOCK | O_NDELAY | __O_SYNC | O_DSYNC | \
+ FASYNC | O_DIRECT | O_LARGEFILE | O_DIRECTORY | O_NOFOLLOW | \
+- O_NOATIME | O_CLOEXEC | O_PATH | __O_TMPFILE)
++ O_NOATIME | O_CLOEXEC | O_PATH | __O_TMPFILE | O_MAYEXEC)
+
+ /* List of all valid flags for the how->upgrade_mask argument: */
+ #define VALID_UPGRADE_FLAGS \
+diff --git a/include/linux/fs.h b/include/linux/fs.h
+index f5abba86107d..56f835c9a87a 100644
+--- a/include/linux/fs.h
++++ b/include/linux/fs.h
+@@ -101,6 +101,8 @@ typedef int (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
+ #define MAY_CHDIR 0x00000040
+ /* called from RCU mode, don't block */
+ #define MAY_NOT_BLOCK 0x00000080
++/* the inode is opened with O_MAYEXEC */
++#define MAY_OPENEXEC 0x00000100
+
+ /*
+ * flags in file.f_mode. Note that FMODE_READ and FMODE_WRITE must correspond
+diff --git a/include/uapi/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h
+index 9dc0bf0c5a6e..bca90620119f 100644
+--- a/include/uapi/asm-generic/fcntl.h
++++ b/include/uapi/asm-generic/fcntl.h
+@@ -97,6 +97,13 @@
+ #define O_NDELAY O_NONBLOCK
+ #endif
+
++/*
++ * Code execution from file is intended, checks such permission. A simple
++ * policy can be enforced system-wide as explained in
++ * Documentation/admin-guide/sysctl/fs.rst .
++ */
++#define O_MAYEXEC 040000000
++
+ #define F_DUPFD 0 /* dup */
+ #define F_GETFD 1 /* get close_on_exec */
+ #define F_SETFD 2 /* set/clear close_on_exec */
+--
+2.27.0
-diff --git a/tools/testing/selftests/exec/.gitignore b/tools/testing/selftests/exec/.gitignore
-index b02279da6fa1..78487c987c07 100644
---- a/tools/testing/selftests/exec/.gitignore
-+++ b/tools/testing/selftests/exec/.gitignore
-@@ -1,3 +1,4 @@
-+/omayexec
- subdir*
- script*
- execveat
-diff --git a/tools/testing/selftests/exec/Makefile b/tools/testing/selftests/exec/Makefile
-index 33339e31e365..a62b9ca306e7 100644
---- a/tools/testing/selftests/exec/Makefile
-+++ b/tools/testing/selftests/exec/Makefile
-@@ -3,7 +3,7 @@ CFLAGS = -Wall
- CFLAGS += -Wno-nonnull
- CFLAGS += -D_GNU_SOURCE
-
--TEST_GEN_PROGS := execveat
-+TEST_GEN_PROGS := execveat omayexec
- TEST_GEN_FILES := execveat.symlink execveat.denatured script subdir
- # Makefile is a run-time dependency, since it's accessed by the execveat test
- TEST_FILES := Makefile
-@@ -26,3 +26,5 @@ $(OUTPUT)/execveat.denatured: $(OUTPUT)/execveat
- cp $< $@
- chmod -x $@
-
-+$(OUTPUT)/omayexec: omayexec.c ../kselftest_harness.h
-+ $(CC) $(CFLAGS) -Wl,-no-as-needed $(LDFLAGS) -lcap $< -o $@
-diff --git a/tools/testing/selftests/exec/omayexec.c b/tools/testing/selftests/exec/omayexec.c
-new file mode 100644
-index 000000000000..e4307b5a5417
---- /dev/null
-+++ b/tools/testing/selftests/exec/omayexec.c
-@@ -0,0 +1,317 @@
-+// SPDX-License-Identifier: GPL-2.0
-+/*
-+ * O_MAYEXEC tests
-+ *
-+ * Copyright © 2018-2019 ANSSI
-+ *
-+ * Author: Mickaël Salaün <mic@digikod.net>
-+ */
-+
-+#include <errno.h>
-+#include <fcntl.h> /* O_CLOEXEC */
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h> /* strlen */
-+#include <sys/capability.h>
-+#include <sys/mount.h>
-+#include <sys/stat.h> /* mkdir */
-+#include <unistd.h> /* unlink, rmdir */
-+
-+#include "../kselftest_harness.h"
-+
-+#ifndef O_MAYEXEC
-+#define O_MAYEXEC 040000000
-+#endif
-+
-+#define SYSCTL_MAYEXEC "/proc/sys/fs/open_mayexec_enforce"
-+
-+#define BIN_DIR "./test-mount"
-+#define BIN_PATH BIN_DIR "/file"
-+#define DIR_PATH BIN_DIR "/directory"
-+
-+#define ALLOWED 1
-+#define DENIED 0
-+
-+static void ignore_dac(struct __test_metadata *_metadata, int override)
-+{
-+ cap_t caps;
-+ const cap_value_t cap_val[2] = {
-+ CAP_DAC_OVERRIDE,
-+ CAP_DAC_READ_SEARCH,
-+ };
-+
-+ caps = cap_get_proc();
-+ ASSERT_TRUE(!!caps);
-+ ASSERT_FALSE(cap_set_flag(caps, CAP_EFFECTIVE, 2, cap_val,
-+ override ? CAP_SET : CAP_CLEAR));
-+ ASSERT_FALSE(cap_set_proc(caps));
-+ EXPECT_FALSE(cap_free(caps));
-+}
-+
-+static void ignore_mac(struct __test_metadata *_metadata, int override)
-+{
-+ cap_t caps;
-+ const cap_value_t cap_val[1] = {
-+ CAP_MAC_ADMIN,
-+ };
-+
-+ caps = cap_get_proc();
-+ ASSERT_TRUE(!!caps);
-+ ASSERT_FALSE(cap_set_flag(caps, CAP_EFFECTIVE, 1, cap_val,
-+ override ? CAP_SET : CAP_CLEAR));
-+ ASSERT_FALSE(cap_set_proc(caps));
-+ EXPECT_FALSE(cap_free(caps));
-+}
-+
-+static void test_omx(struct __test_metadata *_metadata,
-+ const char *const path, const int exec_allowed)
-+{
-+ int fd;
-+
-+ /* without O_MAYEXEC */
-+ fd = open(path, O_RDONLY | O_CLOEXEC);
-+ ASSERT_NE(-1, fd);
-+ EXPECT_FALSE(close(fd));
-+
-+ /* with O_MAYEXEC */
-+ fd = open(path, O_RDONLY | O_CLOEXEC | O_MAYEXEC);
-+ if (exec_allowed) {
-+ /* open should succeed */
-+ ASSERT_NE(-1, fd);
-+ EXPECT_FALSE(close(fd));
-+ } else {
-+ /* open should return EACCES */
-+ ASSERT_EQ(-1, fd);
-+ ASSERT_EQ(EACCES, errno);
-+ }
-+}
-+
-+static void test_omx_dir_file(struct __test_metadata *_metadata,
-+ const char *const dir_path, const char *const file_path,
-+ const int exec_allowed)
-+{
-+ /*
-+ * directory execution is always denied since commit 73601ea5b7b1
-+ * ("fs/open.c: allow opening only regular files during execve()")
-+ */
-+ test_omx(_metadata, dir_path, DENIED);
-+ test_omx(_metadata, file_path, exec_allowed);
-+}
-+
-+static void test_dir_file(struct __test_metadata *_metadata,
-+ const char *const dir_path, const char *const file_path,
-+ const int exec_allowed)
-+{
-+ /* test as root */
-+ ignore_dac(_metadata, 1);
-+ test_omx_dir_file(_metadata, dir_path, file_path, exec_allowed);
-+
-+ /* test without bypass */
-+ ignore_dac(_metadata, 0);
-+ test_omx_dir_file(_metadata, dir_path, file_path, exec_allowed);
-+}
-+
-+static void sysctl_write(struct __test_metadata *_metadata,
-+ const char *path, const char *value)
-+{
-+ int fd;
-+ size_t len_value;
-+ ssize_t len_wrote;
-+
-+ fd = open(path, O_WRONLY | O_CLOEXEC);
-+ ASSERT_NE(-1, fd);
-+ len_value = strlen(value);
-+ len_wrote = write(fd, value, len_value);
-+ ASSERT_EQ(len_wrote, len_value);
-+ EXPECT_FALSE(close(fd));
-+}
-+
-+static void create_workspace(struct __test_metadata *_metadata,
-+ int mount_exec, int file_exec)
-+{
-+ int fd;
-+
-+ /*
-+ * Cleanup previous workspace if any error previously happened (don't
-+ * check errors).
-+ */
-+ umount(BIN_DIR);
-+ rmdir(BIN_DIR);
-+
-+ /* create a clean mount point */
-+ ASSERT_FALSE(mkdir(BIN_DIR, 00700));
-+ ASSERT_FALSE(mount("test", BIN_DIR, "tmpfs",
-+ MS_MGC_VAL | (mount_exec ? 0 : MS_NOEXEC),
-+ "mode=0700,size=4k"));
-+
-+ /* create a test file */
-+ fd = open(BIN_PATH, O_CREAT | O_RDONLY | O_CLOEXEC,
-+ file_exec ? 00500 : 00400);
-+ ASSERT_NE(-1, fd);
-+ EXPECT_NE(-1, close(fd));
-+
-+ /* create a test directory */
-+ ASSERT_FALSE(mkdir(DIR_PATH, file_exec ? 00500 : 00400));
-+}
-+
-+static void delete_workspace(struct __test_metadata *_metadata)
-+{
-+ ignore_mac(_metadata, 1);
-+ sysctl_write(_metadata, SYSCTL_MAYEXEC, "0");
-+
-+ /* no need to unlink BIN_PATH nor DIR_PATH */
-+ ASSERT_FALSE(umount(BIN_DIR));
-+ ASSERT_FALSE(rmdir(BIN_DIR));
-+}
-+
-+FIXTURE_DATA(mount_exec_file_exec) { };
-+
-+FIXTURE_SETUP(mount_exec_file_exec)
-+{
-+ create_workspace(_metadata, 1, 1);
-+}
-+
-+FIXTURE_TEARDOWN(mount_exec_file_exec)
-+{
-+ delete_workspace(_metadata);
-+}
-+
-+TEST_F(mount_exec_file_exec, mount)
-+{
-+ /* enforce mount exec check */
-+ sysctl_write(_metadata, SYSCTL_MAYEXEC, "1");
-+ test_dir_file(_metadata, DIR_PATH, BIN_PATH, ALLOWED);
-+}
-+
-+TEST_F(mount_exec_file_exec, file)
-+{
-+ /* enforce file exec check */
-+ sysctl_write(_metadata, SYSCTL_MAYEXEC, "2");
-+ test_dir_file(_metadata, DIR_PATH, BIN_PATH, ALLOWED);
-+}
-+
-+TEST_F(mount_exec_file_exec, mount_file)
-+{
-+ /* enforce mount and file exec check */
-+ sysctl_write(_metadata, SYSCTL_MAYEXEC, "3");
-+ test_dir_file(_metadata, DIR_PATH, BIN_PATH, ALLOWED);
-+}
-+
-+FIXTURE_DATA(mount_exec_file_noexec) { };
-+
-+FIXTURE_SETUP(mount_exec_file_noexec)
-+{
-+ create_workspace(_metadata, 1, 0);
-+}
-+
-+FIXTURE_TEARDOWN(mount_exec_file_noexec)
-+{
-+ delete_workspace(_metadata);
-+}
-+
-+TEST_F(mount_exec_file_noexec, mount)
-+{
-+ /* enforce mount exec check */
-+ sysctl_write(_metadata, SYSCTL_MAYEXEC, "1");
-+ test_dir_file(_metadata, DIR_PATH, BIN_PATH, ALLOWED);
-+}
-+
-+TEST_F(mount_exec_file_noexec, file)
-+{
-+ /* enforce file exec check */
-+ sysctl_write(_metadata, SYSCTL_MAYEXEC, "2");
-+ test_dir_file(_metadata, DIR_PATH, BIN_PATH, DENIED);
-+}
-+
-+TEST_F(mount_exec_file_noexec, mount_file)
-+{
-+ /* enforce mount and file exec check */
-+ sysctl_write(_metadata, SYSCTL_MAYEXEC, "3");
-+ test_dir_file(_metadata, DIR_PATH, BIN_PATH, DENIED);
-+}
-+
-+FIXTURE_DATA(mount_noexec_file_exec) { };
-+
-+FIXTURE_SETUP(mount_noexec_file_exec)
-+{
-+ create_workspace(_metadata, 0, 1);
-+}
-+
-+FIXTURE_TEARDOWN(mount_noexec_file_exec)
-+{
-+ delete_workspace(_metadata);
-+}
-+
-+TEST_F(mount_noexec_file_exec, mount)
-+{
-+ /* enforce mount exec check */
-+ sysctl_write(_metadata, SYSCTL_MAYEXEC, "1");
-+ test_dir_file(_metadata, DIR_PATH, BIN_PATH, DENIED);
-+}
-+
-+TEST_F(mount_noexec_file_exec, file)
-+{
-+ /* enforce file exec check */
-+ sysctl_write(_metadata, SYSCTL_MAYEXEC, "2");
-+ test_dir_file(_metadata, DIR_PATH, BIN_PATH, ALLOWED);
-+}
-+
-+TEST_F(mount_noexec_file_exec, mount_file)
-+{
-+ /* enforce mount and file exec check */
-+ sysctl_write(_metadata, SYSCTL_MAYEXEC, "3");
-+ test_dir_file(_metadata, DIR_PATH, BIN_PATH, DENIED);
-+}
-+
-+FIXTURE_DATA(mount_noexec_file_noexec) { };
-+
-+FIXTURE_SETUP(mount_noexec_file_noexec)
-+{
-+ create_workspace(_metadata, 0, 0);
-+}
-+
-+FIXTURE_TEARDOWN(mount_noexec_file_noexec)
-+{
-+ delete_workspace(_metadata);
-+}
-+
-+TEST_F(mount_noexec_file_noexec, mount)
-+{
-+ /* enforce mount exec check */
-+ sysctl_write(_metadata, SYSCTL_MAYEXEC, "1");
-+ test_dir_file(_metadata, DIR_PATH, BIN_PATH, DENIED);
-+}
-+
-+TEST_F(mount_noexec_file_noexec, file)
-+{
-+ /* enforce file exec check */
-+ sysctl_write(_metadata, SYSCTL_MAYEXEC, "2");
-+ test_dir_file(_metadata, DIR_PATH, BIN_PATH, DENIED);
-+}
-+
-+TEST_F(mount_noexec_file_noexec, mount_file)
-+{
-+ /* enforce mount and file exec check */
-+ sysctl_write(_metadata, SYSCTL_MAYEXEC, "3");
-+ test_dir_file(_metadata, DIR_PATH, BIN_PATH, DENIED);
-+}
-+
-+TEST(sysctl_access_write)
-+{
-+ int fd;
-+ ssize_t len_wrote;
-+
-+ ignore_mac(_metadata, 1);
-+ sysctl_write(_metadata, SYSCTL_MAYEXEC, "0");
-+
-+ ignore_mac(_metadata, 0);
-+ fd = open(SYSCTL_MAYEXEC, O_WRONLY | O_CLOEXEC);
-+ ASSERT_NE(-1, fd);
-+ len_wrote = write(fd, "0", 1);
-+ ASSERT_EQ(len_wrote, -1);
-+ EXPECT_FALSE(close(fd));
-+
-+ ignore_mac(_metadata, 1);
-+}
-+
-+TEST_HARNESS_MAIN
-diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h
-index 5336b26506ab..6ae816fa2f62 100644
---- a/tools/testing/selftests/kselftest_harness.h
-+++ b/tools/testing/selftests/kselftest_harness.h
-@@ -50,7 +50,10 @@
- #ifndef __KSELFTEST_HARNESS_H
- #define __KSELFTEST_HARNESS_H
-
-+#ifndef _GNU_SOURCE
- #define _GNU_SOURCE
-+#endif
-+
- #include <asm/types.h>
- #include <errno.h>
- #include <stdbool.h>
---
-2.23.0
-