lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 22 Apr 2023 22:48:32 +0300
From:   Dan Carpenter <dan.carpenter@...aro.org>
To:     Dan Carpenter <error27@...il.com>
Cc:     Dongliang Mu <dzm91@...t.edu.cn>, Vicki Pfau <vi@...rift.com>,
        kernel-janitors@...r.kernel.org,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Pavel Rojtberg <rojtberg@...il.com>,
        Nate Yocom <nate@...om.org>,
        Mattijs Korpershoek <mkorpershoek@...libre.com>,
        John Butler <radon86dev@...il.com>,
        Matthias Benkmann <matthias.benkmann@...il.com>,
        Christopher Crockett <chaorace@...il.com>,
        Santosh De Massari <s.demassari@...il.com>,
        hust-os-kernel-patches@...glegroups.com,
        syzbot+a3f758b8d8cb7e49afec@...kaller.appspotmail.com,
        "Pierre-Loup A. Griffais" <pgriffais@...vesoftware.com>,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Input: xpad - fix GPF in xpad_probe

The warnings from this are quite promising.

When you're writing a check, you start with a simple idea and then try
it and then filter out the common false positives.

The first 10 warnings are from loops like:

	p = NULL;

	for (i = 0; i < limit; i++) {
		if (i == 0)
			p = non_null();
		else
			*p = something();
	}

Smatch doesn't handle loops correctly.  (I know how to fix this but I've
never gotten around to it because it would make Smatch slow)...

So instead of that maybe I would do a hack to silence this type of
warning.  Not sure what...

drivers/usb/gadget/udc/amd5536udc_pci.c:61 udc_pci_remove() warn: pointer dereferenced without being set '&udc->gadget'
This one is interesting.  Seems like a real bug.

drivers/mtd/ubi/block.c:391 ubiblock_create() warn: pointer dereferenced without being set 'dev->gd'

This one too.  So maybe we could make this a separate warning where
NULL dereferences happen on error paths.  Or maybe when they happen in
printks.

So there are ways to take this first draft and massage it and get
fewer false positives, by filtering false positives or taking things
which work and creating new checks instead.

Anyway, results attached.

regards,
dan carpenter

View attachment "err-list" of type "text/plain" (26959 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ