[PATCH] Some fixes detected by Undefined Sanitizer

Andreas Schneider asn at samba.org
Fri Nov 23 06:24:40 UTC 2018


On Thursday, 22 November 2018 19:45:55 CET Andrew Bartlett wrote:
> On Thu, 2018-11-22 at 17:07 +0100, Andreas Schneider via samba-
> 
> technical wrote:
> > On Thursday, 22 November 2018 16:26:45 CET Andreas Schneider via samba-
> > 
> > technical wrote:
> > > On Wednesday, 21 November 2018 11:20:44 CET Andreas Schneider via samba-
> > > 
> > > technical wrote:
> > > > Hi,
> > > > 
> > > > see attached. Review and comments are welcome. Please push if OK.
> > > 
> > > Here is an updated patchset with more patches. I have more in the queue,
> > > but I can tell you, there be dragons!
> > > 
> > > https://gitlab.com/samba-team/devel/samba/pipelines/37563706
> > 
> > I've removed one patch which fixed some tdb stuff. This needs more fixing
> > by the callers first.
> > 
> > New pipeline:
> > https://gitlab.com/samba-team/devel/samba/pipelines/37566650
> 
> I agree.  Changing asn.1 code is to tempt big, fiery dragons.  Can you
> have Jeremy look at that one?

We should move to libtasn1 [1] which is used and maintained by GnuTLS in the 
long run. It is also fuzzed trough GnuTLS. I'm using it in lib/mscat/, so we 
have it as a dependency already ...

> But I do want to say a big Thank You for looking into this stuff, this
> is really important, and we should get a GitLab job set up that
> triggers this long-term.

I already have that including MIT KRB5 build and csbuild (static analysis). 
Here is a pipeline:

https://gitlab.com/cryptomilk/samba/pipelines/37438502

> A next area of research might be how to use some of the attributes in:
> 
> https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html
> 
> seems like it might help a lot, such as the alignment and malloc-like
> attributes.  Adding those to talloc() et al could be quite interesting.
> 
> Thanks,
> 
> Andrew Bartlett

[1] https://www.gnu.org/software/libtasn1/

-- 
Andreas Schneider                      asn at samba.org
Samba Team                             www.samba.org
GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D





More information about the samba-technical mailing list