[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f40cddba6f6fae5d3106da33a2968543d00d64e2.camel@codeconstruct.com.au>
Date: Tue, 26 Oct 2021 09:55:08 +0800
From: Jeremy Kerr <jk@...econstruct.com.au>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org, kuba@...nel.org, matt@...econstruct.com.au,
esyr@...hat.com
Subject: Re: [PATCH net-next v5] mctp: Implement extended addressing
Hi David,
> putting a variably sized type in the skb control blocxk is not a good
> idea. Overruns will be silent, nothing in the typing protects you
> from udsing more space han exists in skb->cb.
There is a check using MCTP_SKB_CB_HADDR_MAXLEN, but setting the size of
the struct member typing would allow for better enforcement, yes.
> Plrease find another way, thank you.
OK, we can use MAX_ADDR_LEN here; we currently have enough space in the
cb for the maximum possible addressing sizes (and can check that through
a BUILD_BUG_ON too).
v6 coming right up.
Cheers,
Jeremy
Powered by blists - more mailing lists