Linux-SCTP Archive mirror
 help / color / mirror / Atom feed
From: Ashwin Dayanand Kamat <kashwindayan@vmware.com>
To: Xin Long <lucien.xin@gmail.com>
Cc: Simon Horman <simon.horman@corigine.com>,
	Vlad Yasevich <vyasevich@gmail.com>,
	Neil Horman <nhorman@tuxdriver.com>,
	Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"linux-sctp@vger.kernel.org" <linux-sctp@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Alexey Makhalov <amakhalov@vmware.com>,
	Vasavi Sirnapalli <vsirnapalli@vmware.com>,
	Ajay Kaher <akaher@vmware.com>, Tapas Kundu <tkundu@vmware.com>,
	Keerthana Kalyanasundaram <keerthanak@vmware.com>
Subject: Re: [PATCH v3] net/sctp: Make sha1 as default algorithm if fips is enabled
Date: Thu, 22 Jun 2023 14:54:23 +0000	[thread overview]
Message-ID: <7BD8EC18-86EA-411B-9155-8A7633747C7F@vmware.com> (raw)
In-Reply-To: <CADvbK_fCPPHto4XjPeTJPJ9NTXoJGgO7jjEcy1Bq3nQSFAzR9A@mail.gmail.com>



> On 03-Jun-2023, at 4:46 AM, Xin Long <lucien.xin@gmail.com> wrote:
> 
> !! External Email
> 
> On Fri, Jun 2, 2023 at 11:15 AM Simon Horman <simon.horman@corigine.com> wrote:
>> 
>> + Xin Long
>> 
>> On Thu, Jun 01, 2023 at 11:47:54PM +0530, Ashwin Dayanand Kamat wrote:
>>> MD5 is not FIPS compliant. But still md5 was used as the
>>> default algorithm for sctp if fips was enabled.
>>> Due to this, listen() system call in ltp tests was
>>> failing for sctp in fips environment, with below error message.
>>> 
>>> [ 6397.892677] sctp: failed to load transform for md5: -2
>>> 
>>> Fix is to not assign md5 as default algorithm for sctp
>>> if fips_enabled is true. Instead make sha1 as default algorithm.
>>> The issue fixes ltp testcase failure "cve-2018-5803 sctp_big_chunk"
> Hi, Ashwin,
> 
> I have the same question as Paolo about "this patch gets fips compliance
> _disabling_ the encryption", is it from any standard?
> 
> If not,  can't you fix the ltp testcase for fips environment by sysctl?
> or set 'CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1=y' instead in config.
> 
> Sorry if I don't understand this well. You're trying to avoid SCTP code
> calling crypto_alloc_shash(MD5), right? What about other places
> where it may also do it in kernel? (where ltp just doesn't cover)
> 
> I don't think it makes sense to let SCTP have some code reply on
> FIPS only to make ltp testcase happy, while we can actually fix it
> in ltp by "sysctl".
> 
> Thanks.
> 
Hi Xi,
Thanks for your inputs. I have sent the patches to ltp upstream to handle the fix from ltp codebase.

Regards,
Ashwin Kamat
>>> 
>>> Signed-off-by: Ashwin Dayanand Kamat <kashwindayan@vmware.com>
>>> ---
>>> v3:
>>> * Resolved hunk failures.
>>> * Changed the ratelimited notice to be more meaningful.
>>> * Used ternary condition for if/else condtion.
>>> v2:
>>> * The listener can still fail if fips mode is enabled after
>>>  that the netns is initialized.
>>> * Fixed this in sctp_listen_start() as suggested by
>>>  Paolo Abeni <pabeni@redhat.com>
>> 
>> FWIIW, this seems reasonable to me.
>> 
>> Reviewed-by: Simon Horman <simon.horman@corigine.com>
> 
> !! External Email: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender.


      reply	other threads:[~2023-06-22 14:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-01 18:17 [PATCH v3] net/sctp: Make sha1 as default algorithm if fips is enabled Ashwin Dayanand Kamat
2023-06-02 15:15 ` Simon Horman
2023-06-02 23:16   ` Xin Long
2023-06-22 14:54     ` Ashwin Dayanand Kamat [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7BD8EC18-86EA-411B-9155-8A7633747C7F@vmware.com \
    --to=kashwindayan@vmware.com \
    --cc=akaher@vmware.com \
    --cc=amakhalov@vmware.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=keerthanak@vmware.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sctp@vger.kernel.org \
    --cc=lucien.xin@gmail.com \
    --cc=marcelo.leitner@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=pabeni@redhat.com \
    --cc=simon.horman@corigine.com \
    --cc=tkundu@vmware.com \
    --cc=vsirnapalli@vmware.com \
    --cc=vyasevich@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).