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:   Fri, 16 Mar 2018 04:26:02 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Petr Mladek <pmladek@...e.com>
Cc:     kbuild-all@...org, Linus Torvalds <torvalds@...ux-foundation.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        "Tobin C . Harding" <me@...in.cc>, Joe Perches <joe@...ches.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Michal Hocko <mhocko@...e.cz>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Subject: Re: [PATCH v3] vsprintf: Prevent crash when dereferencing invalid
 pointers

Hi Petr,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.16-rc5 next-20180314]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Petr-Mladek/vsprintf-Prevent-crash-when-dereferencing-invalid-pointers/20180315-214100
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> lib/vsprintf.c:533:16: sparse: Using plain integer as NULL pointer
   lib/vsprintf.c:762:18: sparse: Variable length array is used.
   lib/vsprintf.c:765:38: sparse: cannot size expression
   lib/vsprintf.c:1532:23: sparse: incorrect type in assignment (different base types) @@    expected unsigned long [unsigned] [assigned] flags @@    got  long [unsigned] [assigned] flags @@
   lib/vsprintf.c:1532:23:    expected unsigned long [unsigned] [assigned] flags
   lib/vsprintf.c:1532:23:    got restricted gfp_t [usertype] <noident>

vim +533 lib/vsprintf.c

   522	
   523	static const char *check_pointer_access(const void *ptr)
   524	{
   525		unsigned char byte;
   526	
   527		if (!ptr)
   528			return "(null)";
   529	
   530		if (probe_kernel_read(&byte, ptr, 1))
   531			return "(efault)";
   532	
 > 533		return 0;
   534	}
   535	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ