Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)<p>Yay! Debian has enabled UBSAN_BOUNDS for array bounds checking in their kernel.<br /><a href="https://salsa.debian.org/kernel-team/linux/-/commit/f0e7aac02bc7ed179637a6c676b2ab4afe4c5db7" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="ellipsis">salsa.debian.org/kernel-team/l</span><span class="invisible">inux/-/commit/f0e7aac02bc7ed179637a6c676b2ab4afe4c5db7</span></a><br />Anyone wanting to enforce the checking, don&#39;t forget to set the warn_limit sysctl too.</p>
Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)<p>I decided to actually go see how hard adding __builtin_is_lvalue() to Clang would be, and it only took an evening. With that available we can set the variables passed to kfree() to NULL automatically. This should kill a subset of &quot;dangling pointer&quot; Use-After-Free flaws with basically no overhead and almost no refactoring in the kernel.</p><p><a href="https://lore.kernel.org/linux-hardening/20250321202620.work.175-kees@kernel.org/" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="ellipsis">lore.kernel.org/linux-hardenin</span><span class="invisible">g/20250321202620.work.175-kees@kernel.org/</span></a></p>
Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)<p>Trick question, can calling execve(2) result in a new thread ID?</p>
Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)<p>Well I guess everyone everywhere will want to use -fzero-init-padding-bits=all when updating to GCC15 to avoid regressing their uninitialized variable mitigations... Why in the world would the C standard committee work to make things *less* safe by default??!</p><p>Edit: this appears to be a decision on GCC&#39;s part and not a new change from the C committee. (See down-thread.)</p><p><a href="https://infosec.exchange/@edmonds/113851256533780886" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="ellipsis">infosec.exchange/@edmonds/1138</span><span class="invisible">51256533780886</span></a></p>
Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)<p>I generated a 12-character commit SHA prefix collision with the start of Linux&#39;s git history. It took about 6 hours on an RTX 3080 GPU:</p><p><a href="https://people.kernel.org/kees/colliding-with-the-sha-prefix-of-linuxs-initial-git-commit" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="ellipsis">people.kernel.org/kees/collidi</span><span class="invisible">ng-with-the-sha-prefix-of-linuxs-initial-git-commit</span></a></p>
Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)<p>Dear C Lazy Web,</p><p>How do I define an array of nonstring char arrays?</p><p>just a char array, valid:<br />char str[4] __attribute__((nonstring)):</p><p>array of char arrays, cursed:<br />char multi[10][4] __attribute__((nonstring));</p><p>I&#39;ve tried typedefs and moving the attribute around. No luck. What am I missing?</p><p>Here&#39;s a godbolt:<br /><a href="https://godbolt.org/z/4Mb61heG1" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="">godbolt.org/z/4Mb61heG1</span><span class="invisible"></span></a><br />I&#39;d want to see a warning for both strlen() instances...</p>
Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)
Kees Cook (old account)