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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Mon, 27 Jan 2020 14:29:41 +0000
From:   Taehee Yoo <ap420073@...il.com>
To:     davem@...emloft.net, kuba@...nel.org, netdev@...r.kernel.org
Cc:     ap420073@...il.com
Subject: [PATCH net v2 0/6] netdevsim: fix a several bugs in netdevsim module

This patchset fixes several bugs in netdevsim module.

1. The first patch fixes a race condition in basic operation of
netdevsim module.
netdevsim operation is called by sysfs and these operations use netdevsim
global resource but there is only a lock for protect list, not the whole
resource. So, panic occurs.

2. The second patch fixes another race condition.
The main problem is a race condition in {new/del}_port() and devlin reload
function.
These functions would allocate and remove resources. So these functions
should not be executed concurrently.

3. The third patch fixes stack-out-of-bound in nsim_dev_debugfs_init().
nsim_dev_debugfs_init() provides only 16bytes for name pointer.
But, there are some case the name length is over 16bytes.
So, stack-out-of-bound occurs.

4. The fourth patch uses IS_ERR instead of IS_ERR_OR_NULL.
debugfs_create_{dir/file} doesn't return NULL.
So, IS_ERR() is more correct.

5. The fifth patch avoids kmalloc warning.
When too large memory allocation is requested by user-space, kmalloc
internally prints warning message.
That warning message is not necessary.
In order to avoid that, it adds __GFP_NOWARN.

6. The last patch removes an unused sdev.c file

Change log:
v1 -> v2:
 - Splits a fixing race condition patch into two patches.
 - Fix incorrect Fixes tags.
 - Update comments
 - Fix use-after-free
 - Add a new patch, which removes an unused sdev.c file.
 - Remove a patch, which tries to avoid debugfs warning.

Taehee Yoo (6):
  netdevsim: fix race conditions in netdevsim operations
  netdevsim: disable devlink reload when resources are being used
  netdevsim: fix stack-out-of-bounds in nsim_dev_debugfs_init()
  netdevsim: use IS_ERR instead of IS_ERR_OR_NULL for debugfs
  netdevsim: use __GFP_NOWARN to avoid memalloc warning
  netdevsim: remove unused sdev code

 drivers/net/netdevsim/bpf.c       | 10 +++--
 drivers/net/netdevsim/bus.c       | 56 +++++++++++++++++++++----
 drivers/net/netdevsim/dev.c       | 32 ++++++++++----
 drivers/net/netdevsim/health.c    |  6 +--
 drivers/net/netdevsim/netdevsim.h |  5 +++
 drivers/net/netdevsim/sdev.c      | 69 -------------------------------
 6 files changed, 84 insertions(+), 94 deletions(-)
 delete mode 100644 drivers/net/netdevsim/sdev.c

-- 
2.17.1

Powered by blists - more mailing lists