netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] rds: prevent dereference of a NULL device in rds_iw_laddr_check
@ 2014-03-30  0:39 Sasha Levin
  2014-03-31 20:26 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Sasha Levin @ 2014-03-30  0:39 UTC (permalink / raw)
  To: chien.yen, davem; +Cc: rds-devel, netdev, linux-kernel, Sasha Levin

Binding might result in a NULL device which is later dereferenced
without checking.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
 net/rds/iw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/rds/iw.c b/net/rds/iw.c
index 7826d46..0298920 100644
--- a/net/rds/iw.c
+++ b/net/rds/iw.c
@@ -239,7 +239,8 @@ static int rds_iw_laddr_check(__be32 addr)
 	ret = rdma_bind_addr(cm_id, (struct sockaddr *)&sin);
 	/* due to this, we will claim to support IB devices unless we
 	   check node_type. */
-	if (ret || cm_id->device->node_type != RDMA_NODE_RNIC)
+	if (ret || !cm_id->device ||
+	    cm_id->device->node_type != RDMA_NODE_RNIC)
 		ret = -EADDRNOTAVAIL;
 
 	rdsdebug("addr %pI4 ret %d node type %d\n",
-- 
1.8.3.2

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

* Re: [PATCH v2] rds: prevent dereference of a NULL device in rds_iw_laddr_check
  2014-03-30  0:39 [PATCH v2] rds: prevent dereference of a NULL device in rds_iw_laddr_check Sasha Levin
@ 2014-03-31 20:26 ` David Miller
  2014-04-04 14:31   ` Luís Henriques
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2014-03-31 20:26 UTC (permalink / raw)
  To: sasha.levin; +Cc: chien.yen, rds-devel, netdev, linux-kernel

From: Sasha Levin <sasha.levin@oracle.com>
Date: Sat, 29 Mar 2014 20:39:35 -0400

> Binding might result in a NULL device which is later dereferenced
> without checking.
> 
> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>

Applied, thanks Sasha.

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

* Re: [PATCH v2] rds: prevent dereference of a NULL device in rds_iw_laddr_check
  2014-03-31 20:26 ` David Miller
@ 2014-04-04 14:31   ` Luís Henriques
  2014-04-04 14:44     ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Luís Henriques @ 2014-04-04 14:31 UTC (permalink / raw)
  To: David Miller; +Cc: sasha.levin, chien.yen, rds-devel, netdev, linux-kernel

Hi David,

On Mon, Mar 31, 2014 at 04:26:07PM -0400, David Miller wrote:
> From: Sasha Levin <sasha.levin@oracle.com>
> Date: Sat, 29 Mar 2014 20:39:35 -0400
> 
> > Binding might result in a NULL device which is later dereferenced
> > without checking.
> > 
> > Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
> 
> Applied, thanks Sasha.
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

This is very similar to c2349758acf1874e4c2b93fe41d072336f1a31d0 ("rds:
prevent dereference of a NULL device"), which you've queued for stable.

Could you please queue this one for stable as well?  (Looks like it even
has CVE-2014-2678 assigned to it.)

Cheers,
--
Luís

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

* Re: [PATCH v2] rds: prevent dereference of a NULL device in rds_iw_laddr_check
  2014-04-04 14:31   ` Luís Henriques
@ 2014-04-04 14:44     ` David Miller
  2014-04-04 14:45       ` Luís Henriques
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2014-04-04 14:44 UTC (permalink / raw)
  To: luis.henriques; +Cc: sasha.levin, chien.yen, rds-devel, netdev, linux-kernel

From: Luís Henriques <luis.henriques@canonical.com>
Date: Fri, 4 Apr 2014 15:31:36 +0100

> Could you please queue this one for stable as well?  (Looks like it even
> has CVE-2014-2678 assigned to it.)

Done.

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

* Re: [PATCH v2] rds: prevent dereference of a NULL device in rds_iw_laddr_check
  2014-04-04 14:44     ` David Miller
@ 2014-04-04 14:45       ` Luís Henriques
  0 siblings, 0 replies; 5+ messages in thread
From: Luís Henriques @ 2014-04-04 14:45 UTC (permalink / raw)
  To: David Miller; +Cc: sasha.levin, chien.yen, rds-devel, netdev, linux-kernel

On Fri, Apr 04, 2014 at 10:44:26AM -0400, David Miller wrote:
> From: Luís Henriques <luis.henriques@canonical.com>
> Date: Fri, 4 Apr 2014 15:31:36 +0100
> 
> > Could you please queue this one for stable as well?  (Looks like it even
> > has CVE-2014-2678 assigned to it.)
> 
> Done.

That was fast!  Thanks :)

Cheers,
--
Luís

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

end of thread, other threads:[~2014-04-04 14:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-30  0:39 [PATCH v2] rds: prevent dereference of a NULL device in rds_iw_laddr_check Sasha Levin
2014-03-31 20:26 ` David Miller
2014-04-04 14:31   ` Luís Henriques
2014-04-04 14:44     ` David Miller
2014-04-04 14:45       ` Luís Henriques

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).