Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp828951pxu; Wed, 2 Dec 2020 04:39:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJzGBBJ+UOvF0hH+3BO+GQTodyWR0sw3NTKW1+BvCUtUQzSjuJkzyablBQWWOE/brmk2uaH3 X-Received: by 2002:a17:906:38d6:: with SMTP id r22mr2083985ejd.149.1606912762901; Wed, 02 Dec 2020 04:39:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606912762; cv=none; d=google.com; s=arc-20160816; b=NmyUkcZIwqEgBAf7gu20Gt/txRmxXU/+HrAtURr0yH7SzuAToVgkgVGbDe/nhKHfB+ eeRcywrLtPSuG6McODMqEVImD0IQZbX1OGe1YuOY709zDPfgIRrwPd4YPsqlgNJGWJZc wjZSYa3p88/rAc5s4y3vApbQyD/+FDVK4Ei5OCXUrwdUXzh+AOUYaXvFbWhw+pj2pKDh P51/72H3Mo5heBxEmIc/nnMuspI+CtNeYVnIm6p65lpxHLTMrNrP2ESkpIxgo0ZR9Er1 OjE4JuWrggMLqFxqQTiHvgI1xUaiBjsQKwmDC/F43aZdR9B+SEyGnzA6IZ8iKww8ISt6 hB9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :dkim-signature; bh=A0f7UIYWFp064CWACULt8tYP7upZ4pohSmK2ru7mmpw=; b=O+JZajvEUZCndokuYSwHhy+fqsYXaqDgphIa6oqFZSxwdclPXCN1gGF7FE5jMiIVch Lju9bT2qLR50GehMSsXah0YLKSkQ8NzfY7RhwoyYbZsGibBnL7i92698XygzE6C+C2HF pbq3QcvLgn+h1IBRRSR8+ys63FrJvfDKtw+56hwuOACZ/ST1hOZMBxyrquoo1l6XEPB5 ZpHzFvhNhpLxWV+D3MLoI6B4Rt/s9Zldlkler6IJktPBMkw0E9Di1MuWglfH4W5jYHQU RvlU3YixHDPbI2Mu9ATP6FsmJ/sVlX/3G7i2fI0F0ORV6m5hj5UNwoPUDJWJmgu1mnbH 4XMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@markus-regensburg.de header.s=strato-dkim-0002 header.b="rQzmmQ/v"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id co17si933604edb.518.2020.12.02.04.38.49; Wed, 02 Dec 2020 04:39:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@markus-regensburg.de header.s=strato-dkim-0002 header.b="rQzmmQ/v"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726134AbgLBMid (ORCPT + 99 others); Wed, 2 Dec 2020 07:38:33 -0500 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.160]:34086 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725859AbgLBMid (ORCPT ); Wed, 2 Dec 2020 07:38:33 -0500 X-Greylist: delayed 548 seconds by postgrey-1.27 at vger.kernel.org; Wed, 02 Dec 2020 07:38:19 EST DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1606912468; s=strato-dkim-0002; d=markus-regensburg.de; h=In-Reply-To:Date:Message-ID:From:References:Cc:To:Subject: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=A0f7UIYWFp064CWACULt8tYP7upZ4pohSmK2ru7mmpw=; b=rQzmmQ/vnx8TivaTuS+LMlulZeIXdyb2xejOW5MWrsgO1giVml2lOJPaWZdr4ARuZV ciWaJZ4njmG1Jp2QdeKIinVA804FZemxx3IDB+ha6no3xkA/OYT/qzoCrRDWAkFJHizt EKWOBVIVszCu3+dX7vXjFfAO/ZJBbeI7vkmg40pw4yFNkEGkm3BhvA9qXVcaLzjIAeA0 X/urxe+ErnYWWAsXLKZcx1XsckDx3GeVYAfrSnRam0Kb4NRtlLVDxUyyhlJJ4faQn3j1 S4s78Zadr7zY47T5xV5cmmVOZEYJ77noP7LcOKMMLIcdieejWonabSd6aWmwsMeF+2La Hzfg== X-RZG-AUTH: ":OGMGfEG7W/Jia0H4RdpQ6UBM+orSOYYzpexsp56HbOixc6mZ0UouEGtpBP1knqc5tUr6mh9s/aSFuPMBsF4CVLlvHzecCKefpDn90hjAKioyIJxgQq2c" X-RZG-CLASS-ID: mo00 Received: from [IPv6:2a02:810d:8240:2ce4:ca5b:76ff:fed4:a27e] by smtp.strato.de (RZmta 47.3.3 AUTH) with ESMTPSA id Y0a0c9wB2COSgQq (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 2 Dec 2020 13:24:28 +0100 (CET) Subject: Re: Null pointer dereference in public key verification (related to SM2 introduction) To: David Howells Cc: linux-crypto@vger.kernel.org, Herbert Xu , Tianjia Zhang , "David S. Miller" , keyrings@vger.kernel.org References: <67250277-7903-2005-b94b-193bce0a3388@markus-regensburg.de> <3092220.1606727387@warthog.procyon.org.uk> From: Tobias Markus Message-ID: <96474593-2882-60a1-0dcf-5b3dc7526bfa@markus-regensburg.de> Date: Wed, 2 Dec 2020 13:24:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.3 MIME-Version: 1.0 In-Reply-To: <3092220.1606727387@warthog.procyon.org.uk> Content-Type: multipart/mixed; boundary="------------0B2ADEC9D7B4C91F58382749" Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org This is a multi-part message in MIME format. --------------0B2ADEC9D7B4C91F58382749 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hi David, I'm afraid I can't provide an exactly matching disassembly of the function since I've since updated to newer -rc kernels. Another debugging hurdle is that the specific kernel code path seems to be triggered by a very specific iwd code path that iwd only uses for 802.1X/EAP-secured networks, and I simply wasn't near any EAP-secured networks in the last few weeks. I've tried creating a reproducer using a bash script calling various keyctl commands but to no success. However, I can provide you a disassembly using my current -rc5 kernel that should correspond to the code path in question along with some observations. Note that I inserted a BUG_ON right before the if statement for testing (that I couldn't get it to trigger yet since I wasn't near any EAP networks in the last weeks). With the BUG_ON, lines 359-364 in crypto/asymmetric_keys/public_key.c look like this: BUG_ON(!sig->pkey_algo); if (strcmp(sig->pkey_algo, "sm2") == 0 && sig->data_size) { ret = cert_sig_digest_update(sig, tfm); if (ret) goto error_free_key; } The relevant disassembly (I've attached the full disassembly): <...> 359 BUG_ON(!sig->pkey_algo); 0xffffffff8158cee9 <+377>: mov 0x30(%rbp),%rsi 0xffffffff8158ceed <+381>: test %rsi,%rsi 0xffffffff8158cef0 <+384>: je 0xffffffff8158d11f 0xffffffff8158d11f <+943>: ud2 360 if (strcmp(sig->pkey_algo, "sm2") == 0 && sig->data_size) { 0xffffffff8158cef6 <+390>: mov $0xffffffff82c427b0,%rdi 0xffffffff8158cefd <+397>: mov $0x4,%ecx 0xffffffff8158cf02 <+402>: repz cmpsb %es:(%rdi),%ds:(%rsi) 0xffffffff8158cf04 <+404>: seta %al 0xffffffff8158cf07 <+407>: sbb $0x0,%al 0xffffffff8158cf09 <+409>: test %al,%al 0xffffffff8158cf0b <+411>: jne 0xffffffff8158cf18 0xffffffff8158cf0d <+413>: mov 0x50(%rbp),%eax 0xffffffff8158cf10 <+416>: test %eax,%eax 0xffffffff8158cf12 <+418>: jne 0xffffffff8158d0df <...> Some observations: 1. From the Oops report, rsi was zero and seems to be the source of the null pointer. 2. Interpreting the BUG_ON disassembly, rsi is apparently set to sig->pkey_algo. 3. If I recall correctly from the analysis I did right after the Oops, public_key_verify_signature+402 should be the instruction that triggered the Oops. It corresponds to the strcmp. In conclusion, my hypothesis would be that for some reason sig->pkey_algo is a null pointer. This seems plausible since the strcmp would be the first line to actually touch sig->pkey_algo in that function. Take all this with a grain of salt because in theory GCC could have shuffled stuff around since I introduced the BUG_ON. I would love to debug this further, but I'm in dire need of a simpler test case (other than finding another EAP-secured network). If you or anyone could point me to a simple program that uses the public key infrastructure, it might be easier to trigger the Oops again. Kind Regards, Tobias David Howells wrote: > Tobias Markus wrote: > >> kernel: RIP: 0010:public_key_verify_signature+0x189/0x3f0 > > Is it possible for you to provide a disassembly of this function from the > kernel you were using? For this to occur on that line, it appears that sig > would need to be NULL - but that should trip an assertion at the top of the > function - or a very small number (which could be RCX, R09 or R11). > > Thanks, > David > --------------0B2ADEC9D7B4C91F58382749 Content-Type: text/plain; charset=UTF-8; name="disassembly.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="disassembly.txt" RHVtcCBvZiBhc3NlbWJsZXIgY29kZSBmb3IgZnVuY3Rpb24gcHVibGljX2tleV92ZXJpZnlf c2lnbmF0dXJlOgpjcnlwdG8vYXN5bW1ldHJpY19rZXlzL3B1YmxpY19rZXkuYzoKMzExCXsK ICAgMHhmZmZmZmZmZjgxNThjZDcwIDwrMD46CWNhbGwgICAweGZmZmZmZmZmODEwY2I1ODAg PF9fZmVudHJ5X18+CiAgIDB4ZmZmZmZmZmY4MTU4Y2Q3NSA8KzU+OglwdXNoICAgJXIxNQog ICAweGZmZmZmZmZmODE1OGNkNzcgPCs3PjoJbW92ICAgICQweDgsJWVjeAogICAweGZmZmZm ZmZmODE1OGNkN2MgPCsxMj46CXB1c2ggICAlcjE0CiAgIDB4ZmZmZmZmZmY4MTU4Y2Q3ZSA8 KzE0PjoJcHVzaCAgICVyMTMKICAgMHhmZmZmZmZmZjgxNThjZDgwIDwrMTY+OglwdXNoICAg JXIxMgogICAweGZmZmZmZmZmODE1OGNkOD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