Conversation

The Linux kernel has a strscpy function with this issue. It tripped me up when I implemented the Linux kernel CONFIG_FORTIFY_SOURCE. Fixed it a few days later. Linus didn't understand, seemed to think I was encouraging using strlcpy and got pissed off about it.
1
1
They make strscpy out to be a safer alternative to all the other string functions, but yet strscpy(s, n) is unsafe when even when strcpy would not be unsafe if the destination is smaller than n. It uses that assumption to assume it can clobber unused bytes after the terminator.
1
1
I got discouraged from contributing to Linux upstream for other reasons: maintainers incredibly hostile to robustness and security and certain companies treating people contributing to security upstream as their enemies. My out-of-tree slab canary feature led to being accused of
1
Does not seem to have much in connection with their proprietary technology aside from using canaries, which is a small optional feature of hardened_malloc intended to be obsoleted by memory tagging. Anyway, that's the tip of the iceberg of my Linux kernel contribution experience.