From: David Howells <dhowells@redhat.com>
To: Pengfei Xu <pengfei.xu@intel.com>
Cc: dhowells@redhat.com, eadavis@qq.com,
Linus Torvalds <torvalds@linux-foundation.org>,
Simon Horman <horms@kernel.org>,
Markus Suvanto <markus.suvanto@gmail.com>,
Jeffrey E Altman <jaltman@auristor.com>,
"Marc Dionne" <marc.dionne@auristor.com>,
Wang Lei <wang840925@gmail.com>,
"Jeff Layton" <jlayton@redhat.com>,
Steve French <smfrench@gmail.com>,
"Jarkko Sakkinen" <jarkko@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-afs@lists.infradead.org, keyrings@vger.kernel.org,
linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org,
ceph-devel@vger.kernel.org, netdev@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
heng.su@intel.com
Subject: Re: [PATCH] keys, dns: Fix missing size check of V1 server-list header
Date: Wed, 10 Jan 2024 10:14:28 +0000 [thread overview]
Message-ID: <1694631.1704881668@warthog.procyon.org.uk> (raw)
In-Reply-To: <ZZ4fyY4r3rqgZL+4@xpf.sh.intel.com>
Pengfei Xu <pengfei.xu@intel.com> wrote:
> Bisected info between v6.7-rc7(keyctl05 passed) and v6.7-rc8(keyctl05 failed)
> is in attached.
>
> keyctl05 failed in add_key with type "dns_resolver" syscall step tracked
> by strace:
> "
> [pid 863107] add_key("dns_resolver", "desc", "\0\0\1\377\0", 5, KEY_SPEC_SESSION_KEYRING <unfinished ...>
> [pid 863106] <... alarm resumed>) = 30
> [pid 863107] <... add_key resumed>) = -1 EINVAL (Invalid argument)
> "
It should fail as the payload is actually invalid. The payload specifies a
version 1 format - and that requires a 6-byte header. The bug the patched
fixes is that whilst there is a length check for the basic 3-byte header,
there was no length check for the extended v1 header.
> After increased the dns_res_payload to 7 bytes(6 bytes was still failed),
The following doesn't work for you?
echo -n -e '\0\0\01\xff\0\0' | keyctl padd dns_resolver desc @p
David
next prev parent reply other threads:[~2024-01-10 10:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-21 15:30 [GIT PULL] afs, dns: Fix dynamic root interaction with negative DNS David Howells
2023-12-21 18:19 ` pr-tracker-bot
2023-12-23 17:28 ` Simon Horman
2023-12-23 19:14 ` Linus Torvalds
2023-12-24 0:02 ` [PATCH] keys, dns: Fix missing size check of V1 server-list header David Howells
2023-12-24 10:22 ` Simon Horman
2024-01-10 4:40 ` Pengfei Xu
2024-01-10 5:19 ` Edward Adam Davis
2024-01-10 5:47 ` Pengfei Xu
2024-01-10 5:27 ` Pengfei Xu
2024-01-10 10:14 ` David Howells [this message]
2024-01-10 11:06 ` Pengfei Xu
2024-01-10 17:23 ` David Howells
2024-01-10 18:52 ` Linus Torvalds
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=1694631.1704881668@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=ceph-devel@vger.kernel.org \
--cc=davem@davemloft.net \
--cc=eadavis@qq.com \
--cc=edumazet@google.com \
--cc=heng.su@intel.com \
--cc=horms@kernel.org \
--cc=jaltman@auristor.com \
--cc=jarkko@kernel.org \
--cc=jlayton@redhat.com \
--cc=keyrings@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=linux-afs@lists.infradead.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=marc.dionne@auristor.com \
--cc=markus.suvanto@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pengfei.xu@intel.com \
--cc=smfrench@gmail.com \
--cc=torvalds@linux-foundation.org \
--cc=wang840925@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 NNTP newsgroup(s).