Project

General

Profile

Bug #12729

bootadm set-menu timeout crashes without timeout value

Added by Alexander Eremin 6 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

bootadm set-menu timeout doesn't check empty value and crashes after strtol in http://src.illumos.org/source/xref/illumos-gate/usr/src/cmd/boot/bootadm/bootadm_loader.c#653


# bootadm set-menu timeout
Segmentation Fault (core dumped)

#1

Updated by Alexander Eremin 5 months ago

  • Status changed from New to Pending RTI
#2

Updated by Alexander Eremin 5 months ago

Testing with proposed fix:

root@omniosce:~# bootadm set-menu timeout
bootadm: missing value in key=value
root@omniosce:~# bootadm set-menu timeout=
bootadm: invalid timeout:
root@omniosce:~# bootadm set-menu timeout=10
root@omniosce:~#
root@omniosce:~# bootadm set-menu default
bootadm: missing value in key=value
root@omniosce:~# bootadm set-menu default=2
root@omniosce:~#

#3

Updated by Electric Monk 5 months ago

  • Status changed from Pending RTI to Closed
  • % Done changed from 0 to 100

git commit f13f199891d2a0440db0361743dd73527f565e89

commit  f13f199891d2a0440db0361743dd73527f565e89
Author: Alexander Eremin <aeremin@tintri.com>
Date:   2020-05-18T17:50:48.000Z

    12729 bootadm set-menu timeout crashes without timeout value
    Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Gergő Doma <domag02@gmail.com>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Also available in: Atom PDF