linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rds: Error on offset mismatch if not loopback
@ 2012-09-21 21:32 John Jolly
  2012-09-21 21:38 ` Venkat Venkatsubra
  2012-09-22 19:25 ` David Miller
  0 siblings, 2 replies; 18+ messages in thread
From: John Jolly @ 2012-09-21 21:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: venkat.x.venkatsubra, netdev

Attempting an rds connection from the IP address of an IPoIB interface
to itself causes a kernel panic due to a BUG_ON() being triggered.
Making the test less strict allows rds-ping to work without crashing
the machine.

A local unprivileged user could use this flaw to crash the system.

Signed-off-by: John Jolly <jjolly@suse.com>
---
 net/rds/ib_send.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/rds/ib_send.c b/net/rds/ib_send.c
index e590949..7920c85 100644
--- a/net/rds/ib_send.c
+++ b/net/rds/ib_send.c
@@ -544,7 +544,7 @@ int rds_ib_xmit(struct rds_connection *conn, struct rds_message *rm,
        int flow_controlled = 0;
        int nr_sig = 0;
 
-       BUG_ON(off % RDS_FRAG_SIZE);
+       BUG_ON(!conn->c_loopback && off % RDS_FRAG_SIZE);
        BUG_ON(hdr_off != 0 && hdr_off != sizeof(struct rds_header));
 
        /* Do not send cong updates to IB loopback */
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 18+ messages in thread
* [PATCH] rds: Error on offset mismatch if not loopback
@ 2012-09-20  7:11 John Jolly
  2012-09-21 17:20 ` David Miller
  0 siblings, 1 reply; 18+ messages in thread
From: John Jolly @ 2012-09-20  7:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: Venkat Venkatsubra, netdev

Attempting an rds connection from the IP address of an IPoIB interface
to itself causes a kernel panic due to a BUG_ON() being triggered. Making
the test less strict allows rds-ping to work without crashing the machine.

A local unprivileged user could use this flaw to crash the sytem.
---
 net/rds/ib_send.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/rds/ib_send.c b/net/rds/ib_send.c
index e590949..7920c85 100644
--- a/net/rds/ib_send.c
+++ b/net/rds/ib_send.c
@@ -544,7 +544,7 @@ int rds_ib_xmit(struct rds_connection *conn, struct rds_message *rm,
 	int flow_controlled = 0;
 	int nr_sig = 0;
 
-	BUG_ON(off % RDS_FRAG_SIZE);
+	BUG_ON(!conn->c_loopback && off % RDS_FRAG_SIZE);
 	BUG_ON(hdr_off != 0 && hdr_off != sizeof(struct rds_header));
 
 	/* Do not send cong updates to IB loopback */
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-11-20 21:28 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-21 21:32 [PATCH] rds: Error on offset mismatch if not loopback John Jolly
2012-09-21 21:38 ` Venkat Venkatsubra
2012-09-22 19:25 ` David Miller
     [not found]   ` <CAKA=qzac9=UhLF_Z4FnnH+sR7xvkDux4oayC6dPYe=hMLsDxRg@mail.gmail.com>
2013-11-13  4:24     ` Josh Hunt
2013-11-13 15:16       ` Venkat Venkatsubra
2013-11-13 17:40         ` Josh Hunt
2013-11-14  0:55           ` Honggang LI
2013-11-14  1:27             ` Josh Hunt
2013-11-14 13:43             ` Venkat Venkatsubra
2013-11-15  2:32               ` Honggang LI
2013-11-19 23:33                 ` Venkat Venkatsubra
2013-11-20 18:09                   ` Venkat Venkatsubra
2013-11-20 18:54                     ` David Miller
2013-11-20 21:28                       ` Venkat Venkatsubra
2013-11-13  6:09     ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2012-09-20  7:11 John Jolly
2012-09-21 17:20 ` David Miller
2012-09-21 21:28   ` John Jolly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).