Taehee Yoo
587ccf092e
net: rmnet: fix lower interface leak
commit 2a762e9e8cd1cf1242e4269a2244666ed02eecd1 upstream.
There are two types of the lower interface of rmnet that are VND
and BRIDGE.
Each lower interface can have only one type either VND or BRIDGE.
But, there is a case, which uses both lower interface types.
Due to this unexpected behavior, lower interface leak occurs.
Test commands:
ip link add dummy0 type dummy
ip link add dummy1 type dummy
ip link add rmnet0 link dummy0 type rmnet mux_id 1
ip link set dummy1 master rmnet0
ip link add rmnet1 link dummy1 type rmnet mux_id 2
ip link del rmnet0
The dummy1 was attached as BRIDGE interface of rmnet0.
Then, it also was attached as VND interface of rmnet1.
This is unexpected behavior and there is no code for handling this case.
So that below splat occurs when the rmnet0 interface is deleted.
Splat looks like:
[ 53.254112][ C1] WARNING: CPU: 1 PID: 1192 at net/core/dev.c:8992 rollback_registered_many+0x986/0xcf0
[ 53.254117][ C1] Modules linked in: rmnet dummy openvswitch nsh nf_conncount nf_nat nf_conntrack nf_defrag_ipv6 nfx
[ 53.254182][ C1] CPU: 1 PID: 1192 Comm: ip Not tainted 5.8.0-rc1+ #620
[ 53.254188][ C1] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
[ 53.254192][ C1] RIP: 0010:rollback_registered_many+0x986/0xcf0
[ 53.254200][ C1] Code: 41 8b 4e cc 45 31 c0 31 d2 4c 89 ee 48 89 df e8 e0 47 ff ff 85 c0 0f 84 cd fc ff ff 0f 0b e5
[ 53.254205][ C1] RSP: 0018:ffff888050a5f2e0 EFLAGS: 00010287
[ 53.254214][ C1] RAX: ffff88805756d658 RBX: ffff88804d99c000 RCX: ffffffff8329d323
[ 53.254219][ C1] RDX: 1ffffffff0be6410 RSI: 0000000000000008 RDI: ffffffff85f32080
[ 53.254223][ C1] RBP: dffffc0000000000 R08: fffffbfff0be6411 R09: fffffbfff0be6411
[ 53.254228][ C1] R10: ffffffff85f32087 R11: 0000000000000001 R12: ffff888050a5f480
[ 53.254233][ C1] R13: ffff88804d99c0b8 R14: ffff888050a5f400 R15: ffff8880548ebe40
[ 53.254238][ C1] FS: 00007f6b86b370c0(0000) GS:ffff88806c200000(0000) knlGS:0000000000000000
[ 53.254243][ C1] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 53.254248][ C1] CR2: 0000562c62438758 CR3: 000000003f600005 CR4: 00000000000606e0
[ 53.254253][ C1] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 53.254257][ C1] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 53.254261][ C1] Call Trace:
[ 53.254266][ C1] ? lockdep_hardirqs_on_prepare+0x379/0x540
[ 53.254270][ C1] ? netif_set_real_num_tx_queues+0x780/0x780
[ 53.254275][ C1] ? rmnet_unregister_real_device+0x56/0x90 [rmnet]
[ 53.254279][ C1] ? __kasan_slab_free+0x126/0x150
[ 53.254283][ C1] ? kfree+0xdc/0x320
[ 53.254288][ C1] ? rmnet_unregister_real_device+0x56/0x90 [rmnet]
[ 53.254293][ C1] unregister_netdevice_many.part.135+0x13/0x1b0
[ 53.254297][ C1] rtnl_delete_link+0xbc/0x100
[ 53.254301][ C1] ? rtnl_af_register+0xc0/0xc0
[ 53.254305][ C1] rtnl_dellink+0x2dc/0x840
[ 53.254309][ C1] ? find_held_lock+0x39/0x1d0
[ 53.254314][ C1] ? valid_fdb_dump_strict+0x620/0x620
[ 53.254318][ C1] ? rtnetlink_rcv_msg+0x457/0x890
[ 53.254322][ C1] ? lock_contended+0xd20/0xd20
[ 53.254326][ C1] rtnetlink_rcv_msg+0x4a8/0x890
[ ... ]
[ 73.813696][ T1192] unregister_netdevice: waiting for rmnet0 to become free. Usage count = 1
Fixes: 037f9cdf72fb ("net: rmnet: use upper/lower device infrastructure")
Signed-off-by: Taehee Yoo <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
2020-07-22 09:32:46 +02:00 |
| .. |
|
accessibility
|
|
|
|
acpi
|
ACPI: configfs: Disallow loading ACPI tables when locked down
|
2020-06-30 15:37:07 -04:00 |
|
amba
|
|
|
|
android
|
binder: fix null deref of proc->context
|
2020-06-30 15:36:48 -04:00 |
|
ata
|
ata/libata: Fix usage of page address by page_address in ata_scsi_mode_select_xlat function
|
2020-06-30 15:37:03 -04:00 |
|
atm
|
|
|
|
auxdisplay
|
|
|
|
base
|
regmap: fix alignment issue
|
2020-07-16 08:16:32 +02:00 |
|
bcma
|
|
|
|
block
|
nbd: Fix memory leak in nbd_add_socket
|
2020-07-16 08:16:40 +02:00 |
|
bluetooth
|
Bluetooth: hci_bcm: fix freeing not-requested IRQ
|
2020-06-22 09:31:18 +02:00 |
|
bus
|
bus: ti-sysc: Ignore clockactivity unless specified as a quirk
|
2020-06-30 15:36:53 -04:00 |
|
cdrom
|
|
|
|
char
|
tpm: Fix TIS locality timeout problems
|
2020-07-09 09:37:51 +02:00 |
|
clk
|
clk: sifive: allocate sufficient memory for struct __prci_data
|
2020-06-30 15:37:01 -04:00 |
|
clocksource
|
clocksource: dw_apb_timer_of: Fix missing clockevent timers
|
2020-06-22 09:30:55 +02:00 |
|
connector
|
|
|
|
counter
|
|
|
|
cpufreq
|
cpufreq: Fix up cpufreq_boost_set_sw()
|
2020-06-17 16:40:33 +02:00 |
|
cpuidle
|
cpuidle: Fix three reference count leaks
|
2020-06-22 09:31:10 +02:00 |
|
crypto
|
crypto: atmel - Fix build error of CRYPTO_AUTHENC
|
2020-07-22 09:32:46 +02:00 |
|
dax
|
|
|
|
dca
|
|
|
|
devfreq
|
|
|
|
dio
|
|
|
|
dma
|
|
|
|
dma-buf
|
dma-buf: Move dma_buf_release() from fops to dentry_ops
|
2020-07-09 09:37:56 +02:00 |
|
edac
|
EDAC/amd64: Read back the scrub rate PCI register on F15h
|
2020-07-09 09:37:49 +02:00 |
|
eisa
|
|
|
|
extcon
|
extcon: adc-jack: Fix an error handling path in 'adc_jack_probe()'
|
2020-06-24 17:50:36 +02:00 |
|
firewire
|
|
|
|
firmware
|
efi: Make it possible to disable efivar_ssdt entirely
|
2020-07-09 09:37:57 +02:00 |
|
fpga
|
fpga: dfl: afu: Corrected error handling levels
|
2020-06-24 17:50:29 +02:00 |
|
fsi
|
|
|
|
gnss
|
gnss: sirf: fix error return code in sirf_probe()
|
2020-06-22 09:31:20 +02:00 |
|
gpio
|
gpio: pca953x: Fix GPIO resource leak on Intel Galileo Gen 2
|
2020-07-16 08:16:37 +02:00 |
|
gpu
|
drm/amdgpu: don't do soft recovery if gpu_recovery=0
|
2020-07-16 08:16:46 +02:00 |
|
greybus
|
|
|
|
hid
|
HID: Add quirks for Trust Panora Graphic Tablet
|
2020-06-24 17:50:27 +02:00 |
|
hsi
|
|
|
|
hv
|
Drivers: hv: vmbus: Always handle the VMBus messages on CPU0
|
2020-06-22 09:31:00 +02:00 |
|
hwmon
|
hwmon: (acpi_power_meter) Fix potential memory leak in acpi_power_meter_add()
|
2020-07-09 09:37:53 +02:00 |
|
hwspinlock
|
|
|
|
hwtracing
|
coresight: tmc: Fix TMC mode read in tmc_read_prepare_etb()
|
2020-06-24 17:50:15 +02:00 |
|
i2c
|
i2c: mlxcpld: check correct size of maximum RECV_LEN packet
|
2020-07-09 09:37:54 +02:00 |
|
i3c
|
|
|
|
ide
|
|
|
|
idle
|
|
|
|
iio
|
iio: bmp280: fix compensation of humidity
|
2020-06-24 17:50:12 +02:00 |
|
infiniband
|
IB/hfi1: Do not destroy link_wq when the device is shut down
|
2020-07-16 08:16:42 +02:00 |
|
input
|
input: i8042 - Remove special PowerPC handling
|
2020-06-24 17:50:36 +02:00 |
|
interconnect
|
|
|
|
iommu
|
iommu/vt-d: Don't apply gfx quirks to untrusted devices
|
2020-07-16 08:16:35 +02:00 |
|
ipack
|
|
|
|
irqchip
|
irqchip/gic: Atomically update affinity
|
2020-07-09 09:37:56 +02:00 |
|
isdn
|
|
|
|
leds
|
|
|
|
lightnvm
|
|
|
|
macintosh
|
drivers/macintosh: Fix memleak in windfarm_pm112 driver
|
2020-06-22 09:31:22 +02:00 |
|
mailbox
|
mailbox: zynqmp-ipi: Fix NULL vs IS_ERR() check in zynqmp_ipi_mbox_probe()
|
2020-06-24 17:50:36 +02:00 |
|
mcb
|
|
|
|
md
|
dm writecache: reject asynchronous pmem devices
|
2020-07-16 08:16:47 +02:00 |
|
media
|
media: ov5640: fix use of destroyed mutex
|
2020-06-22 09:31:19 +02:00 |
|
memory
|
|
|
|
memstick
|
|
|
|
message
|
scsi: mptscsih: Fix read sense data size
|
2020-07-16 08:16:36 +02:00 |
|
mfd
|
mfd: stmfx: Disable IRQ in suspend to avoid spurious interrupt
|
2020-06-24 17:50:33 +02:00 |
|
misc
|
misc: xilinx-sdfec: improve get_user_pages_fast() error handling
|
2020-06-24 17:50:35 +02:00 |
|
mmc
|
mmc: meson-gx: limit segments to 1 when dram-access-quirk is needed
|
2020-07-16 08:16:46 +02:00 |
|
mtd
|
mtd: rawnand: tmio: Fix the probe error path
|
2020-06-22 09:31:26 +02:00 |
|
mux
|
|
|
|
net
|
net: rmnet: fix lower interface leak
|
2020-07-22 09:32:46 +02:00 |
|
nfc
|
NFC: st21nfca: add missed kfree_skb() in an error path
|
2020-06-10 20:24:54 +02:00 |
|
ntb
|
NTB: perf: Fix race condition when run with ntb_test
|
2020-06-24 17:50:41 +02:00 |
|
nubus
|
|
|
|
nvdimm
|
|
|
|
nvme
|
nvme-rdma: assign completion vector correctly
|
2020-07-16 08:16:36 +02:00 |
|
nvmem
|
nvmem: qfprom: remove incorrect write support
|
2020-06-10 20:24:57 +02:00 |
|
of
|
of: Fix a refcounting bug in __of_attach_node_sysfs()
|
2020-06-24 17:50:35 +02:00 |
|
opp
|
|
|
|
oprofile
|
|
|
|
parisc
|
|
|
|
parport
|
|
|
|
pci
|
PCI: amlogic: meson: Don't use FAST_LINK_MODE to set up link
|
2020-06-24 17:50:31 +02:00 |
|
pcmcia
|
|
|
|
perf
|
drivers/perf: hisi: Fix wrong value for all counters enable
|
2020-06-24 17:50:41 +02:00 |
|
phy
|
drivers: phy: sr-usb: do not use internal fsm for USB2 phy init
|
2020-06-24 17:50:28 +02:00 |
|
pinctrl
|
pinctrl: tegra: Use noirq suspend/resume callbacks
|
2020-06-30 15:37:04 -04:00 |
|
platform
|
platform/x86: asus_wmi: Reserve more space for struct bias_args
|
2020-06-22 09:31:11 +02:00 |
|
pnp
|
|
|
|
power
|
power: supply: smb347-charger: IRQSTAT_D is volatile
|
2020-06-24 17:50:25 +02:00 |
|
powercap
|
|
|
|
pps
|
|
|
|
ps3
|
|
|
|
ptp
|
|
|
|
pwm
|
pwm: jz4740: Fix build failure
|
2020-07-16 08:16:48 +02:00 |
|
rapidio
|
|
|
|
ras
|
|
|
|
regulator
|
regualtor: pfuze100: correct sw1a/sw2 on pfuze3000
|
2020-06-30 15:36:54 -04:00 |
|
remoteproc
|
remoteproc: qcom_q6v5_mss: map/unmap mpss segments before/after use
|
2020-06-24 17:50:13 +02:00 |
|
reset
|
|
|
|
rpmsg
|
|
|
|
rtc
|
rtc: rv3028: Add missed check for devm_regmap_init_i2c()
|
2020-06-24 17:50:36 +02:00 |
|
s390
|
s390/qeth: fix error handling for isolation mode cmds
|
2020-06-30 15:36:57 -04:00 |
|
sbus
|
|
|
|
scsi
|
scsi: lpfc: Avoid another null dereference in lpfc_sli4_hba_unset()
|
2020-06-30 15:37:00 -04:00 |
|
sfi
|
|
|
|
sh
|
|
|
|
siox
|
|
|
|
slimbus
|
slimbus: ngd: get drvdata from correct device
|
2020-06-24 17:50:22 +02:00 |
|
soc
|
soc/tegra: pmc: Select GENERIC_PINCONF
|
2020-06-22 09:31:22 +02:00 |
|
soundwire
|
soundwire: slave: don't init debugfs on device registration error
|
2020-06-24 17:50:23 +02:00 |
|
spi
|
spi: spidev: fix a potential use-after-free in spidev_release()
|
2020-07-16 08:16:34 +02:00 |
|
spmi
|
|
|
|
ssb
|
|
|
|
staging
|
Staging: rtl8723bs: prevent buffer overflow in update_sta_support_rate()
|
2020-06-30 15:37:11 -04:00 |
|
target
|
scsi: target: tcmu: Fix a use after free in tcmu_check_expired_queue_cmd()
|
2020-06-24 17:50:34 +02:00 |
|
tc
|
|
|
|
tee
|
|
|
|
thermal
|
thermal/drivers/rcar_gen3: Fix undefined temperature if negative
|
2020-07-09 09:37:53 +02:00 |
|
thunderbolt
|
|
|
|
tty
|
Revert "tty: hvc: Fix data abort due to race in hvc_open"
|
2020-06-30 15:37:13 -04:00 |
|
uio
|
|
|
|
usb
|
usb: dwc3: pci: Fix reference count leak in dwc3_pci_resume_work
|
2020-07-16 08:16:36 +02:00 |
|
vfio
|
vfio/mdev: Fix reference count leak in add_mdev_supported_type
|
2020-06-24 17:50:36 +02:00 |
|
vhost
|
scsi: vhost: Notify TCM about the maximum sg entries supported per command
|
2020-06-24 17:50:17 +02:00 |
|
video
|
backlight: lp855x: Ensure regulators are disabled on probe failure
|
2020-06-24 17:50:09 +02:00 |
|
virt
|
|
|
|
virtio
|
|
|
|
visorbus
|
|
|
|
vlynq
|
|
|
|
vme
|
|
|
|
w1
|
w1: omap-hdq: cleanup to add missing newline for some dev_dbg
|
2020-06-22 09:31:26 +02:00 |
|
watchdog
|
watchdog: da9062: No need to ping manually before setting timeout
|
2020-06-24 17:50:32 +02:00 |
|
xen
|
xen/pvcalls-back: test for errors when calling backend_connect()
|
2020-06-17 16:40:38 +02:00 |
|
zorro
|
|
|
|
Kconfig
|
|
|
|
Makefile
|
|
|