RDS tcp loopback connection can hang
stable inclusion from stable-v5.10.44 commit e806df71eed223ab8ca099c61a41f3e9a576733f bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=465 CVE: NA ------------------------------------------------- [ Upstream commit aced3ce5 ] When TCP is used as transport and a program on the system connects to RDS port 16385, connection is accepted but denied per the rules of RDS. However, RDS connections object is left in the list. Next loopback connection will select that connection object as it is at the head of list. The connection attempt will hang as the connection object is set to connect over TCP which is not allowed The issue can be reproduced easily, use rds-ping to ping a local IP address. After that use any program like ncat to connect to the same IP address and port 16385. This will hang so ctrl-c out. Now try rds-ping, it will hang. To fix the issue this patch adds checks to disallow the connection object creation and destroys the connection object. Signed-off-by: NRao Shoaib <rao.shoaib@oracle.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: N1808548227 <1808548227@qq.com> Reviewed-by: NJian Cheng <cj.chengjian@huawei.com> Signed-off-by: NWang ShaoBo <bobo.shaobowang@huawei.com>
Showing
想要评论请 注册 或 登录