漏洞标题
io_uring/net: 在 io_recvmsg_mshot_prep() 中修复溢出检查
漏洞描述信息
在Linux内核中,已经解决了一个以下漏洞:
io_uring/net: 在io_recvmsg_mshot_prep()中修复溢出检查。
"controllen"变量的类型为size_t(unsigned long)。将其转换为int可能导致整数下溢。
check_add_overflow()函数考虑了目标的类型,即int类型。如果我们对两个正数值进行相加,如果结果无法放入整数中,则视为溢出。
但是,如果我们将"controllen"转换为int并将其变为负数,则负数 *可以*放入int类型中,因此没有溢出。
正确:100 + (unsigned long)-4 = 96 <-- 溢出
不正确:100 + (int)-4 = 96 <-- 没有溢出
我还将sizeof()的转换删除了。这不是错误,但是转换是不必要的。
CVSS信息
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
漏洞类别
整数下溢(超界折返)
漏洞标题
io_uring/net: fix overflow check in io_recvmsg_mshot_prep()
漏洞描述信息
In the Linux kernel, the following vulnerability has been resolved:
io_uring/net: fix overflow check in io_recvmsg_mshot_prep()
The "controllen" variable is type size_t (unsigned long). Casting it
to int could lead to an integer underflow.
The check_add_overflow() function considers the type of the destination
which is type int. If we add two positive values and the result cannot
fit in an integer then that's counted as an overflow.
However, if we cast "controllen" to an int and it turns negative, then
negative values *can* fit into an int type so there is no overflow.
Good: 100 + (unsigned long)-4 = 96 <-- overflow
Bad: 100 + (int)-4 = 96 <-- no overflow
I deleted the cast of the sizeof() as well. That's not a bug but the
cast is unnecessary.
CVSS信息
N/A
漏洞类别
N/A
漏洞标题
Linux kernel 安全漏洞
漏洞描述信息
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel 存在安全漏洞,该漏洞源于 io_uring/net 的溢出检查存在问题。
CVSS信息
N/A
漏洞类别
其他