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]
Message-ID: <202406281355.d1jNVGBc-lkp@intel.com>
Date: Fri, 28 Jun 2024 14:15:45 +0800
From: kernel test robot <lkp@...el.com>
To: Luigi Leonardi via B4 Relay <devnull+luigi.leonardi.outlook.com@...nel.org>,
	Stefano Garzarella <sgarzare@...hat.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Stefan Hajnoczi <stefanha@...hat.com>,
	"Michael S. Tsirkin" <mst@...hat.com>,
	Jason Wang <jasowang@...hat.com>,
	Eugenio PĂ©rez <eperezma@...hat.com>,
	Xuan Zhuo <xuanzhuo@...ux.alibaba.com>
Cc: oe-kbuild-all@...ts.linux.dev, netdev@...r.kernel.org,
	virtualization@...ts.linux.dev, linux-kernel@...r.kernel.org,
	kvm@...r.kernel.org, Luigi Leonardi <luigi.leonardi@...look.com>,
	Daan De Meyer <daan.j.demeyer@...il.com>
Subject: Re: [PATCH net-next v3 1/3] vsock: add support for SIOCOUTQ ioctl
 for all vsock socket types.

Hi Luigi,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 50b70845fc5c22cf7e7d25b57d57b3dca1725aa5]

url:    https://github.com/intel-lab-lkp/linux/commits/Luigi-Leonardi-via-B4-Relay/vsock-add-support-for-SIOCOUTQ-ioctl-for-all-vsock-socket-types/20240627-023902
base:   50b70845fc5c22cf7e7d25b57d57b3dca1725aa5
patch link:    https://lore.kernel.org/r/20240626-ioctl_next-v3-1-63be5bf19a40%40outlook.com
patch subject: [PATCH net-next v3 1/3] vsock: add support for SIOCOUTQ ioctl for all vsock socket types.
config: i386-randconfig-141-20240628 (https://download.01.org/0day-ci/archive/20240628/202406281355.d1jNVGBc-lkp@intel.com/config)
compiler: gcc-8 (Ubuntu 8.4.0-3ubuntu2) 8.4.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406281355.d1jNVGBc-lkp@intel.com/

smatch warnings:
net/vmw_vsock/af_vsock.c:1321 vsock_do_ioctl() warn: unsigned 'n_bytes' is never less than zero.

vim +/n_bytes +1321 net/vmw_vsock/af_vsock.c

  1295	
  1296	static int vsock_do_ioctl(struct socket *sock, unsigned int cmd,
  1297				  int __user *arg)
  1298	{
  1299		struct sock *sk = sock->sk;
  1300		struct vsock_sock *vsk;
  1301		int retval;
  1302	
  1303		vsk = vsock_sk(sk);
  1304	
  1305		switch (cmd) {
  1306		case SIOCOUTQ: {
  1307			size_t n_bytes;
  1308	
  1309			if (!vsk->transport || !vsk->transport->unsent_bytes) {
  1310				retval = -EOPNOTSUPP;
  1311				break;
  1312			}
  1313	
  1314			if (vsk->transport->unsent_bytes) {
  1315				if (sock_type_connectible(sk->sk_type) && sk->sk_state == TCP_LISTEN) {
  1316					retval = -EINVAL;
  1317					break;
  1318				}
  1319	
  1320				n_bytes = vsk->transport->unsent_bytes(vsk);
> 1321				if (n_bytes < 0) {
  1322					retval = n_bytes;
  1323					break;
  1324				}
  1325	
  1326				retval = put_user(n_bytes, arg);
  1327			}
  1328			break;
  1329		}
  1330		default:
  1331			retval = -ENOIOCTLCMD;
  1332		}
  1333	
  1334		return retval;
  1335	}
  1336	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ