lkml.org 
[lkml]   [2020]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v3 0/3] fix parsing of reboot= cmdline
Date
From: Matteo Croce <mcroce@microsoft.com>

The parsing of the reboot= cmdline has two major errors:
- a missing bound check can crash the system on reboot
- parsing of the cpu number only works if specified last

Fix both, along with a small code refactor.

v2->v3:
Revert the offending commit first, then fix the other bug.
CC stable
v1->v2:
As Petr suggested, don't force base 10 in simple_strtoul(),
so hex values are accepted as well.

Matteo Croce (3):
Revert "kernel/reboot.c: convert simple_strtoul to kstrtoint"
reboot: fix overflow parsing reboot cpu number
reboot: refactor and comment the cpu selection code

kernel/reboot.c | 30 +++++++++++++++++-------------
1 file changed, 17 insertions(+), 13 deletions(-)

--
2.28.0

\
 
 \ /
  Last update: 2020-11-03 22:41    [W:0.605 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site