漏洞标题
iio: buffer: 在IIO_BUFFER_GET_FD_IOCTL中修复与文件相关的错误处理
漏洞描述信息
N/A
CVSS信息
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N
漏洞类别
内存缓冲区边界内操作的限制不恰当
漏洞标题
iio: buffer: Fix file related error handling in IIO_BUFFER_GET_FD_IOCTL
漏洞描述信息
In the Linux kernel, the following vulnerability has been resolved:
iio: buffer: Fix file related error handling in IIO_BUFFER_GET_FD_IOCTL
If we fail to copy the just created file descriptor to userland, we
try to clean up by putting back 'fd' and freeing 'ib'. The code uses
put_unused_fd() for the former which is wrong, as the file descriptor
was already published by fd_install() which gets called internally by
anon_inode_getfd().
This makes the error handling code leaving a half cleaned up file
descriptor table around and a partially destructed 'file' object,
allowing userland to play use-after-free tricks on us, by abusing
the still usable fd and making the code operate on a dangling
'file->private_data' pointer.
Instead of leaving the kernel in a partially corrupted state, don't
attempt to explicitly clean up and leave this to the process exit
path that'll release any still valid fds, including the one created
by the previous call to anon_inode_getfd(). Simply return -EFAULT to
indicate the error.
CVSS信息
N/A
漏洞类别
N/A
漏洞标题
Linux kernel 安全漏洞
漏洞描述信息
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel 存在安全漏洞,该漏洞源于iio模块中发现文件相关错误处理问题。在IIO_BUFFER_GET_FD_IOCTL中,如果无法将新创建的文件描述符复制到用户空间,错误处理代码会尝试使用put_unused_fd函数进行清理。
CVSS信息
N/A
漏洞类别
其他