Project

General

Profile

Actions

Bug #14154

closed

zpool should call zfs_nicestrtonum() with non-NULL handle

Added by Toomas Soome about 2 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
zfs - Zettabyte File System
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

To get proper error diagnostics, we should not call zfs_nicestrtonum() with NULL.

Testing done:

Before patch:

tsoome@beastie:/code/14154/usr/src/cmd/zpool$ zpool trim -r 10X rpool
Segmentation Fault (core dumped)

after patch:

tsoome@beastie:/code/14154/usr/src/cmd/zpool$ ./zpool trim -r 10X rpool
invalid value for rate: invalid numeric suffix 'X'
usage:
        trim [-d] [-r <rate>] [-c | -s] <pool> [<device> ...]
tsoome@beastie:/code/14154/usr/src/cmd/zpool$ 

Related issues

Related to illumos gate - Bug #14153: libzfs: str2shift called with NULL handle can crashClosedToomas Soome

Actions
Actions #1

Updated by Toomas Soome about 2 months ago

  • Related to Bug #14153: libzfs: str2shift called with NULL handle can crash added
Actions #2

Updated by Electric Monk about 2 months ago

  • Gerrit CR set to 1756
Actions #3

Updated by Toomas Soome about 2 months ago

  • Status changed from New to In Progress
  • Assignee set to Toomas Soome
  • % Done changed from 0 to 90
Actions #4

Updated by Toomas Soome about 2 months ago

  • Description updated (diff)
Actions #5

Updated by Electric Monk about 1 month ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit 43a48c4abe5e9b1ec01aee36f4d37cd28a4452e6

commit  43a48c4abe5e9b1ec01aee36f4d37cd28a4452e6
Author: Toomas Soome <tsoome@me.com>
Date:   2021-10-18T07:21:24.000Z

    14154 zpool should call zfs_nicestrtonum() with non-NULL handle
    Reviewed by: Yuri Pankov <ypankov@tintri.com>
    Reviewed by: Ryan Zezeski <ryan@oxide.computer>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Actions

Also available in: Atom PDF