漏洞信息
# atm:如果 copy_from_iter_full() 失败则恢复 atm_account_tx()
## 漏洞概述
在Linux内核中,`vcc_sendmsg()`函数未能在`copy_from_iter_full()`失败时回滚对`sk->sk_wmem_alloc`的修改,导致内存泄漏。
## 影响版本
该漏洞存在于使用上述代码逻辑的所有Linux内核版本中,具体版本号未指明。
## 细节
在`vcc_sendmsg()`函数中,通过`atm_account_tx()`将`skb->truesize`添加到`sk->sk_wmem_alloc`。该修改预期在稍后的`vcc->dev->ops->send(vcc, skb)`调用中由`atm_pop_raw()`进行回滚。然而,当`copy_from_iter_full()`失败时,没有执行回滚操作,导致内存泄漏。
建议将回滚部分作为`atm_return_tx()`并调用它来处理失败路径。
## 影响
该漏洞可能导致内存泄漏,从而影响系统稳定性和性能。
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
atm: Revert atm_account_tx() if copy_from_iter_full() fails.
漏洞描述信息
In the Linux kernel, the following vulnerability has been resolved:
atm: Revert atm_account_tx() if copy_from_iter_full() fails.
In vcc_sendmsg(), we account skb->truesize to sk->sk_wmem_alloc by
atm_account_tx().
It is expected to be reverted by atm_pop_raw() later called by
vcc->dev->ops->send(vcc, skb).
However, vcc_sendmsg() misses the same revert when copy_from_iter_full()
fails, and then we will leak a socket.
Let's factorise the revert part as atm_return_tx() and call it in
the failure path.
Note that the corresponding sk_wmem_alloc operation can be found in
alloc_tx() as of the blamed commit.
$ git blame -L:alloc_tx net/atm/common.c c55fa3cccbc2c~
CVSS信息
N/A
漏洞类别
N/A
漏洞标题
Linux kernel 安全漏洞
漏洞描述信息
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于未回滚内存计数,可能导致内存泄漏。
CVSS信息
N/A
漏洞类别
其他