RAVENPLAT-2379:OSS vulnerability found in [boot.img]:[linux_kernel] (CVE-2018-5390...
authorHanjie Lin <hanjie.lin@amlogic.com>
Mon, 12 Aug 2019 11:35:42 +0000 (19:35 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Wed, 18 Sep 2019 06:17:53 +0000 (23:17 -0700)
commit8663100e9d5986889b7d5939832ba03d21e9667d
tree679ec6f45d2e2e7aea437a04cae7f8c73764e4e4
parent63f5c4559ecd693f230ef490254decb9ca5e514d
RAVENPLAT-2379:OSS vulnerability found in [boot.img]:[linux_kernel] (CVE-2018-5390) Risk:[] [1/1]

PD#OTT-5669

[Problem]
Linux kernel versions 4.9+ can be forced to make very expensive calls
to tcp_collapse_ofo_queue() and tcp_prune_ofo_queue() for every incoming
packet which can lead to a denial of service.

[Solution]
Juha-Matti Tilli reported that malicious peers could inject tiny
packets in out_of_order_queue, forcing very expensive calls
to tcp_collapse_ofo_queue() and tcp_prune_ofo_queue() for
every incoming packet.
With tcp_rmem[2] default of 6MB, the ooo queue could
contain ~7000 nodes.
This patch series makes sure we cut cpu cycles enough to
render the attack not critical.
We might in the future go further, like disconnecting
or black-holing proven malicious flows.

[Test]

Change-Id: I09c72cd11a38516f3b6e293deb21c5dd0faa3d9e
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
net/ipv4/tcp_input.c