From: Sasha Levin <sashal@kernel.org>
To: Loic <hackurx@opensec.fr>
Cc: stable@vger.kernel.org, baijiaju1990@163.com,
herbert@gondor.apana.org.au
Subject: Re: [PATCH] crypto: shash - Fix a sleep-in-atomic bug in shash_setkey_unaligned
Date: Mon, 5 Nov 2018 18:29:38 -0500 [thread overview]
Message-ID: <20181105232938.GT194472@sasha-vm> (raw)
In-Reply-To: <20181019185726.7326ffc91d414b20b2e164c6@opensec.fr>
On Fri, Oct 19, 2018 at 06:57:26PM +0200, Loic wrote:
>Hello,
>
>Please picked up this patch for linux 4.4 and 4.9.
>Compiled/tested without problem.
>
>[ Upstream commit 9039f3ef446e9ffa200200c934f049add9e58426 ]
>
>From: Jia-Ju Bai <baijiaju1990@163.com>
>Date: Tue, 3 Oct 2017 10:25:22 +0800
>Subject: [PATCH] crypto: shash - Fix a sleep-in-atomic bug in
> shash_setkey_unaligned
>
>The SCTP program may sleep under a spinlock, and the function call path is:
>sctp_generate_t3_rtx_event (acquire the spinlock)
> sctp_do_sm
> sctp_side_effects
> sctp_cmd_interpreter
> sctp_make_init_ack
> sctp_pack_cookie
> crypto_shash_setkey
> shash_setkey_unaligned
> kmalloc(GFP_KERNEL)
>
>For the same reason, the orinoco driver may sleep in interrupt handler,
>and the function call path is:
>orinoco_rx_isr_tasklet
> orinoco_rx
> orinoco_mic
> crypto_shash_setkey
> shash_setkey_unaligned
> kmalloc(GFP_KERNEL)
>
>To fix it, GFP_KERNEL is replaced with GFP_ATOMIC.
>This bug is found by my static analysis tool and my code review.
>
>Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com>
>Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Queued for 4.4 and 4.9, thank you.
--
Thanks,
Sasha
prev parent reply other threads:[~2018-11-06 8:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-19 16:57 [PATCH] crypto: shash - Fix a sleep-in-atomic bug in shash_setkey_unaligned Loic
2018-11-05 23:29 ` Sasha Levin [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=20181105232938.GT194472@sasha-vm \
--to=sashal@kernel.org \
--cc=baijiaju1990@163.com \
--cc=hackurx@opensec.fr \
--cc=herbert@gondor.apana.org.au \
--cc=stable@vger.kernel.org \
/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