My Linux and Open Source Software Penguin Logo Linux and Open Source News and Reviews
The Hungry Penguin
Linux & Me Blog    My Linux Blog (Archived)    What is Linux?    What is Open Source?

Sidebar

Open Source and the London Olympics



Dedicated Servers

[PATCH 0/9] serial: Fix out-of-bounds accesses through DT aliases

Click here for the complete article (lkml.org)
Geert Uytterhoeven writes: (Summary) However, several drivers do not perform any validation on the index obtained from DT, which may lead to out-of-bounds accesses of these fixed-size arrays.
fixed-size arrays.
While the DTB passed to the kernel might be considered trusted, some of these out-of-bounds accesses can be triggered by a legitimate DTB: - In some drivers the size of the array is defined by a Kconfig symbol, so a user who doesn't need all serial ports may lower this value rightfully,
- Tomorrow's new SoC may have more serial ports than the fixed-size array in today's driver can accommodate, which the user may forget to enlarge.
to enlarge.
Hence this series fixes that by adding checks for out-of-range aliases, logging an error message when triggered.
logging an error message when triggered.
Tested on r8a7791/koelsch (sh-sci), all other drivers were compile-tested only.
compile-tested only.
Thanks for your comments!
Thanks for your comments!
Geert Uytterhoev

Linux News | Linux Articles | Linux Distributions | Linux Apps | Linux Kernel | Free Linux Download | Linux & Me Blog
Free Press Release Service | Bible Study Tool | New Covenant Workshop | Gary Sims
Press Releases and SEO

The original content of these pages (not the syndicated items) is licensed under a Creative Commons License.
News and media about the Linux operating system, open source software, Unix, Apache, LAMP, PHP, RSS, GNU and much more.