Skip to content

Commit 238a807

Browse files
SantoshShilimkarLinuxMinion
authored andcommitted
RDS: don't commit to queue till transport connection is up
A rouge application can flood the send queue by targeting a dead or non-existing node. Don't commit any messages to the queue till the legitimate connection to the peer is established. Let application retry so that only legit connections can get on to the send queue. Orabug: 25393611 Reviewed-by: Sowmini Varadhan <[email protected]> Signed-off-by: Santosh Shilimkar <[email protected]>
1 parent 7692cb8 commit 238a807

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

net/rds/send.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,6 +1388,11 @@ int rds_sendmsg(struct socket *sock, struct msghdr *msg, size_t payload_len)
13881388
goto out;
13891389
}
13901390

1391+
if (!rds_conn_up(conn)) {
1392+
ret = -EAGAIN;
1393+
goto out;
1394+
}
1395+
13911396
while (!rds_send_queue_rm(rs, conn, rm, rs->rs_bound_port,
13921397
dport, &queued)) {
13931398
rds_stats_inc(s_send_queue_full);

0 commit comments

Comments
 (0)