lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:	Thu,  1 Oct 2009 11:53:13 +0200 (CEST)
From:	Tilman Schmidt <tilman@...p.cc>
To:	Karsten Keil <isdn@...ux-pingi.de>,
	Karsten Keil <keil@...systems.de>
CC:	Hansjoerg Lipp <hjlipp@....de>, davem@...emloft.net,
	i4ldeveloper@...tserv.isdn4linux.de, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] gigaset/CAPI: accept any number type/plan

Be more liberal in accepting CAPI CONNECT_REQ message parameters
Called Party Number and Calling Party Number:
* Accept Numbering plan "ISDN/Telephony" as supported.
* Ignore unsupported values for Type of number, Numbering plan,
  Presentation indicator and Screening indicator with a warning
  instead of rejecting the entire request.

Signed-off-by: Tilman Schmidt <tilman@...p.cc>
---
A second small fix to the new Gigaset CAPI interface resulting from
testing with more applications. Please tell me if you'd prefer me
to reissue "[PATCH 12/12] gigaset: add Kernel CAPI interface" with
both fixes folded in.

 drivers/isdn/gigaset/capi.c |   29 ++++++++++++++++-------------
 1 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c
index 8afff37..c276a92 100644
--- a/drivers/isdn/gigaset/capi.c
+++ b/drivers/isdn/gigaset/capi.c
@@ -1236,12 +1236,14 @@ static void do_connect_req(struct gigaset_capi_ctr *iif,
 		goto error;
 	}
 	l = *pp++;
-	/* check number type/numbering plan byte */
-	if (*pp != 0x80) {
+	/* check type of number/numbering plan byte */
+	switch (*pp) {
+	case 0x80:	/* unknown type / unknown numbering plan */
+	case 0x81:	/* unknown type / ISDN/Telephony numbering plan */
+		break;
+	default:	/* others: warn about potential misinterpretation */
 		dev_notice(cs->dev, "%s: %s type/plan 0x%02x unsupported\n",
 			   "CONNECT_REQ", "Called party number", *pp);
-		info = CapiIllMessageParmCoding;
-		goto error;
 	}
 	pp++;
 	l--;
@@ -1266,26 +1268,28 @@ static void do_connect_req(struct gigaset_capi_ctr *iif,
 	if (pp != NULL && *pp > 0) {
 		l = *pp++;
 
-		/* check number type/numbering plan byte */
-		if (*pp) {
-			/* ToDo: allow for Ext=1? */
+		/* check type of number/numbering plan byte */
+		/* ToDo: handle Ext=1? */
+		switch (*pp) {
+		case 0x00:	/* unknown type / unknown numbering plan */
+		case 0x01:	/* unknown type / ISDN/Telephony num. plan */
+			break;
+		default:
 			dev_notice(cs->dev,
 				   "%s: %s type/plan 0x%02x unsupported\n",
 				   "CONNECT_REQ", "Calling party number", *pp);
-			info = CapiIllMessageParmCoding;
-			goto error;
 		}
 		pp++;
 		l--;
 
-		/* check presentation/screening indicator */
+		/* check presentation indicator */
 		if (!l) {
 			dev_notice(cs->dev, "%s: %s IE truncated\n",
 				   "CONNECT_REQ", "Calling party number");
 			info = CapiIllMessageParmCoding;
 			goto error;
 		}
-		switch (*pp) {
+		switch (*pp & 0xfc) { /* ignore Screening indicator */
 		case 0x80:	/* Presentation allowed */
 			s = "^SCLIP=1\r";
 			break;
@@ -1297,8 +1301,7 @@ static void do_connect_req(struct gigaset_capi_ctr *iif,
 				   "CONNECT_REQ",
 				   "Presentation/Screening indicator",
 				   *pp);
-			info = CapiIllMessageParmCoding;
-			goto error;
+			s = "^SCLIP=1\r";
 		}
 		commands[AT_CLIP] = kstrdup(s, GFP_KERNEL);
 		if (!commands[AT_CLIP])
-- 
1.6.2.1.214.ge986c

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ