Linux Kernel 'fs/btrfs/ioctl.c'本地特权提升漏洞(CNVD-2011-0541)

admin 2023-12-26 11:47:13 Ali_nonvd 来源:ZONE.CI 全球网 0 阅读模式
Linux Kernel 'fs/btrfs/ioctl.c'本地特权提升漏洞(CNVD-2011-0541)

CVE编号

N/A

利用情况

暂无

补丁情况

N/A

披露时间

2011-02-10
漏洞描述
Linux是一款开放源代码的操作系统。space_args.space_slots为可由非特权调用控制的无符号64位类型。与符号整数类型对比时允许提供负值,导致分配过小的大小或截断为0.通过提供会截断为0的大小参数,kmalloc()会返回ZERO_SIZE_PTR。也可以提供小于slot的值,后续拷贝数据时循环操作会忽略分配大小,造成堆溢出或写入ZERO_SIZE_PTR。
解决建议
用户可参考如下供应商提供的安全补丁:--- fs/btrfs/ioctl.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.cindex 02d224e..f1a43df 100644--- a/fs/btrfs/ioctl.c+++ b/fs/btrfs/ioctl.c@@ -2208,7 +2208,7 @@ long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg) int num_types = 4; int alloc_size; int ret = 0;- int slot_count = 0;+ u64 slot_count = 0; int i, c; if (copy_from_user(&space_args,@@ -2247,7 +2247,7 @@ long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg) goto out; } - slot_count = min_t(int, space_args.space_slots, slot_count);+ slot_count = min_t(u64, space_args.space_slots, slot_count); alloc_size = sizeof(*dest) * slot_count; @@ -2267,6 +2267,12 @@ long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg) for (i = 0; i < num_types; i++) { struct btrfs_space_info *tmp; + /* Don't copy in more than we allocated */+ if (!slot_count)+ break;++ slot_count--;+ info = NULL; rcu_read_lock(); list_for_each_entry_rcu(tmp, &root->fs_info->space_info,--
参考链接
https://www.cnvd.org.cn/flaw/show/CNVD-2011-0541
CVSS3评分 N/A
  • 攻击路径 N/A
  • 攻击复杂度 N/A
  • 权限要求 N/A
  • 影响范围 N/A
  • 用户交互 N/A
  • 可用性 N/A
  • 保密性 N/A
  • 完整性 N/A
N/A
CWE-ID 漏洞类型
- avd.aliyun.com
weinxin
版权声明
本站原创文章转载请注明文章出处及链接,谢谢合作!
评论:0   参与:  0