mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeffrey E Altman <jaltman@auristor.com>
To: Andrew Lunn <andrew@lunn.ch>, Kenny Ho <y2kenny@gmail.com>
Cc: Marc Dionne <marc.dionne@auristor.com>,
	Kenny Ho <Kenny.Ho@amd.com>, David Howells <dhowells@redhat.com>,
	"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, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Remove hardcoded static string length
Date: Sat, 27 May 2023 10:45:10 -0400	[thread overview]
Message-ID: <51ea1522-edc2-bd15-2873-0712e7eb49c3@auristor.com> (raw)
In-Reply-To: <5b1355b8-17f7-49c8-b7b5-3d9ecdb146ce@lunn.ch>

[-- Attachment #1: Type: text/plain, Size: 953 bytes --]

On 5/24/2023 1:43 PM, Andrew Lunn wrote:
> On Wed, May 24, 2023 at 01:02:36PM -0400, Kenny Ho wrote:
>> On Wed, May 24, 2023 at 12:02 PM Andrew Lunn <andrew@lunn.ch> wrote:
>>> So the compiler warning/error needs to be fixed a different want.
>> Understood.  Would caping the length at iov_len with a ternary be sufficient?
> The quoted text said 'string'. It is not clear if that means c-string,
> with a trailing \0. If you just cap iov_len you could end up with a
> string which is not terminated.
The expected buffer is a NUL terminated c-string.
> The other end of the socket should not blow up, because that would be
> an obvious DOS or buffer overwrite attack vector.

This is a valid concern because all versions of IBM AFS 3.6 Rx and 
OpenAFS Rx prior to 1.6.23 are susceptible to read beyond the end of 
buffer if either the received data is longer than 65 octets or the 
received data is 65 octets but not NUL terminated.

Jeffrey Altman



[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4039 bytes --]

  parent reply	other threads:[~2023-05-27 14:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-23 22:39 Kenny Ho
2023-05-24  0:49 ` Andrew Lunn
2023-05-24 15:43   ` Marc Dionne
2023-05-24 16:01     ` Andrew Lunn
2023-05-24 17:02       ` Kenny Ho
2023-05-24 17:43         ` Andrew Lunn
2023-05-24 18:01           ` Kenny Ho
2023-05-25  9:14             ` David Laight
2023-05-25 14:27               ` Kenny Ho
2023-05-25 15:04                 ` David Laight
2023-05-25 15:37                   ` Kenny Ho
2023-05-27 15:08                     ` Jeffrey E Altman
2023-05-29 13:32                       ` David Laight
2023-05-30 14:39                         ` Jeffrey E Altman
2023-05-27 14:45           ` Jeffrey E Altman [this message]
2023-05-27 15:08           ` Jeffrey E Altman

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=51ea1522-edc2-bd15-2873-0712e7eb49c3@auristor.com \
    --to=jaltman@auristor.com \
    --cc=Kenny.Ho@amd.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.dionne@auristor.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=y2kenny@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

all inboxes | Powered by JetHome®