Anatomy of a kernel attack
Take Away
I have described only two of many possible security issues. Other problems could include format strings, off-by-ones, out-of-bound reads, and more – all of which have affected past versions of Linux. Often preventing the attack is easy if the mechanics of the security issue are known – except if the compiler plays tricks on the programmer. Some issues can easily be found with static code analysis; other problems might require thorough testing. As a rule of thumb, automated tests should always include "critical" values, such as 128 for 8-bit values. Test cases should also include known older issues, to prevent them from being reintroduced (such as the Ping of Death in Windows IPv6). Surprisingly, static code analysis and automated testing are rare in many projects. OpenBSD is an example to the contrary, which is one reason for its secure reputation. Linux adopted static code analysis recently, and it has helped with finding and fixing many security issues.
Infos
- Buffer overflow: https://en.wikipedia.org/wiki/Buffer_overflow
- "Smashing the Stack for Fun and Profit" by Aleph One, Phrack, issue 49, November 8, 1996, http://phrack.org/issues/49/14.html
- A Space Error: $370 Million for an Integer Overflow: https://hownot2code.com/2016/09/02/a-space-error-370-million-for-an-integer-overflow/
- "Static Code Analysis Finds Avoidable Errors" by Tobias Eggendorfer, ADMIN, issue 53, 2019, pp. 88-92, https://www.admin-magazine.com/Archive/2019/53/Static-code-analysis-finds-avoidable-errors
- The Shellcoder's Handbook: Discovering and Exploiting Security Holes 2nd Edition; By Anley, Heasman, Linder, and Richarte; Wiley 2007
- CVE-2019-17133: https://nvd.nist.gov/vuln/detail/CVE-2019-17133
- CVE-2006-3459: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-3459
- cfg80211: wext: Reject Malformed SSID Elements: https://marc.info/?l=linux-wireless&m=157018270915487&w=2
- CVE-2019-16746: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-16746
- BootHole: https://eclypsium.com/2020/07/29/theres-a-hole-in-the-boot/
- Stagefright: Scary Code in the Heart of Android: https://www.youtube.com/watch?v=71YP65UANP0
- io_uring: Truncate Lengths Larger than MAX_RW_COUNT on Provide Buffers: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d1f82808877bb10d3deee7cf3374a4eb3fb582db
« Previous 1 2 3
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
![Learn More](https://www.linux-magazine.com/var/linux_magazin/storage/images/media/linux-magazine-eng-us/images/misc/learn-more/834592-1-eng-US/Learn-More_medium.png)
News
-
NVIDIA Released Driver for Upcoming NVIDIA 560 GPU for Linux
Not only has NVIDIA released the driver for its upcoming CPU series, it's the first release that defaults to using open-source GPU kernel modules.
-
OpenMandriva Lx 24.07 Released
If you’re into rolling release Linux distributions, OpenMandriva ROME has a new snapshot with a new kernel.
-
Kernel 6.10 Available for General Usage
Linus Torvalds has released the 6.10 kernel and it includes significant performance increases for Intel Core hybrid systems and more.
-
TUXEDO Computers Releases InfinityBook Pro 14 Gen9 Laptop
Sporting either AMD or Intel CPUs, the TUXEDO InfinityBook Pro 14 is an extremely compact, lightweight, sturdy powerhouse.
-
Google Extends Support for Linux Kernels Used for Android
Because the LTS Linux kernel releases are so important to Android, Google has decided to extend the support period beyond that offered by the kernel development team.
-
Linux Mint 22 Stable Delayed
If you're anxious about getting your hands on the stable release of Linux Mint 22, it looks as if you're going to have to wait a bit longer.
-
Nitrux 3.5.1 Available for Install
The latest version of the immutable, systemd-free distribution includes an updated kernel and NVIDIA driver.
-
Debian 12.6 Released with Plenty of Bug Fixes and Updates
The sixth update to Debian "Bookworm" is all about security mitigations and making adjustments for some "serious problems."
-
Canonical Offers 12-Year LTS for Open Source Docker Images
Canonical is expanding its LTS offering to reach beyond the DEB packages with a new distro-less Docker image.
-
Plasma Desktop 6.1 Released with Several Enhancements
If you're a fan of Plasma Desktop, you should be excited about this new point release.