[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100316172048.CBC5240116@xenon.ts.pxnet.com>
Date: Tue, 16 Mar 2010 18:04:01 +0100
From: Tilman Schmidt <tilman@...p.cc>
To: Karsten Keil <isdn@...ux-pingi.de>,
David Miller <davem@...emloft.net>
CC: Dan Carpenter <error27@...il.com>, Hansjoerg Lipp <hjlipp@....de>,
isdn4linux <isdn4linux@...tserv.isdn4linux.de>,
i4ldeveloper <i4ldeveloper@...tserv.isdn4linux.de>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...nel.org
Subject: [PATCH] gigaset: correct range checking off by one error
Correct a potential array overrun due to an off by one error in the
range check on the CAPI CONNECT_REQ CIPValue parameter.
Found and reported by Dan Carpenter using smatch.
Impact: bugfix
Signed-off-by: Tilman Schmidt <tilman@...p.cc>
---
drivers/isdn/gigaset/capi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c
index 4a31962..0220c19 100644
--- a/drivers/isdn/gigaset/capi.c
+++ b/drivers/isdn/gigaset/capi.c
@@ -1301,7 +1301,7 @@ static void do_connect_req(struct gigaset_capi_ctr *iif,
}
/* check parameter: CIP Value */
- if (cmsg->CIPValue > ARRAY_SIZE(cip2bchlc) ||
+ if (cmsg->CIPValue >= ARRAY_SIZE(cip2bchlc) ||
(cmsg->CIPValue > 0 && cip2bchlc[cmsg->CIPValue].bc == NULL)) {
dev_notice(cs->dev, "%s: unknown CIP value %d\n",
"CONNECT_REQ", cmsg->CIPValue);
--
1.6.5.3.298.g39add
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists