Project

General

Profile

Actions

Bug #12729

closed

bootadm set-menu timeout crashes without timeout value

Added by Alexander Eremin about 2 years ago. Updated about 2 years 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)

Actions #1

Updated by Alexander Eremin about 2 years ago

  • Status changed from New to Pending RTI
Actions #2

Updated by Alexander Eremin about 2 years 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:~#

Actions #3

Updated by Electric Monk about 2 years 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>

Actions

Also available in: Atom PDF