From: David Laight <David.Laight@ACULAB.COM>
To: 'Andreas Fink' <afink@list.fink.org>,
Dan Carpenter <dan.carpenter@oracle.com>
Cc: Vlad Yasevich <vyasevich@gmail.com>,
Xin Long <lucien.xin@gmail.com>,
"Neil Horman" <nhorman@tuxdriver.com>,
Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
"Jakub Kicinski" <kuba@kernel.org>,
"linux-sctp@vger.kernel.org" <linux-sctp@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>
Subject: RE: [PATCH net] sctp: prevent info leak in sctp_make_heartbeat()
Date: Tue, 29 Jun 2021 10:37:48 +0000 [thread overview]
Message-ID: <c76a03be72ae4dfc9b6a65d418d699e2@AcuMS.aculab.com> (raw)
In-Reply-To: <886e4daf-c239-c1ce-da52-4b4684449908@list.fink.org>
> > - struct sctp_sender_hb_info hbinfo;
> > + struct sctp_sender_hb_info hbinfo = {};
> Does that gcc extension work with all compilers, especially clang?
> > So that's nice, because adding memset()s to zero everywhere was ugly.
The 'real fun' (tm) starts when the bit pattern for the NULL
pointer isn't 'all zeros'.
Using memset() is then broken - I suspect the compiler is
expected to initialise pointers to the correct NULL pattern.
Not that I think anyone sane would consider trying to compile
any 'normal' C code for such a system.
OTOH it is probably why clang is bleating about (int)((char *)0 + 4)
being undefined behaviour.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
prev parent reply other threads:[~2021-06-29 10:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-29 8:19 [PATCH net] sctp: prevent info leak in sctp_make_heartbeat() Dan Carpenter
2021-06-29 8:23 ` Andreas Fink
2021-06-29 9:13 ` Dan Carpenter
2021-06-29 10:37 ` David Laight [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=c76a03be72ae4dfc9b6a65d418d699e2@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=afink@list.fink.org \
--cc=dan.carpenter@oracle.com \
--cc=davem@davemloft.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=linux-sctp@vger.kernel.org \
--cc=lucien.xin@gmail.com \
--cc=marcelo.leitner@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=vyasevich@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).