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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <47E3148E.1080205@cn.fujitsu.com>
Date:	Fri, 21 Mar 2008 09:51:10 +0800
From:	Wei Yongjun <yjwei@...fujitsu.com>
To:	Vlad Yasevich <vladislav.yasevich@...com>
CC:	lksctp-developers@...ts.sourceforge.net, netdev@...r.kernel.org,
	David Miller <davem@...emloft.net>
Subject: Re: [PATCH] SCTP: Fix sctp_auth_asoc_get_hmac() to avoid kernel panic

Hi Vlad:

Vlad Yasevich wrote:
> Hi Wei
>
> Wei Yongjun wrote:
>> If association is setup with HMAC-ALGO parameter in which there is no 
>> HMAC algorithm supported by the endpoint, send a chunk with AUTH will 
>> cause kernel panic.
>>
>> This is because  when send chunk with AUTH, sctp_auth_asoc_get_hmac() 
>> will be used to get the hmac. In this function, if the HMAC-ALGO is 
>> empty, it return NULL. If is not empty, it will find a valid hmac for 
>> using. But if all of the HMAC-ALGOs is not supported by endpoint, it 
>> will return a bogus pointer, not expected NULL pointer.
>
> This is a workaround, but this problem must never never happen.

This can happened under attack. I have a test case to found this problem.

> RFC 4890 has the following text:
>
>   The HMAC algorithm based on SHA-1 MUST be supported and
>   included in the HMAC-ALGO parameter.
>
> As a result, we need to check in sctp_verify_param() that HMAC_SHA1 is
> present in the list.  If not, we should probably treat this as a protocol
> violation.
>
> It should also be a protocol violation if the HMAC parameter is empty.

Agree, I will make a patch to fix this.

>
> That could almost remove the need for the sctp-auth_asoc_get_hmac() 
> function.

If we do the above check, this function can be removed. I do a test 
after the new patch is create.


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