Bug #9230
zone_getattr(ZONE_ATTR_NETWORK) doesn't check user-supplied buffer size
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
History
Updated by Andy Fiddaman almost 2 years ago
- Related to Bug #9228: zone_getattr(ZONE_ATTR_NETWORK) returns uninitialised value added
Updated by Joshua M. Clulow almost 2 years 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
Updated by Electric Monk almost 2 years 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>