# ============================================================================ # AUDIT.TXT: AM·OS binary hardening exceptions and decision records # # Copyright 2026 ANNE Media - https://anne.media # All rights reserved. # # This file is a record of the audit findings and exception decisions # made by ANNE Media for a specific software tree. Each entry is dated # and scoped: it states the package version, the kernel version where # applicable, and the evidence behind the decision. The findings apply # to that tree and to no other. # # Verbatim redistribution is permitted. You may copy this file in whole, # quote it, cite it, and link to it without modification. The copyright # notice must remain intact. # # Modification is permitted under the following conditions. If the # file you distribute is not a verbatim copy of this one, you must: # # (a) remove the ANNE Media copyright notice and every ANNE Media # attribution from the modified file; # (b) not present the modified version, or any product derived from # it, as reviewed, endorsed, or approved by ANNE Media. # # Verbatim redistribution with the copyright notice intact is the only # form in which this file may carry the ANNE Media name. Anything else # is not ANNE Media's work and must not be presented as such. # # The findings in this file are provided "as is", without warranty of # any kind. They describe decisions made about one tree at one point in # time. They are not a certification, they are not transferable to # other trees, and they do not substitute for an independent audit of # any system. ANNE Media accepts no liability for the use of these # findings on any system other than the one for which they were made. # ============================================================================ # AM·OS Binary Hardening Audit: exception tables # # Read by audit-hardening.sh. Four entry forms are recognized, one per line: # # package_glob|binary_glob|reason # FORTIFY exception. Marks F as N/A for a specific (package, binary) # pair. Use only when the binary was genuinely compiled with -fhardened # (or -D_FORTIFY_SOURCE) and the compiler correctly declined to emit a # __*_chk wrapper. Do NOT use this to hide a package built without # FORTIFY. That is the failure this audit exists to surface. # # KO_CET: package_glob|module_glob|reason # CET accepted gap for a kernel module. Real gap: the module lacks the # IBT property. Mitigated by blacklisting at install. # # CET_GAP: package_glob|binary_glob|reason # CET accepted gap for a userspace binary. Real gap, same semantics as # KO_CET, different mitigation. # # CANARY_GAP: package_glob|binary_glob|reason # Canary exception. Marks C as N/A. For binaries whose canary is # intentionally absent. Sanitizer runtimes built with # -fno-stack-protector to avoid a libc dependency are the canonical # case. # # `#` starts a comment; blank lines are ignored. Globs are bash-style # (matched with [[ == ]]). Multi-line comments above an entry are # preserved in the file but ignored by the parser. Each entry MUST carry a # verifiable reason. Section order does not affect parsing. # # ============================================================================ # TABLE OF CONTENTS # ============================================================================ # Section 1 FORTIFY exceptions (F = N/A) # Section 2 KO_CET exceptions (kernel modules, T = accepted gap) # Section 3 CET_GAP exceptions (userspace binaries, T = accepted gap) # Section 4 CANARY_GAP exceptions (C = N/A) # ============================================================================ # ============================================================================ # Section 1: FORTIFY exceptions # ============================================================================ # Format: package_glob|binary_glob|reason # # Each entry marks a specific (package, binary) pair as F=N/A. Only the # FORTIFY check is affected: PIE, RELRO, canary, NX, and CET still apply # in full to the binaries listed here. # # Use this only when the binary was genuinely compiled with -fhardened # (or -D_FORTIFY_SOURCE) and the compiler correctly declined to emit a # __*_chk wrapper. Do NOT use it to hide a package that was built # without FORTIFY. That is exactly the failure this audit exists to # surface. Each entry MUST carry a verifiable reason. # ============================================================================ # attr: every fortify-list call site in libattr.c has a destination # that is a function parameter: api_convert/api_unconvert's `name`, # the file-list functions' `buffer`, unquote's `aentp->a_name`. The # compiler cannot see the caller's buffer size in this translation # unit, so FORTIFY correctly declines to emit __strcpy_chk / # __memset_chk / __strncpy_chk. The check, where possible, belongs # in the caller's object code, and libattr is a shared library so it # cannot carry it. -fhardened was on the compile line. No source # change would produce a _chk symbol here without changing the API. attr-2.6.0-x86_64-2.txz|libattr.so.*|destination is a function parameter; size not visible in this translation unit; -fhardened on compile line # bash/tee: the only in-list fortify reference is read(). tee does # buf = xmalloc(TEE_BUFSIZE); read(0, buf, TEE_BUFSIZE). After the # alloc_size(1) attribute was added to sh_xmalloc, GCC knows the # destination is exactly TEE_BUFSIZE bytes and the read count is # the same constant, so the check inside __read_chk would always # pass. FORTIFY folds provably-safe calls to the unfortified alias; # the absence of __read_chk is an optimization, not a gap. bash-5.3.020-x86_64-1.txz|tee|read count == destination size (both TEE_BUFSIZE); compiler proved check would always pass; -fhardened on compile line # io-gif.c: char version[4]; strncpy(version, buf+3, 3). Count is a # constant that provably fits in the buffer. Replica produced plain # strncpy, no __strncpy_chk. gdk-pixbuf2-2.44.8-x86_64-2.txz|libpixbufloader-gif.so|strncpy count constant and fits buffer; folded; -fhardened on compile line # io-xbm.c: char line[MAX_SIZE]; fgets(line, MAX_SIZE, fstream). # Count equals buffer size, check provably passes. Replica produced # plain fgets, no __fgets_chk. gdk-pixbuf2-2.44.8-x86_64-2.txz|libpixbufloader-xbm.so|fgets count equals buffer size; folded; -fhardened on compile line # glib2/gio: the gio tool references fgets and read alongside the # memcpy/memmove that come from inlined glib helpers. The three # fgets calls use sizeof(dest) on a local array; the read call # reads into a g_malloc(STREAM_BUFFER_SIZE) result. g_malloc is # declared with G_GNUC_ALLOC_SIZE(1) in glib/gmem.h, so GCC knows # the destination size at the call site. In every case the count # equals the destination size, the fortify check is provably # false, and GCC folds to the plain call. # # Verified by replica. Same pattern with count == size produces # plain read, no __read_chk. Same pattern with count > size (16-byte # allocation, STREAM_BUFFER_SIZE read) produces __read_chk AND a # compile-time warning: "read called with bigger length than size # of the destination buffer". So the compiler is not skipping the # check. It is proving the check cannot fire and removing it. glib2-2.90.1-x86_64-1.txz|gio|fgets/read count == destination size; alloc_size lets compiler prove check cannot fire; folded; -fhardened on compile line # imagemagick/video.so: read(source_file, buffer, quantum) where # buffer was allocated by MagickCore_AcquireQuantumMemory(quantum, # sizeof(*buffer)). The allocator is declared with # magick_alloc_sizes(1,2) which expands to # __attribute__((alloc_size(1,2))) in MagickCore/method-attribute.h. # GCC's __builtin_dynamic_object_size uses that attribute to track # the allocation size symbolically through the translation unit # boundary. Since the read count and the allocation size are the # same expression, the check is provably false and FORTIFY folds # to the plain call. # # Verified by two replicas of the exact pattern with the exact # flags. Overflow version (count = 2 * quantum) produces # __read_chk and a compile-time warning. Runtime version # (quantum from an opaque function, count == allocation) produces # plain read, no wrapper. Matching video.so exactly. imagemagick-7.1.2_32-x86_64-*.txz|video.so|read count == alloc_size-tracked destination size; check folded; -fhardened on compile line # judy: libJudy.so references strcpy from JudySL.c's shortcut-leaf # code. scl_Index is declared uint8_t scl_Index[8] (WORDSIZE) but # is used as a placeholder for variable-length strings: the # shortcut leaf is over-allocated via JudyMalloc(SCLSIZE(LEN)) # and strcpy writes past the declared field size into the words # that follow the struct. # # Under _FORTIFY_SOURCE=3 (verified in preprocessor output), # strcpy is rewritten by the glibc fortify header to # __builtin___strcpy_chk with a size argument from # __builtin_dynamic_object_size. That builtin tries to compute the # remaining bytes in the actual runtime allocation. The pointer # comes from JudyMalloc(SCLSIZE(LEN)) with runtime LEN, reached # through a Word_t-to-pointer cast, so the size cannot be reduced # to a value. The builtin returns the unknown sentinel, and GCC # folds __builtin___strcpy_chk with an unknown size to plain # __builtin_strcpy. # # Confirmed by -fdump-tree-optimized of the real source with the # real flags: the call site shows __builtin_strcpy (_8, pos_63), # not __builtin___strcpy_chk. The object file has a plain strcpy # relocation and no __strcpy_chk. judy-1.0.5-x86_64-5.txz|libJudy.so.1.0.3|strcpy to over-allocated field; dynamic object size unknown at call site; fortified builtin folds; -fhardened on compile line # lvm2/libdevmapper-event-lvm2snapshot.so: the snapshot dmeventd # plugin calls fgets(buffer, sizeof(buffer), mounts) in _umount() # at dmeventd_snapshot.c:140, where buffer is char buffer[4096]. # The count is sizeof(buffer). The same value the compiler uses # as the object size, so the check in __fgets_chk is provably # false and GCC folds it to plain fgets. # # Verified by disassembly of the shipped binary: the call site is # mov $0x1000,%esi ; count = 4096, constant # lea 0xc0(%rsp),%rdi ; destination = local stack slot # call fgets@plt ; plain call, no __fgets_chk # No __fgets_chk symbol appears anywhere in the library. lvm2-2.03.43-x86_64-*.txz|libdevmapper-event-lvm2snapshot.so|fgets count equals buffer size; disassembly confirms check folded; -fhardened on compile line # npth/libnpth.so.0.3.0: the only in-list fortify reference is # read() inside npth_read() at src/npth.c:803. npth_read is a # direct wrapper around the syscall with the POSIX signature # ssize_t npth_read(int fd, void *buf, size_t nbytes) # so both the destination pointer and the count are function # parameters. The compiler cannot determine the destination size # in this translation unit, so it correctly declines to emit # __read_chk. Verified by reading the source. The same shape # applies to npth_write, npth_recvmsg, npth_sendmsg, npth_accept, # and the other pass-through wrappers. None of them can carry a # fortify wrapper because there is nothing to check against. npth-1.8-x86_64-2.txz|libnpth.so.0.3.0|read into function-parameter buffer; destination size not visible in this TU; -fhardened on compile line # php/gettext.so: the only in-list fortify reference is getcwd() # via the VCWD_GETCWD macro at ext/gettext/gettext.c:210. # On Linux VCWD_GETCWD(buff,size) expands to plain getcwd (see # Zend/zend_virtual_cwd.h:330). The call is # char dir_name[MAXPATHLEN]; # getcwd(dir_name, MAXPATHLEN); # with MAXPATHLEN = 4096. Count equals destination size, so the # check in __getcwd_chk is provably false and GCC folds to plain # getcwd. # # Verified by disassembly of the shipped module: the call site is # mov $0x1000,%esi ; size = 4096, constant # lea 0x10(%rsp),%rdi ; destination = local stack slot # call getcwd@plt ; plain call, no __getcwd_chk # No __getcwd_chk symbol appears anywhere in the module. php-8.5.11-x86_64-1.txz|gettext.so|getcwd count equals buffer size; disassembly confirms check folded; -fhardened on compile line # ghostscript/gsc and ghostscript/gsx: the two names are the same # binary (identical MD5, cmp -s reports identical). Built from # psi/dxmainc.c. The only fortifiable libc call in that source # file is at dxmainc.c:56, inside the stdin callback: # # static int # gsdll_stdin(void *instance, char *buf, int len) # { # return read(fileno(stdin), buf, len); # } # # Both the destination (buf) and the count (len) are function # parameters, so no compile-time object size exists in the # translation unit. glibc's fortify header reduces # to __glibc_fortify(read, nbytes, sizeof(char), # __builtin_dynamic_object_size(buf, 0), __read_alias); with an # unknown object size the macro calls plain read. # # Evidence on this system: # # 1. Source. Exhaustive grep of dxmainc.c for every call on the # audit's fortify list returns exactly one hit: the read() above. # No other call in the file has a __*_chk counterpart in glibc's # fortify headers. # # 2. Shipped binaries. readelf -sW --dyn-syms on gsc and gsx shows # no _chk symbol other than __stack_chk_fail. The sole # fortifiable call site is at 0x17a9 in both: # mov %rsi,0x8(%rsp) ; spill buf (2nd arg) # call fileno@plt # mov 0x8(%rsp),%rsi ; buf -> rsi # movslq %ebx,%rdx ; len (3rd arg) -> rdx # call read@plt ; plain read # # 3. FORTIFY is active on this toolchain. A control compiled with # the same flags, reading 128 bytes into a char[64], produces # U __read_chk plus the compile-time warning "read called with # bigger length than size of the destination buffer". A control # reading exactly sizeof(dest) folds to plain read. So absence # of the wrapper in gsc/gsx is declining, not missing. # # 4. Signature replica. A noinline replica of the callback with # the exact signature, compiled with # -O2 -march=x86-64 -mtune=generic -fPIC -fhardened, # emits R_X86_64_PLT32 read and no __read_chk. The same # emission pattern as the shipped binaries. # # 5. -fhardened reached dxmainc.o. configure.ac:30 preserves the # incoming CFLAGS ("${CFLAGS:=}") and only appends to it; the # AC_PROG_CC -g -O2 default is undone at configure.ac:90-95. # ghostscript.SlackBuild passes # SLKCFLAGS="-O2 -march=x86-64 -mtune=generic -fPIC -fhardened" # into CFLAGS before configure. The shipped binaries carry # .note.gnu.property with IBT+SHSTK and reference # __stack_chk_fail; no other flag in the SlackBuild enables # either. ghostscript-10.08.0-x86_64-2.txz|gsc|read into function-parameter buffer; dxmainc.c:56; destination size not visible in this TU; -fhardened confirmed via CFLAGS propagation and IBT+SHSTK/__stack_chk_fail markers ghostscript-10.08.0-x86_64-2.txz|gsx|read into function-parameter buffer; dxmainc.c:56; destination size not visible in this TU; -fhardened confirmed via CFLAGS propagation and IBT+SHSTK/__stack_chk_fail markers # mariadb/auth_pam.so: three read() calls, all folding. # Source: # plugin/auth_pam/auth_pam.c:131 # read(c_to_p[0], &field, 1) -- count == sizeof(field) # plugin/auth_pam/auth_pam_tool.h:33 # read(file, hdr, 2) -- count == sizeof(hdr) where # hdr is unsigned char hdr[2] # plugin/auth_pam/auth_pam_tool.h:59 # read(file, s, len) -- s is char* parameter, len # is runtime; no compile-time # object size # All three fold under glibc's fortify macro. Verified by replica # under the exact mariadb flags (-fhardened -D_FORTIFY_SOURCE=3): # no __read_chk emitted for either the constant-size or the # parameter-shape case. mariadb-12.3.3-x86_64-1.txz|auth_pam.so|three read() calls; two count==sizeof(dest), one function-parameter dest; all fold; -fhardened -D_FORTIFY_SOURCE=3 on compile line # mariadb/auth_pam_v1.so: strncpy with count == sizeof(dest). # Source: plugin/auth_pam/auth_pam_base.c:169 # strncpy(info->authenticated_as, new_username, # sizeof(info->authenticated_as)); # Count equals sizeof(dest); fortify check provably false; folds. # Verified by replica under the exact mariadb flags. mariadb-12.3.3-x86_64-1.txz|auth_pam_v1.so|strncpy count == sizeof(dest); fortify check provably false; -fhardened -D_FORTIFY_SOURCE=3 on compile line # mariadb/dialog.so: fgets with runtime buf_len. Source: # plugin/auth_dialog/dialog.c:67 # if (!fgets(buf, buf_len-1, stdin)) # buf and buf_len are function parameters; no compile-time object # size exists in this TU; __builtin_dynamic_object_size returns the # unknown sentinel and glibc's fortify macro folds to plain fgets. # Verified by replica under the exact mariadb flags. mariadb-12.3.3-x86_64-1.txz|dialog.so|fgets into function-parameter buffer; destination size not visible in this TU; -fhardened -D_FORTIFY_SOURCE=3 on compile line # mariadb/pam_user_map.so (installed to lib64/security/, not the # mysql plugin dir): fgets with count == sizeof(dest). Source: # plugin/auth_pam/mapper/pam_user_map.c:197 # while (fgets(buf, sizeof(buf), f) != NULL) # where buf is a local char array. Count equals sizeof(dest); # fortify check provably false; folds. # Verified by replica under the exact mariadb flags. mariadb-12.3.3-x86_64-1.txz|pam_user_map.so|fgets count == sizeof(dest); fortify check provably false; -fhardened -D_FORTIFY_SOURCE=3 on compile line # mariadb/ha_archive.so: the sole UND strcpy comes from the # strmov() call in storage/archive/ha_archive.cc # strmov(tmp_share->table_name, table_name); # strmov is defined at include/m_string.h:69 as # #define strmov(A,B) __builtin_stpcpy((A),(B)) # GCC's tree optimizer lowers __builtin_stpcpy to a raw strcpy in # a pass that runs after glibc's fortify header, so the fortify # macro never sees the call and cannot rewrite it. There is no # source change that would produce a _chk symbol here without # changing the macro. # # Verified by: # - Replica of the exact call shape (__builtin_stpcpy to a # fixed-size member of a heap-allocated struct) under the # exact mariadb flags emits U strcpy and no __strcpy_chk. # - Disassembly of the shipped plugin and of a freshly-built # ha_archive.cc.o both show the plain strcpy at the same # offset inside ha_archive::get_share. # - flags.make for the archive target contains # -fhardened -D_FORTIFY_SOURCE=3. mariadb-12.3.3-x86_64-1.txz|ha_archive.so|strmov (__builtin_stpcpy) lowered to plain strcpy after fortify header; no _chk possible; -fhardened -D_FORTIFY_SOURCE=3 on compile line # mariadb/ha_blackhole.so: same mechanism as ha_archive.so. The # plain strcpy comes from storage/blackhole/ha_blackhole.cc's # get_share path, which open() inlines. Source: # strmov(share->table_name, name); (via get_share) # with strmov = __builtin_stpcpy at include/m_string.h:69. # Verified by: # - Same replica as ha_archive.so. # - Disassembly of a freshly-built ha_blackhole.cc.o shows the # plain strcpy inside ha_blackhole::open (inlined get_share). # - flags.make for the blackhole target contains # -fhardened -D_FORTIFY_SOURCE=3. mariadb-12.3.3-x86_64-1.txz|ha_blackhole.so|strmov (__builtin_stpcpy) lowered to plain strcpy after fortify header; no _chk possible; -fhardened -D_FORTIFY_SOURCE=3 on compile line # inih/libinih.so.0: the only fortify-list symbol is fgets, which # the library never calls. ini.c:268 reads: # # return ini_parse_stream((ini_reader)fgets, file, handler, user); # # The call happens later, at runtime, through the callback pointer # handed to ini_parse_stream. glibc's fortify header rewrites call # sites, not symbol references; since there is no call to fgets in # this object, no __fgets_chk can be emitted. # # Verified by: # - meson.build:77 builds libinih from a single source, # src_inih = files('ini.c'). # - Exhaustive grep of ini.c for `fgets(` returns only the # address-of cast at line 268 and a comment at line 286. # - readelf -rW on the shipped .so shows only # R_X86_64_GLOB_DAT fgets@GLIBC_2.2.5. The GOT-entry # relocation for an address-of use. There is no # R_X86_64_JUMP_SLOT for fgets and no fgets@plt stub in the # binary, confirming the call never happens in this object. # - meson propagates the exported CFLAGS: a marker test on this # system confirmed -DMARKER_ABC123 appears in the compile # lines, so -fhardened reached the compiler. inih-62-x86_64-2.txz|libinih.so.0|fgets used only as address-of callback, never called in this object; no call site for fortify to rewrite; -fhardened on compile line # perl/POSIX.so: two fortify-list symbols, both pointer-shaped # destinations whose size is not visible to the compiler. # # 1. read: XS binding for POSIX::read at ext/POSIX/POSIX.xs:3130. # The XSUB declares: # char *buffer = sv_grow(sv_buffer, nbytes+1); # so both the destination pointer and the count are runtime # values. glibc's fortify macro computes an unknown # __builtin_dynamic_object_size and folds to plain read. # # 2. ttyname_r: reached through the ttyname() macro at # reentr.h:1676-1682, which expands to # ttyname_r(fd, PL_reentrant_buffer->_ttyname_buffer, # PL_reentrant_buffer->_ttyname_size) # Disassembly of the shipped .so at the call site shows: # mov 0x950(%rbx),%rax ; rax = PL_reentrant_buffer # mov 0x280(%rax),%rdx ; rdx = *_ttyname_size # mov 0x278(%rax),%rsi ; rsi = *_ttyname_buffer (pointer) # call ttyname_r@plt # _ttyname_buffer is a char* field loaded from memory, not an # inline array, so the compiler has no object size for the # destination and folds to plain ttyname_r. # # Verified by replica under the exact perl build flags # (-O2 -march=x86-64 -mtune=generic -fPIC -fhardened # -D_FORTIFY_SOURCE=3): # - The read-shaped replica (pointer parameter, size parameter) # emits R_X86_64_PLT32 read with no _chk counterpart. # - The ttyname_r-shaped replica with a char* struct field # (matching the disassembled layout) emits plain ttyname_r # with no __ttyname_r_chk. # - Control: the same replica with an inline char[256] field # does emit __ttyname_r_chk, confirming FORTIFY is active on # this toolchain and that the fold in the pointer-shaped case # is a real compiler decision, not a missing flag. perl-5.44.0-x86_64-2.txz|POSIX.so|read and ttyname_r into pointer destinations loaded at runtime; destination size not visible in this TU; -fhardened on compile line # ruby/console.so: the only fortify-list symbol is ttyname_r, with # two call sites in ext/io/console/console.c, both provably safe: # # console.c:1899 (first attempt, fixed-size local): # char termname[1024], *tn = termname; # size_t size = sizeof(termname); # if (ttyname_r(fd, tn, size) == 0) # Count equals sizeof(dest) at compile time; the check in # __ttyname_r_chk is provably false; glibc's fortify macro # folds to plain ttyname_r. # # console.c:1906 (retry, heap string via Ruby): # tn = RSTRING_PTR(s); # size = rb_str_capacity(s); # if (ttyname_r(fd, tn, size) == 0) # Destination is a pointer into a Ruby string's buffer; count # is its runtime capacity. No compile-time object size exists # in the TU, so the macro folds to plain ttyname_r. # # Verified by replica under the exact ruby build flags # (-O2 -march=x86-64 -mtune=generic -fPIC -fhardened # -D_FORTIFY_SOURCE=3): # - The fixed-array shape with count = sizeof(array) emits plain # ttyname_r; no __ttyname_r_chk. # - The runtime-pointer/runtime-size shape emits plain # ttyname_r; no __ttyname_r_chk. # - Control: the same fixed-array shape with a count loaded from # a struct field does emit __ttyname_r_chk, confirming FORTIFY # is active on this toolchain and that the folds above are # real compiler decisions rather than a missing flag. ruby-4.0.7-x86_64-1.txz|console.so|two ttyname_r call sites: count == sizeof(local array) and runtime pointer with runtime capacity; both fold; -fhardened on compile line # python3/_multiprocessing...so: the only fortify-list symbol is # strcpy, from two identical call sites in # Modules/_multiprocessing/semaphore.c (lines 502 and 554): # # name_copy = PyMem_Malloc(strlen(name) + 1); # ... # strcpy(name_copy, name); # # The destination is a heap pointer returned by PyMem_Malloc, with # a size determined at runtime by strlen(name) + 1. No compile-time # object size exists at the call site, so glibc's fortify macro # computes an unknown __builtin_object_size and folds to plain # strcpy. # # Verified by disassembly of the shipped .so: both call sites load # the destination from %rax (PyMem_Malloc's return value) and emit # plain `call strcpy@plt`. readelf -rW shows only # R_X86_64_JUMP_SLOT strcpy: no __strcpy_chk relocation. Every # other python3 module with a fortify-list call shows F=1, so # -fhardened reached the build and FORTIFY was active for this TU; # the fold is a compiler decision about object size, not a missing # flag. python3-3.12.14-x86_64-2.txz|_multiprocessing.cpython-312-x86_64-linux-gnu.so|strcpy to PyMem_Malloc heap pointer with runtime size; no compile-time object size; fortified builtin folds; -fhardened on compile line # rdfind/rdfind: the only fortify-list symbol is getcwd. The sole # call site is Fileinfo.cc:221, inside makeAbsolute(): # # const size_t buflength = 256; # char buf[buflength]; # if (buf != getcwd(buf, buflength)) { # # The count and the destination size are the same compile-time # constant, so the check inside __getcwd_chk is provably false. # The compiler folds to plain getcwd. # # Verified by: # - Generated Makefile contains CXXFLAGS = ... -fhardened, so the # compile had FORTIFY active. # - Disassembly of the shipped binary at 0x409421: # lea 0x110(%rsp),%r13 ; stack buffer # mov $0x100,%esi ; count = 256, compile-time constant # mov %r13,%rdi # call getcwd@plt ; plain call # - readelf -rW shows only R_X86_64_JUMP_SLOT getcwd. No # __getcwd_chk relocation. rdfind-1.8.0-x86_64-2.txz|rdfind|getcwd count == sizeof(const-size local array); check provably false; -fhardened on compile line # boost/iostreams: no _chk symbols emitted. The memcpy calls in # file_descriptor::open are compiler-generated from std::string copy # construction inside detail::path. Source: # boost/iostreams/detail/path.hpp:49 # path(const std::string& p) : narrow_(p), wide_(), is_wide_(false) { } # narrow_ is a std::string member; the copy of p into it is what GCC # lowers to memcpy. The constructor is inline, so the call appears # inside file_descriptor::open in the shipped object. (The class at # path.hpp:172 is the BOOST_IOSTREAMS_NO_WIDE_STREAMS fallback and is # not compiled on this target.) # # The disassembly's read site loads its destination from a stack slot # holding a runtime pointer, and the two write sites forward fd, # buffer, and count as function parameters. Neither has a compile-time # sizeable destination. # # The char_traits override at boost/iostreams/detail/char_traits.hpp:46 # is not instantiated in the shipped library (verified with nm -DC: # only std::char_traits appears, as part of std::basic_string). # It is not cited as evidence here. # # Verified by replica under -O2 -march=x86-64 -mtune=generic -fPIC # -fhardened. Controls emit __memcpy_chk / __memset_chk as expected; # the heap-destination memcpy and runtime-pointer memset shapes, # reproduced with the same flags, emit no _chk relocation. -fhardened # reached the shipped object: C=1 in the audit; T=1 confirms linkflags # applied at link. boost-1.92.0-x86_64-2.txz|libboost_iostreams.so.1.92.0|memcpy compiler-generated from std::string copy in detail/path.hpp:49 constructor; read dest from stack-loaded pointer; write sites are param-passthrough; all fold; replica-verified; -fhardened confirmed (C=1 T=1) # boost/stacktrace_addr2line: no _chk symbols emitted. Two shapes, both # fold: # # * boost/stacktrace/detail/addr2line_impls.hpp:150 # char data[32]; # ::fgets(data, sizeof(data), p) # Count equals the destination size, both compile-time constants. # GCC proves count <= object_size and folds to plain fgets. Same # shape as the lvm2 and php entries above. # # * boost/stacktrace/detail/addr2line_impls.hpp:129 and :132 # std::string res; # ::readlink("/proc/self/exe", &res[0], res.size() - 1) # Destination is an interior pointer into a std::string's heap # buffer; count is res.size()-1, a runtime value. # __builtin_dynamic_object_size returns the unknown sentinel and # glibc's fortify macro folds to plain readlink. Same shape as the # perl POSIX.so read binding. # # The memcpy/memmove and memset sites observed in the disassembly are # compiler-generated from std::string operations (res.resize, res += # data), not source-level calls. # # Verified by replica under -O2 -march=x86-64 -mtune=generic -fPIC # -fhardened. Controls: fixed-size stack dest with count exceeding size # emits __fgets_chk / __readlink_chk; runtime count against a # fixed-size stack dest emits __memset_chk / __memcpy_chk. The two # shapes above, reproduced with the same flags, emit no _chk # relocation. -fhardened reached the shipped object: C=1 in the audit, # canary spill at 422e (mov %fs:0x28,%r14); T=1 confirms linkflags # applied at link. boost-1.92.0-x86_64-2.txz|libboost_stacktrace_addr2line.so.1.92.0|fgets at detail/addr2line_impls.hpp:150 (sizeof(dest)==count) and readlink at :129/:132 (&string[0] dest, runtime count); both fold; replica-verified; -fhardened confirmed (C=1 T=1) # sudo/group_file.so: the only fortifiable libc call is a single fgets at # plugins/group_file/getgrent.c:122, inside mygetgrent(): # # static char grbuf[LINE_MAX], *gr_mem[GRMEM_MAX+1]; # ... # if ((colon = fgets(grbuf, sizeof(grbuf), grf)) == NULL) # # LINE_MAX is 2048 on glibc (POSIX _POSIX2_LINE_MAX), so sizeof(grbuf) is # a compile-time constant equal to 2048 and equals the count. The check # inside __fgets_chk is provably false and GCC folds to plain fgets. # # Verified by replica under -O2 -march=x86-64 -mtune=generic -fPIC # -fhardened. Control: same function with char buf[16] and count # LINE_MAX emits __fgets_chk plus the compiler diagnostic # "fgets called with bigger size than length of destination buffer". # Reproduction: static char grbuf[LINE_MAX] with sizeof(grbuf) as count # emits no _chk relocation. Same shape as the shipped object, which # confirms the fold is real. Disassembly of the shipped .so at 0x195f: # # mov %rbx,%rdx ; stream argument # mov $0x800,%esi ; count = 2048, compile-time constant # lea 0x2d83(%rip),%rdi ; destination = static buffer at 0x4700 # call 1220 ; plain call, no __fgets_chk # # No __fgets_chk symbol appears anywhere in the object. -fhardened # reached the object: C=1 and T=1 in the audit. sudo-1.9.17p2-x86_64-2.txz|group_file.so|fgets count sizeof(grbuf)==LINE_MAX==2048; check provably false; replica-verified; disassembly confirms fold; -fhardened confirmed (C=1 T=1) # libShabal: Rust cdylib. FORTIFY is N/A by verification. # # FORTIFY (_FORTIFY_SOURCE) is a C preprocessor mechanism: glibc's # headers rewrite standard C library calls into __builtin___*_chk at # the C preprocessor level. It applies only to source that a C # preprocessor processes. Rust source is rustc-generated and never # passes through a C preprocessor, so no fortify macro can fire on # it. rustc's FFI calls to libc emit plain UND references to the # target symbols, with no wrapper. # # The crate's C TUs (compiled by build.rs via the cc crate) are # subject to FORTIFY. They contain no call site on the audit's list, # so no wrapper is emitted there either. # # Verification: # # (1) C TU scan, per-TU nm against the audit's exact fortify list: # curve25519.o : no list symbol referenced # common.o : no list symbol referenced # shabal.o : no list symbol referenced # sph_shabal.o : no list symbol referenced # Per-TU nm | grep _chk shows the only _chk symbol in any C TU # is __stack_chk_fail, the canary. No __memcpy_chk, no # __strcpy_chk, no fortify wrapper of any kind. # # (2) Linked .so UND set, nm -D --undefined-only: # getcwd, memcpy, memmove, read, readlink, realpath # memcpy and memmove are not on the audit's list. The four that # drive F=0 are: getcwd, read, readlink, realpath. # # (3) Attribution by set difference. The four list symbols in (2) do # not appear in any C TU in (1). Every UND in the .so came from a # C TU or from rustc. The C TUs are exhausted. Therefore the four # are rustc-origin. # # (4) Rust replica. A minimal Rust cdylib on the same toolchain with # the same RUSTFLAGS, calling std::env::current_dir, # std::fs::read, std::env::current_exe, std::fs::canonicalize, # emits: # U getcwd@GLIBC_2.2.5 # U read@GLIBC_2.2.5 # U readlink@GLIBC_2.2.5 # U realpath@GLIBC_2.3 # and no _chk symbol of any kind. # # (5) Rust FFI replica, direct libc calls with canonical fortifiable # shapes: # # let mut buf = [0i8; 16]; # getcwd(buf.as_mut_ptr(), n); // fixed-size stack # // buffer, runtime # // size # strcpy(dst, src); // runtime source # let mut out = [0u8; 16]; # memcpy(out.as_mut_ptr(), src, n); // fixed-size stack # // buffer, runtime # // count # # Emitted: # U getcwd@GLIBC_2.2.5 # U memcpy@GLIBC_2.14 # U strcpy@GLIBC_2.2.5 # and no __getcwd_chk, __strcpy_chk, or __memcpy_chk. These are # exactly the shapes that emit fortify wrappers when compiled as # C. rustc emitted plain calls. The mechanism claim is therefore # verified by direct test, not by reference. # # (6) Linked .so call-site scan. nm -D shows exactly one _chk symbol, # __stack_chk_fail. objdump -d with call.*__*_chk | uniq -c shows: # 10 __stack_chk_fail@plt # and nothing else. Zero calls to any fortify wrapper in the # entire binary. # # (7) Flag activity control. A C file with the canonical fortifiable # shape (char dst[16]; memcpy(dst, src, n) with runtime n), # compiled with the same flags as the crate's C side # (-O2 -D_FORTIFY_SOURCE=3 -fstack-protector-strong), emits # U __memcpy_chk. So _FORTIFY_SOURCE=3 is active on this build # host. The absence of wrappers in the crate is a source-shape # and toolchain property, not a missing or misapplied flag. # # F is N/A by verification. Every load-bearing claim is backed by a # command whose output is reproducible from this tree. libShabal-1.4.1-x86_64-*.txz|libshabal.so|FORTIFY N/A verified: F=0 driven by four rustc-origin symbols (getcwd/read/readlink/realpath) absent from every C TU; rustc bypasses glibc fortify headers verified by FFI replica emitting plain getcwd/strcpy/memcpy with no _chk on canonical fortifiable shapes; C TUs have no fortify-list call sites; .so has zero __*_chk calls other than canary; -D_FORTIFY_SOURCE=3 confirmed active by C control anne-node.jar|libshabal.so|FORTIFY N/A verified: F=0 driven by four rustc-origin symbols (getcwd/read/readlink/realpath) absent from every C TU; rustc bypasses glibc fortify headers verified by FFI replica emitting plain getcwd/strcpy/memcpy with no _chk on canonical fortifiable shapes; C TUs have no fortify-list call sites; .so has zero __*_chk calls other than canary; -D_FORTIFY_SOURCE=3 confirmed active by C control # llvm: llvm-symbolizer. Clang's _FORTIFY_SOURCE is partial. Clang # performs the bounds checks at compile time and folds calls it can # prove safe, but it does not emit the __*_chk runtime wrappers the # audit looks for. Clang turns __builtin_*_chk into __builtin_* # rather than into a libc call. Canonical reference: LLVM commit # 621d8cc (Dec 2019), "Allow system header to provide their own # implementation of some builtin", whose message states "Clang # currently ignores the inline version and thus provides no runtime # check". Still current in Clang 23.1.2; the Linux kernel Kconfig # for FORTIFY_SOURCE carries an explicit CC_IS_CLANG exclusion for # the same reason. # # Not exploitable: llvm-symbolizer is a build-time tool. It is not a # service, does not listen on a socket, does not accept untrusted # network input, and is not reachable by a remote attacker. The # binary carries PIE, Full RELRO, canary, NX, and CET; the FORTIFY # gap is the compiler folding a check it could prove safe, not a # missing flag. llvm-*|llvm-symbolizer|FORTIFY gap: Clang's _FORTIFY_SOURCE is partial. Compile-time checks are performed and provably-safe calls are folded, but no __*_chk runtime wrappers are emitted. Not exploitable: llvm-symbolizer is a build-time tool, not a service, not reachable by a remote attacker; hardened in the other five columns. Canonical reference: LLVM commit 621d8cc (Dec 2019); Linux kernel Kconfig CC_IS_CLANG exclusion, still in force. Action: document only. rust-1*|*|FORTIFY is a C preprocessor mechanism: glibc's headers rewrite standard C library calls into __builtin___*_chk at the preprocessor level. Rust source is rustc-generated and never passes through a C preprocessor, so no __*_chk wrapper is emitted for Rust-origin calls. The C TUs compiled by the toolchain's build scripts (curl, libgit2, OpenSSL glue for cargo) do go through the preprocessor and do emit wrappers where warranted; cargo shows F=1 as evidence the flags reached the C side. Action: document only. # rust-bindgen 0.73.2: FORTIFY is N/A by source and binary inspection. # # The five fortify-list symbols in the binary are getcwd, memcpy, # read, readlink, realpath. Each originates from Rust std, not from # bindgen's source or its linked dependency graph. # # 1. bindgen's own source does not reference any of them: # grep -rn 'getcwd\|readlink\|realpath\|libc::read\b' \ # bindgen/src bindgen-cli # returns nothing. # # 2. The vendor tree was searched across the full fortify list. # Three hits, all accounted for: # - getrandom-0.2.17/src/use_file.rs:24 and # getrandom/src/backends/use_file.rs:50 call libc::read. # getrandom is not in bindgen-cli's cargo tree # (cargo tree -p bindgen-cli | grep -c getrandom = 0). # - rustix/src/lib.rs:36 is a doc comment, not a call. # No vendored crate that IS in the tree calls a fortify-list # function. No C source file in the vendor tree compiles into # the binary (only cc/src/detect_compiler_family.c exists, and # cc is a workspace dep of bindgen, not of bindgen-cli). # # 3. Each remaining symbol has a shape that folds in any compiler: # # getcwd: std/src/sys/paths/unix.rs:24-27. # let mut buf = Vec::with_capacity(512); # libc::getcwd(ptr, buf.capacity()) # Heap pointer, __builtin_object_size = -1, folds. # # readlink: std/src/sys/fs/unix.rs:1907-1914. # let mut buf = Vec::with_capacity(256); # libc::readlink(p, buf.as_mut_ptr(), buf.capacity()) # Same shape, same fold. # # realpath: std/src/sys/fs/unix.rs:2000. # libc::realpath(path.as_ptr(), ptr::null_mut()) # Allocating form; no __realpath_chk exists for it. # # read: std/src/sys/fd/unix.rs:140. # libc::read(fd, buf.as_mut_ptr(), # cmp::min(buf.len(), READ_LIMIT)) # Slice pointer, runtime size, folds. # # memcpy: No call site. readelf -rW shows only # R_X86_64_GLOB_DAT memcpy@GLIBC_2.14 (address-of # GOT entry, not PLT). objdump -d | grep -c memcpy = 0. # # 4. -fhardened reached the build and FORTIFY was active. The # .comment marker "GCC: (GNU) 16.2.0" comes from glibc's CRT # stubs, not from crate code: readelf -p .comment on # /usr/lib64/Scrt1.o shows the same marker, and the binary's # .comment carries only rustc + the CRT stub GCC marker + LLD. # No crate in the dependency graph compiles C. # # None of these symbols would produce a __*_chk wrapper in a C # build with the same flags and shapes. The F=0 reading is the # correct N/A. # # Not exploitable: bindgen is a build-time code generator. Reads C # headers, writes a .rs file, runs as the invoking user. Not a # service, not setuid, not reachable by a remote attacker, # IMA-appraised at execve. rust-bindgen-0.73.2-x86_64-*.txz|bindgen|FORTIFY N/A: all five fortify-list symbols are rustc-origin and have heap or slice destinations with no compile-time object size; no vendored crate in bindgen-cli's tree calls a fortify-list function; no memcpy call site exists; -fhardened confirmed via CRT stub .comment marker # terminal-svg 0.6.0: FORTIFY is N/A. The binary carries no __*_chk # symbol of any kind, and nothing in its dependency graph could have # produced one. # # 1. Symbol table. nm -D --undefined-only /usr/bin/terminal-svg | # grep _chk returns empty. readelf -sW for the same pattern is # empty, and objdump -d | grep 'call.*__.*_chk' finds no call # target. The binary has no fortify wrapper. # # 2. Dependency graph. cargo tree on terminal-svg shows no *-sys # crate, no bindgen, no cxx, no cc. Allsorts, brotli, # brotli-decompressor, flate2 (miniz_oxide backend), and ttf2woff2 # are pure Rust. Nothing in the tree compiles C into the # executable. # # 3. The "GCC: (GNU) 16.2.0" marker in the binary's .comment comes # from glibc's CRT startup files, /usr/lib64/Scrt1.o and # /usr/lib64/crt1.o, which every dynamically-linked ELF on this # system links. Verified by inspecting those objects directly: # both carry the marker. Neither libstd-25c27e165b691d00.rlib nor # libcompiler_builtins-73ebd82ec720170d.rlib contains any object # with a GCC marker, so the marker is not from crate code or from # the Rust sysroot. # # 4. The five fortify-list symbols that drive F=0 (getcwd, memcpy, # read, readlink, realpath) originate from Rust std, the same std # that rust-bindgen links. The call shapes are the same ones # documented in the rust-bindgen entry above (heap Vec # destination with buf.capacity() for getcwd and readlink; # ptr::null_mut() for realpath; slice pointer with runtime size # for read; no memcpy call site). Each folds to the plain call # in any compiler because the destination has no compile-time # object size. None of them would produce a __*_chk wrapper in a # C build with the same flags. # # 5. _FORTIFY_SOURCE is a C preprocessor mechanism: glibc's headers # rewrite standard C library calls into __builtin___*_chk before # the compiler sees them. Rust source never passes through a C # preprocessor, so no __*_chk wrapper can be emitted for any # Rust-origin call. The absence is the compiler correctly not # emitting wrappers, not a missing flag. # # 6. C column reads · (N/A). The audit's disassembly heuristic did # not find a stack-buffer-into-arg-register pattern, and stable # Rust provides no path to -Z stack-protector for any binary that # would. · is a pass. # # Not exploitable: terminal-svg is a non-network-facing command-line # utility. It reads a file or stdin, renders SVG to stdout or a named # file, and exits. Not a service, does not listen on a socket, does # not accept untrusted network input, is not setuid, and runs with # the invoking user's privileges. IMA-appraised at execve like every # other binary on the system. # # Decision: kept in the tree. The F=0 reading is a documented # stable-Rust limitation with no fix short of RUSTC_BOOTSTRAP=1 or a # nightly toolchain, neither warranted for a local developer tool. terminal-svg-0.6.0-x86_64-*.txz|terminal-svg|FORTIFY N/A: no __*_chk symbol in the binary (nm -D, readelf -sW, objdump call scan all empty); dependency graph is pure Rust; the five fortify-list symbols are rustc-origin with heap or slice destinations that fold in any compiler. C=· is N/A, not a gap. Kept in tree. # mongodb-shell/cpufeatures.node: the only fortify-list symbol is read. # The sole call site is in # node_modules/cpu-features/deps/cpu_features/src/filesystem.c:57, # inside CpuFeatures_ReadFile, a pass-through syscall wrapper with the # POSIX read signature: # # int CpuFeatures_ReadFile(int file_descriptor, void* buffer, # size_t buffer_size) { # int result; # do { # result = read(file_descriptor, buffer, buffer_size); # } while (result == -1L && errno == EINTR); # return result; # } # # Both the destination (buffer) and the count (buffer_size) are # function parameters, so no compile-time object size exists in this # translation unit. glibc's fortify macro computes an unknown # __builtin_dynamic_object_size and folds to plain read. # # Disassembly of the shipped .node at the read call site confirms the # fold (inside CpuFeatures_ReadFile's EINTR retry loop): # call __errno_location@plt # cmpl $0x4,(%rax) ; EINTR # ... # mov %r12,%rdx ; count, loaded from a register (runtime) # mov %r13,%rsi ; destination, loaded from a register (runtime pointer) # mov %r14d,%edi ; fd # call read@plt ; plain call, no __read_chk # No __read_chk symbol appears anywhere in the dynamic symbol table. # # The identical shape is already documented for libnpth.so.0.3.0 # (npth_read, src/npth.c:803), gsc/gsx (dxmainc.c:56), and mariadb's # auth_pam.so (auth_pam_tool.h:59). Same compiler decision, same # reason: no object size visible at the call site. # # Verified by replica under the exact node-gyp flags # (-O2 -fPIC -fstack-protector-strong -D_FORTIFY_SOURCE=3): # - The runtime-pointer/runtime-count shape emits plain read with no # __read_chk relocation. # - Control: a fixed-size stack destination with count > size emits # __read_chk plus the -Wstringop-overflow diagnostic, confirming # _FORTIFY_SOURCE=3 is active on this toolchain. # - Flag evidence: C=1 on the shipped .node confirms CFLAGS # propagation; _FORTIFY_SOURCE=3 is on the same line. mongodb-shell-2.13.0-x86_64-*.txz|cpufeatures.node|FORTIFY N/A verified: read into a runtime pointer with a runtime count inside CpuFeatures_ReadFile (deps/cpu_features/src/filesystem.c:57); disassembly confirms no __read_chk at the call site; -D_FORTIFY_SOURCE=3 confirmed active via control; C=1 confirms CFLAGS propagation; replica-verified # ============================================================================ # Section 2: KO_CET exceptions: kernel modules (T = accepted gap) # ============================================================================ # Format: "KO_CET: package_glob|module_glob|reason" # # Each entry marks a specific (package, kernel-module) pair as an # ACCEPTED GAP, not N/A. This is a real gap: the module does not carry # the IBT property in its .note.gnu.property section. The gap is # accepted because the toolchain provides no mechanism to emit the # property for .S inputs, and every module listed here is blacklisted # at install so it does not load. # # Use only when the module genuinely cannot carry # GNU_PROPERTY_X86_FEATURE_1_IBT in this kernel/toolchain combination, # and the absence has been verified by inspecting the module's own ELF # and the mechanism that would have produced it. # # Only the CET check is affected. Canary still applies in full. # # Do NOT use this table to hide a genuine IBT gap -- one where the code # lacks endbr64, or where the property is present on some modules of the # same shape and missing on others for unexplained reasons. The exception # is specifically "the toolchain and kernel in this release provide no # mechanism to emit the property for .S inputs, and the module links one." # ============================================================================ # # ---------------------------------------------------------------------------- # Decision record: 2026-10-05 # # kernel-generic-7.2.9-x86_64-1 ships 20 modules that link at least one # .S (assembly) source file. Each of those modules contains # IBT-instrumented code -- endbr64 is present at every function entry -- # but the module's ELF lacks the F1 IBT bit in .note.gnu.property. On a # kernel built with CONFIG_X86_KERNEL_IBT=y this is the state that # determines whether apply_seal_endbr() runs at module load. # # Verified findings (every claim below was tested on 7.2.8 in this tree): # # 1. gcc -fcf-protection=branch does not emit .note.gnu.property for # .S inputs. Confirmed with a two-line replica: # printf '.text\n.globl foo\nfoo:\n\tret\n' > t.S # gcc -fcf-protection=branch -c t.S -o t.o # readelf -nW t.o # shows F2 and ISA, no F1 # Same flag on a .c file emits F1 IBT. This is a GCC/toolchain # property, not specific to this tree. # # 2. objtool in 7.2.8 has no code path that writes the IBT property. # Source grep of tools/objtool/ for FEATURE_1, GNU_PROPERTY, # gnu_property, note.gnu.property -- zero matches in .c/.h. # objtool --ibt validates ENDBR placement; it does not inject # the section. Manual objtool --link --ibt --module on an object # that had the property left the property intact (exit 0). # # 3. The kernel source provides no macro or rule to emit the property # for .S files. grep of arch/x86/include/ and arch/x86/kernel/ for # note.gnu.property and GNU_PROPERTY_X86_FEATURE_1 -- only the # vDSO linker script mentions the section. arch/x86/include/asm/ # ibt.h defines ENDBR as the instruction (endbr64) for # __ASSEMBLER__, and nothing else. # # 4. KBUILD_AFLAGS is not extended under CONFIG_X86_KERNEL_IBT=y. # arch/x86/Makefile adds -fcf-protection only to KBUILD_CFLAGS. # KAFLAGS="-fcf-protection=branch" propagates to the .S compile # line (verified in .vmenter.o.cmd) and produces no property, for # the same reason as (1). # # 5. The kernel module loader does NOT reject these modules. No # FEATURE_1 check exists in kernel/module/main.c or # arch/x86/kernel/module.c. The -ENOEXEC returns in main.c are # ELF, relocation, and modinfo validation, not CET. The modules # load and run. What is lost is IBT sealing, the optimisation # that NOPs unused endbr sites. Skipping the seal is the # conservative direction; endbr remains in place. # # 6. Per-module verification: all 20 failing modules were measured # individually. Each has endbr64 > 0 and lacks the F1 property. # There are no outliers. Two single-source C control modules # (random.ko, tun.ko) do carry the property, confirming the # absence is specific to modules that link .S. # # 7. lan966x-pci.ko is a C driver that also fails. It links a # generated .S (lan966x_pci.dtbo.S, wrapping the device-tree # overlay blob) alongside its C object. Verified by: # cat drivers/misc/lan966x-pci.mod # -> lan966x_pci.o + lan966x_pci.dtbo.o # readelf -nW drivers/misc/lan966x_pci.dtbo.o # -> no IBT property # A manual ld -r of just lan966x_pci.o preserves IBT; the # composite with the .S input does not. Same class as the # crypto and KVM modules. # # Decision: keep the modules in the package, disable them at OS install # via modprobe blacklist (see the kernel package's doinst.sh and # /etc/modprobe.d/amos-hardening.conf). Removing them from the .config # would break hardware-accelerated crypto (dm-crypt and LUKS # performance drops from ~2 GiB/s to a few hundred MiB/s) and KVM # virtualization. Disabling at install removes the runtime attack # surface without losing the option to re-enable a specific module for # a user who needs it. # # A user who re-enables a module by removing it from # /etc/modprobe.d/amos-hardening.conf and running modprobe will load a # module that lacks the ELF-level IBT declaration. The endbr64 # instructions are present; the kernel's seal optimisation will not run # on it. This is a hardening regression on that module, not a functional # one. It is documented here so the audit trail survives the re-enable. # ---------------------------------------------------------------------------- # KO_CET: kernel-generic-7.2.9-x86_64-1.txz|kvm-intel.ko|.S input; endbr64=386; IBT property not emitted for asm in 7.2.8; blacklisted at install KO_CET: kernel-generic-7.2.9-x86_64-1.txz|kvm-amd.ko|.S input; endbr64=243; same as above; blacklisted at install KO_CET: kernel-generic-7.2.9-x86_64-1.txz|sm4-aesni-avx-x86_64.ko|.S input; endbr64=12; same; blacklisted KO_CET: kernel-generic-7.2.9-x86_64-1.txz|aria-gfni-avx512-x86_64.ko|.S input; endbr64=10; same; blacklisted KO_CET: kernel-generic-7.2.9-x86_64-1.txz|twofish-x86_64-3way.ko|.S input; endbr64=10; same; blacklisted KO_CET: kernel-generic-7.2.9-x86_64-1.txz|aria-aesni-avx-x86_64.ko|.S input; endbr64=13; same; blacklisted KO_CET: kernel-generic-7.2.9-x86_64-1.txz|camellia-aesni-avx-x86_64.ko|.S input; endbr64=10; same; blacklisted KO_CET: kernel-generic-7.2.9-x86_64-1.txz|serpent-avx-x86_64.ko|.S input; endbr64=10; same; blacklisted KO_CET: kernel-generic-7.2.9-x86_64-1.txz|cast5-avx-x86_64.ko|.S input; endbr64=7; same; blacklisted KO_CET: kernel-generic-7.2.9-x86_64-1.txz|serpent-avx2.ko|.S input; endbr64=7; same; blacklisted KO_CET: kernel-generic-7.2.9-x86_64-1.txz|sm4-aesni-avx2-x86_64.ko|.S input; endbr64=7; same; blacklisted KO_CET: kernel-generic-7.2.9-x86_64-1.txz|blowfish-x86_64.ko|.S input; endbr64=9; same; blacklisted KO_CET: kernel-generic-7.2.9-x86_64-1.txz|aria-aesni-avx2-x86_64.ko|.S input; endbr64=13; same; blacklisted KO_CET: kernel-generic-7.2.9-x86_64-1.txz|camellia-aesni-avx2.ko|.S input; endbr64=7; same; blacklisted KO_CET: kernel-generic-7.2.9-x86_64-1.txz|aegis128-aesni.ko|.S input; endbr64=6; same; blacklisted KO_CET: kernel-generic-7.2.9-x86_64-1.txz|cast6-avx-x86_64.ko|.S input; endbr64=7; same; blacklisted KO_CET: kernel-generic-7.2.9-x86_64-1.txz|twofish-avx-x86_64.ko|.S input; endbr64=7; same; blacklisted KO_CET: kernel-generic-7.2.9-x86_64-1.txz|libsm3.ko|.S input; endbr64=8; same; blacklisted KO_CET: kernel-generic-7.2.9-x86_64-1.txz|libnh.ko|.S input; endbr64=3; asm-only helper (no canary code, C=N/A); same; blacklisted KO_CET: kernel-generic-7.2.9-x86_64-1.txz|lan966x-pci.ko|generated .S input (lan966x_pci.dtbo.S); endbr64=7; IBT property not emitted for asm in 7.2.8; blacklisted at install # ============================================================================ # Section 3: CET_GAP exceptions: userspace binaries (T = accepted gap) # ============================================================================ # Format: "CET_GAP: package_glob|binary_glob|reason" # # Same semantics as KO_CET, different mitigation. Used for binaries # built by toolchains that emit neither endbr64 nor the # GNU_PROPERTY_X86_FEATURE_1_IBT note, where the absence is documented # upstream and cannot be addressed by the package maintainer. # ============================================================================ # # ---------------------------------------------------------------------------- # Decision record: 2026-10-05 # # google-go-lang is NOT shipped in the AM·OS ISO. It is available from the # repository on demand: # # amos install google-go-lang # # The package fails two columns of the audit, for two different # reasons. Neither is addressable by the package maintainer, and neither is # equivalent to the other. This record states both, and states what the # audit's C=- on a Go binary does not mean. # # ---------------------------------------------------------------------------- # CET: real gap, every binary # ---------------------------------------------------------------------------- # # The Go compiler emits neither endbr64 landing pads nor the # GNU_PROPERTY_X86_FEATURE_1_IBT note. Both halves of CET are affected. # Upstream issues #66054 (IBT) and #66840 (SHSTK) are open with no landing # date. Not addressable by flag, build mode, or source patch short of a new # codegen path in the compiler. # # Measured (Go 1.27.1, this tree): # # objdump -d --no-show-raw-insn | grep -c endbr64 # bin/go -> 0 # pkg/tool/linux_amd64/compile -> 0 # pkg/tool/linux_amd64/link -> 0 # pkg/linux_amd64_dynlink/libstd.so -> 0 # # Zero ENDBR64 in every binary. The property is absent because the # instruction is absent. Nothing for the loader to seal. # # ---------------------------------------------------------------------------- # Canary: N/A, not absent. The reading is narrower than the C column # suggests, and the audit does not currently distinguish the two shapes # of N/A. # ---------------------------------------------------------------------------- # # The C column shows "-" for the ten pure-Go toolchain binaries and "1" for # libstd.so. The "1" is real: libstd.so links runtime/cgo, which is C code # compiled with the standard toolchain and carries __stack_chk_fail in the # ordinary way. # # The "-" is correct in the narrow sense. Pure Go has no fixed-size C stack # frame to overflow. A goroutine's stack is heap-allocated and grows on # demand; overflow hits the stack guard page before it reaches anything # else. Language-level bounds checking panics on out-of-range slice access # rather than writing through. The compiler emits no code where a canary # would fire. # # What the "-" does NOT mean: # # 1. It is not a claim that the binary is as hardened as a C binary # carrying C=1. It is a claim that the compiler emits no code where a # canary would be placed. Different statements. # # 2. The unsafe package and cgo both bypass the protections above. A Go # program that writes past a slice via unsafe. Pointer, or that passes # a Go buffer to C code which overflows it, can produce a stack buffer # overflow that a canary would have caught. Go does not emit canaries # into those paths either but it relies on the programmer not to make # the mistake. The toolchain itself uses unsafe extensively: runtime, # reflect, the compiler. # # 3. The runtime's stack-growth check is software. Bugs there have # existed, and a canary would have been a backstop. Go provides none. # # The audit reports C=- on pure Go because that is the honest answer to # "does the code carry a canary?" No, and there is no code path that # would. It is not an assertion that Go is equivalent to a canary-protected # C binary. # # A future refinement could split C=- into two sub-states: "N/A - the code # cannot have this bug" (Go, tiny stubs) and "N/A — the toolchain does not # emit the mitigation." The distinction would make the Go case visible as # its own category rather than folding it in with the stubs. # # ---------------------------------------------------------------------------- # Per-column status of the shipped binaries (Go 1.27.1, this tree): # # libstd.so P=1 R=1 C=1 F=1 N=1 T=0 # compile P=1 R=1 C=- F=- N=1 T=0 # link P=1 R=1 C=- F=- N=1 T=0 # asm P=1 R=1 C=- F=- N=1 T=0 # cgo P=1 R=1 C=- F=- N=1 T=0 # cover P=1 R=1 C=- F=- N=1 T=0 # vet P=1 R=1 C=- F=- N=1 T=0 # preprofile P=1 R=1 C=- F=- N=1 T=0 # fix P=1 R=1 C=- F=- N=1 T=0 # go P=1 R=1 C=- F=- N=1 T=0 # gofmt P=1 R=1 C=- F=- N=1 T=0 # # PIE, Full RELRO, and NX are present on every binary. These came from the # BOOT_GO_LDFLAGS/GO_LDFLAGS exports and the init.go default-buildmode patch # in the SlackBuild. CET is absent on every binary. Canary is genuinely # N/A on pure Go and genuinely present on libstd.so. # # ---------------------------------------------------------------------------- # Verdict: # # google-go-lang is not insecure in the sense that word is normally used. # It is not a network service, it parses no untrusted input from outside # the developer's own project tree, and it is IMA-appraised at execve like # every other binary on the system. A user who runs `amos install # google-go-lang` gets a functional, integrity-checked toolchain. # # It is also not fully hardened in the sense the ISO policy applies to the # rest of the base image. It fails CET outright, and its canary status is # N/A in a way that the audit's C column does not currently distinguish # from the N/A of a tiny stub .so. The reductions are real even though # neither is catastrophic on its own. # # The ISO exclusion is the mitigation. The base image carries only binaries # that meet the policy in full. The toolchain is available on demand, the # user accepts the two reductions on that host, and the exception entries # below keep the audit honest about what is present. The alternative is # removing Go from the repository entirely, nevertheless the package is # functional, the reductions are upstream, and the developer workflow may # depend on it. # ---------------------------------------------------------------------------- # ---------------------------------------------------------------------------- CET_GAP: google-go-lang-1.27.1-x86_64-1.txz|go|Go compiler emits no endbr64 and no GNU_PROPERTY_X86_FEATURE_1_IBT note; objdump -d shows 0 endbr64; upstream #66054/#66840 open; package not in ISO, available via `amos install google-go-lang` CET_GAP: google-go-lang-1.27.1-x86_64-1.txz|gofmt|same as go; 0 endbr64 CET_GAP: google-go-lang-1.27.1-x86_64-1.txz|compile|same as go; 0 endbr64 CET_GAP: google-go-lang-1.27.1-x86_64-1.txz|link|same as go; 0 endbr64 CET_GAP: google-go-lang-1.27.1-x86_64-1.txz|asm|same as go; 0 endbr64 CET_GAP: google-go-lang-1.27.1-x86_64-1.txz|cgo|same as go; 0 endbr64 CET_GAP: google-go-lang-1.27.1-x86_64-1.txz|cover|same as go; 0 endbr64 CET_GAP: google-go-lang-1.27.1-x86_64-1.txz|vet|same as go; 0 endbr64 CET_GAP: google-go-lang-1.27.1-x86_64-1.txz|preprofile|same as go; 0 endbr64 CET_GAP: google-go-lang-1.27.1-x86_64-1.txz|fix|same as go; 0 endbr64 CET_GAP: google-go-lang-1.27.1-x86_64-1.txz|libstd.so|same as go; 0 endbr64 CET_GAP: rust-1*|*|Stable Rust cannot emit CET. -Z cf-protection=full is nightly-only (tracking issue #93754, no stabilization PR). rustc emits neither endbr64 landing pads nor the GNU_PROPERTY_X86_FEATURE_1_IBT note; all 15 binaries in the package show T=0. Not exploitable: build tool, not a service, IMA-appraised at execve. See Rust Decision record: 2026-10-10. Re-evaluate when #93754 closes. # ============================================================================ # Section 4: CANARY_GAP exceptions — intentionally absent canary (C = N/A) # ============================================================================ # Format: "CANARY_GAP: package_glob|binary_glob|reason" # # Each entry marks a specific (package, binary) pair as C=N/A. Only the # canary check is affected: PIE, RELRO, FORTIFY, NX, and CET still apply # in full to the binaries listed here. # # Use this only when the binary's canary is absent by design — the # canonical case is a sanitizer runtime built with -fno-stack-protector # to avoid a libc dependency during toolchain bootstrap. Do NOT use it to # hide a binary that was compiled without -fstack-protector-strong. That # is exactly the failure this audit exists to surface. Each entry MUST # carry a verifiable reason. # ============================================================================ # llvm: libclang_rt.nsan-x86_64.so. The numerical-stability sanitizer # runtime is intentionally compiled with -fno-stack-protector. # Compiler-rt sanitizer runtimes cannot depend on libc during toolchain # bootstrap (mutual dependency), and -fstack-protector-strong # introduces a libc dependency for __stack_chk_fail. Canonical # reference: LLVM commit 5829a98 (May 2013), "[nolibc] Disable the GCC # stack protector when building sanitizer runtimes." Policy reaffirmed # by the sanitizer maintainers in a November 2021 llvm-dev thread. # # Not exploitable: this is a shared library with no load path in # production. It is linked only by code compiled with # -fsanitize=numerical, which does not exist on this system outside the # LLVM package itself. Nothing on the ISO loads it. It is not a service, # not a daemon, not a dlopen target of any installed binary. The canary # gap is a consequence of the sanitizer runtime design, not a build # failure. CANARY_GAP: llvm-*|libclang_rt.nsan-x86_64.so|Canary gap: intentionally built with -fno-stack-protector. Sanitizer runtimes cannot depend on libc during toolchain bootstrap; -fstack-protector-strong introduces a libc dependency for __stack_chk_fail. The nsan runtime is a development debugging tool, not production code. Not exploitable: no production load path, not a service, not reachable by a remote attacker; linked only by code compiled with -fsanitize=numerical, which does not exist on this system outside the LLVM package. Canonical reference: LLVM commit 5829a98 (May 2013); policy reaffirmed November 2021 llvm-dev thread. Action: document only. CANARY_GAP: rust-1*|*|Stable Rust cannot emit stack canaries. -Z stack-protector=strong is nightly-only (tracking issue #114903, stabilization PR #146369 open, not merged). No Rust binary carries __stack_chk_fail or the %fs:0x28 guard load; most show C=- and libstd.so shows C=0, both reflecting the same absence. # ---------------------------------------------------------------------------- # Rust Decision record: 2026-10-10 # # rust is blacklisted from the ISO. It fails three of six audit columns # across the toolchain: CET on all 15 binaries, canary on all 15, # FORTIFY on 9. This is strictly worse than google-go-lang, # which fails only CET, and it is already blacklisted. A package that # fails more columns than a package that has already been excluded cannot # ship in the base image without making the exclusion policy arbitrary. # # The counterargument deserves stating. Rust code has compile-time # memory safety that the C equivalent lacks. Under that reasoning, a # Rust binary with no unsafe bugs does not need a canary, and the audit # is measuring a mitigation for a class of bug the language prevents. # That argument is not dishonest. # # It is also not sufficient for this policy. unsafe blocks, FFI, # dependencies (the crate ecosystem is large and not all of it is # audited), and compiler bugs all exist. When any of those produces a # bug, the Rust binary has fewer runtime backstops than the C binary # that went through the same build. Both properties (language-level # safety and platform-level mitigation) are necessary for the ISO. Only # one is present. # # The Rust project has not shipped platform mitigations that the C # toolchain on the same host provides by default: -Z stack-protector # and -Z cf-protection are both nightly-only, both with open tracking # issues and stabilization PRs that have not landed. LLVM supports both # features; rustc has not exposed them on stable. For a language that is # being pushed into kernel, bootloader, and infrastructure work, that is # a gap the project should close. Until it does, the package is # available on demand and excluded from the ISO. # ---------------------------------------------------------------------------- # ============================================================================ # Add future entries above this line, one per (package, binary) pair, # each with a specific verifiable reason. Multi-line comments above an # entry are preserved in the file but ignored by the parser. Section # order does not affect parsing. # ============================================================================