diff options
author | Igor Kozhukhov <[email protected]> | 2016-06-15 14:28:36 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-06-28 13:47:03 -0700 |
commit | eca7b76001a7d33f78bd98884aef8325bdbf98e7 (patch) | |
tree | bdcd0489c5a6c7840258c4c6063c9a4903bec256 /include/sys/fs/zfs.h | |
parent | 43e52eddb13d8accbd052fac9a242ce979531aa4 (diff) |
OpenZFS 6314 - buffer overflow in dsl_dataset_name
Reviewed by: George Wilson <[email protected]>
Reviewed by: Prakash Surya <[email protected]>
Reviewed by: Igor Kozhukhov <[email protected]>
Approved by: Dan McDonald <[email protected]>
Ported-by: Brian Behlendorf <[email protected]>
OpenZFS-issue: https://www.illumos.org/issues/6314
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/d6160ee
Diffstat (limited to 'include/sys/fs/zfs.h')
-rw-r--r-- | include/sys/fs/zfs.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/sys/fs/zfs.h b/include/sys/fs/zfs.h index e802454b9..b25d3016a 100644 --- a/include/sys/fs/zfs.h +++ b/include/sys/fs/zfs.h @@ -67,9 +67,13 @@ typedef enum dmu_objset_type { #define ZFS_TYPE_DATASET \ (ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME | ZFS_TYPE_SNAPSHOT) +/* + * All of these include the terminating NUL byte. + */ #define ZAP_MAXNAMELEN 256 #define ZAP_MAXVALUELEN (1024 * 8) #define ZAP_OLDMAXVALUELEN 1024 +#define ZFS_MAX_DATASET_NAME_LEN 256 /* * Dataset properties are identified by these constants and must be added to @@ -1019,7 +1023,7 @@ typedef enum zfs_ioc { /* * zvol ioctl to get dataset name */ -#define BLKZNAME _IOR(0x12, 125, char[ZFS_MAXNAMELEN]) +#define BLKZNAME _IOR(0x12, 125, char[ZFS_MAX_DATASET_NAME_LEN]) /* * Internal SPA load state. Used by FMA diagnosis engine. |