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] [day] [month] [year] [list]
Date:	Fri, 1 Apr 2016 10:50:27 +0800
From:	kbuild test robot <lkp@...el.com>
To:	Takashi Iwai <tiwai@...e.de>
Cc:	kbuild-all@...org, Al Viro <viro@...iv.linux.org.uk>,
	Jiri Slaby <jslaby@...e.cz>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iov_iter: Fix out-of-bound access in iov_iter_advance()

Hi Takashi,

[auto build test WARNING on v4.6-rc1]
[also build test WARNING on next-20160331]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Takashi-Iwai/iov_iter-Fix-out-of-bound-access-in-iov_iter_advance/20160331-185222
config: ia64-allnoconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=ia64 

All warnings (new ones prefixed by >>):

   lib/iov_iter.c: In function 'iov_iter_advance':
>> lib/iov_iter.c:514:3: warning: 'return' with a value, in function returning void
      return 0;
      ^

vim +/return +514 lib/iov_iter.c

   498			__copy_from_user_inatomic((p += v.iov_len) - v.iov_len,
   499						  v.iov_base, v.iov_len),
   500			memcpy_from_page((p += v.bv_len) - v.bv_len, v.bv_page,
   501					 v.bv_offset, v.bv_len),
   502			memcpy((p += v.iov_len) - v.iov_len, v.iov_base, v.iov_len)
   503		)
   504		kunmap_atomic(kaddr);
   505		return bytes;
   506	}
   507	EXPORT_SYMBOL(iov_iter_copy_from_user_atomic);
   508	
   509	void iov_iter_advance(struct iov_iter *i, size_t size)
   510	{
   511		if (unlikely(size > i->count))
   512			size = i->count;
   513		if (unlikely(!size))
 > 514			return 0;
   515		iterate_and_advance(i, size, v, 0, 0, 0)
   516	}
   517	EXPORT_SYMBOL(iov_iter_advance);
   518	
   519	/*
   520	 * Return the count of just the current iov_iter segment.
   521	 */
   522	size_t iov_iter_single_seg_count(const struct iov_iter *i)

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

Download attachment ".config.gz" of type "application/octet-stream" (5532 bytes)

Powered by blists - more mailing lists