Project

General

Profile

Bug #9230

zone_getattr(ZONE_ATTR_NETWORK) doesn't check user-supplied buffer size

Added by Andy Fiddaman over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
zones
Start date:
2018-03-04
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

Unlike the getters for other zone attributes, the userspace supplied buffer size is passed directly to kmem_alloc()for ZONE_ATTR_NETWORK.
The setter for this constrains the buffer size to PIPE_BUF + sizeof(zone_net_data_t) so it seems reasonable to do the same here.
As with the other getters, just reset the buffer size to the maximum rather than returning an error.


Related issues

Related to illumos gate - Bug #9228: zone_getattr(ZONE_ATTR_NETWORK) returns uninitialised valueClosed2018-03-04

Actions

History

#1

Updated by Andy Fiddaman over 1 year ago

  • Related to Bug #9228: zone_getattr(ZONE_ATTR_NETWORK) returns uninitialised value added
#2

Updated by Joshua M. Clulow over 1 year ago

  • Subject changed from zone_getattr(ZONE_ATTR_NETWORK) doesn't check user-supplied buffer size. to zone_getattr(ZONE_ATTR_NETWORK) doesn't check user-supplied buffer size
#3

Updated by Electric Monk over 1 year ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 66d7818b6a24876c96bdd1a81986c017f368decd

commit  66d7818b6a24876c96bdd1a81986c017f368decd
Author: Andy Fiddaman <omnios@citrus-it.co.uk>
Date:   2018-03-11T06:14:24.000Z

    9228 zone_getattr(ZONE_ATTR_NETWORK) returns uninitialised value
    9230 zone_getattr(ZONE_ATTR_NETWORK) doesn't check user-supplied buffer size
    Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
    Reviewed by: John Levon <john.levon@joyent.com>
    Reviewed by: Dominik Hassler <hadfl@omniosce.org>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: C Fraire <cfraire@me.com>
    Approved by: Joshua M. Clulow <josh@sysmgr.org>

Also available in: Atom PDF