Bug 201376

Summary: explicit_bzero authinfo in sctp
Product: Base System Reporter: logan
Component: kernAssignee: Michael Tuexen <tuexen>
Status: Closed Not A Bug    
Severity: Affects Only Me CC: brueffer, emaste
Priority: ---    
Version: 10.1-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
bzero->explicit_bzero none

Description logan 2015-07-06 15:33:26 UTC
Created attachment 158422 [details]
bzero->explicit_bzero

Rather than simply bzero() sensitive stuff, go further and use explicit_bzero() for local variables that may be optmized away.
Comment 1 Christian Brueffer freebsd_committer freebsd_triage 2015-07-13 11:27:21 UTC
Michael, since this is SCTP-related, could you have a look?
Comment 2 Michael Tuexen freebsd_committer freebsd_triage 2015-07-13 11:59:44 UTC
(In reply to Christian Brueffer from comment #1)
I'll close it for two reasons:
1. The function which is patched (sctp_alloc_authinfo()) is never called.
2. The usage of explicit_bzero() should be used to erase memory which you
   don't need anymore. So you make sure that the compiler doesn't optimize
   it away. However, the proposed patch would affect the structure before
   it is used. So the compiler should not optimize it and bzero() would
   be the right call.

I already explained this to the reporter in a private mail exchange.