Project

General

Profile

Actions

Bug #11696

closed

loader: scan_buffer can leave empty string on stack

Added by Toomas Soome almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
bootloader
Start date:
Due date:
% Done:

100%

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

Description

When file is processed, we can (and will) get string with lenght 0 on stack, that will result in attempt to allocate 0 bytes.

Testing done: when malloc(0) will return NULL, we will hit this issue, tested by install+boot we do not get bitten by the issue. Also fixed in FreeBSD.


Related issues

Related to illumos gate - Feature #11697: loader: Malloc(0) should return NULL.ClosedToomas Soome

Actions
Actions #1

Updated by Toomas Soome almost 3 years ago

  • Related to Feature #11697: loader: Malloc(0) should return NULL. added
Actions #2

Updated by Electric Monk almost 3 years ago

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

git commit e141bae1eadd4373d692c722ab88dff7d998a3b8

commit  e141bae1eadd4373d692c722ab88dff7d998a3b8
Author: Toomas Soome <tsoome@me.com>
Date:   2019-09-17T20:11:21.000Z

    11696 loader: scan_buffer can leave empty string on stack
    Reviewed by: Rob Johnston <rob.johnston@joyent.com>
    Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF