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]
Message-ID: <201603091629.akOMnD27%fengguang.wu@intel.com>
Date:	Wed, 9 Mar 2016 16:23:47 +0800
From:	kbuild test robot <lkp@...el.com>
To:	Jiang Lu <lu.jiang@...driver.com>
Cc:	kbuild-all@...org, warrick.jiang@...il.com,
	linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org
Subject: Re: serial_core:recognize invalid pointer from userspace

Hi Jiang,

[auto build test WARNING on tty/tty-testing]
[also build test WARNING on v4.5-rc7 next-20160309]
[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/Jiang-Lu/serial_core-recognize-invalid-pointer-from-userspace/20160309-160641
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
config: i386-randconfig-x000-201610 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/tty/serial/serial_core.c: In function 'uart_set_info':
>> drivers/tty/serial/serial_core.c:750:26: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      new_info->iomem_base = (unsigned char *)uport->mapbase;
                             ^

vim +750 drivers/tty/serial/serial_core.c

   734		new_info->irq = irq_canonicalize(new_info->irq);
   735		close_delay = msecs_to_jiffies(new_info->close_delay * 10);
   736		closing_wait = new_info->closing_wait == ASYNC_CLOSING_WAIT_NONE ?
   737				ASYNC_CLOSING_WAIT_NONE :
   738				msecs_to_jiffies(new_info->closing_wait * 10);
   739	
   740	
   741		change_irq  = !(uport->flags & UPF_FIXED_PORT)
   742			&& new_info->irq != uport->irq;
   743	
   744		/*
   745		 * Since changing the 'type' of the port changes its resource
   746		 * allocations, we should treat type changes the same as
   747		 * IO port changes.
   748		 */
   749		if ((unsigned long)new_info->iomem_base == 0xffffffff)
 > 750			new_info->iomem_base = (unsigned char *)uport->mapbase;
   751	
   752		change_port = !(uport->flags & UPF_FIXED_PORT)
   753			&& (new_port != uport->iobase ||
   754			    (unsigned long)new_info->iomem_base != uport->mapbase ||
   755			    new_info->hub6 != uport->hub6 ||
   756			    new_info->io_type != uport->iotype ||
   757			    new_info->iomem_reg_shift != uport->regshift ||
   758			    new_info->type != uport->type);

---
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" (23395 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ