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>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181226064032.75800-1-kjlu@umn.edu>
Date:   Wed, 26 Dec 2018 00:40:32 -0600
From:   Kangjie Lu <kjlu@....edu>
To:     kjlu@....edu
Cc:     pakki001@....edu, Armin Schindler <mac@...ware.de>,
        Karsten Keil <isdn@...ux-pingi.de>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] isdn: eicon: fix a missing check of api_parse

api_parse can fail, and if it fails, we should not use the ss_parms
which can be incorrect.
The fix checks its return value and stops using ss_parms if api_parse
fails.

Signed-off-by: Kangjie Lu <kjlu@....edu>
---
 drivers/isdn/hardware/eicon/message.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/isdn/hardware/eicon/message.c b/drivers/isdn/hardware/eicon/message.c
index def7992a38e6..afb4a7d88288 100644
--- a/drivers/isdn/hardware/eicon/message.c
+++ b/drivers/isdn/hardware/eicon/message.c
@@ -1846,7 +1846,13 @@ static byte facility_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
 				break;
 
 			case S_HOLD:
-				api_parse(&parms->info[1], (word)parms->length, "ws", ss_parms);
+				if (api_parse(&parms->info[1],
+							(word)parms->length,
+							"ws", ss_parms)) {
+					dbug(1, dprintf("format wrong"));
+					Info = _WRONG_MESSAGE_FORMAT;
+					break;
+				}
 				if (plci && plci->State && plci->SuppState == IDLE)
 				{
 					plci->SuppState = HOLD_REQUEST;
-- 
2.17.2 (Apple Git-113)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ