bpf: Support for hardening against JIT spraying
In the Linux kernel, the following vulnerability has been resolved:
x86/bugs: Enable IBPB flush on BPF JIT allocation
Enable hardening against JIT spraying when Spectre-v2 mitigations are in use. Specifically, issue an IBPB flush on BPF JIT memory reuse. Skip enabling the IBPB flush if the BPF dispatcher is already using a retpoline sequence.
This hardening applies only when BPF-JIT is in use. Guard the enabling under CONFIGBPFJIT so that bugs.c still builds with CONFIGBPFJIT=n.
In the Linux kernel, the following vulnerability has been resolved:
net: altera: Fix refcount leak in alteratsemdiocreate
Every iteration of foreachchildofnode() decrements the reference count of the previous node. When break from a foreachchildofnode() loop, we need to explicitly call ofnodeput() on the child node when not need anymore. Add missing ofnodeput() to avoid refcount leak.
In the Linux kernel, the following vulnerability has been resolved:
firmware: dmi-sysfs: Fix memory leak in dmisysfsregisterhandle
kobjectinitandadd() takes reference even when it fails. According to the doc of kobjectinitandadd()
If this function returns an error, kobjectput() must be called to properly clean up the memory associated with the object.
Fix this issue by calling kobjectput().
In the Linux kernel, the following vulnerability has been resolved:
nvdimm: Fix firmware activation deadlock scenarios
Lockdep reports the following deadlock scenarios for CXL root device power-management, deviceprepare(), operations, and deviceshutdown() operations for 'ndregion' devices:
Chain exists of: &nvdimmregionkey --> &nvdimmbus->reconfigmutex --> systemtransitionmutex
Possible unsafe locking scenario:
CPU0 CPU1 ---- ---- lock(systemtransitionmutex); lock(&nvdimmbus->reconfigmutex); lock(systemtransitionmutex); lock(&nvdimmregionkey);
Chain exists of: &cxlnvdimmbridgekey --> acpiscanlock --> &cxlrootkey
Possible unsafe locking scenario:
CPU0 CPU1 ---- ---- lock(&cxlrootkey); lock(acpiscanlock); lock(&cxlrootkey); lock(&cxlnvdimmbridgekey);
These stem from holding nvdimmbuslock() over hibernatequietexec() which walks the entire system device topology taking devicelock() along the way. The nvdimmbuslock() is protecting against unregistration, multiple simultaneous ops callers, and preventing activateshow() from racing activatestore(). For the first 2, the lock is redundant. Unregistration already flushes all ops users, and sysfs already prevents multiple threads to be active in an ops handler at the same time. For the last userspace should already be waiting for its last activatestore() to complete, and does not need activateshow() to flush the write side, so this lock usage can be deleted in these attributes.
In the Linux kernel, the following vulnerability has been resolved:
tipc: check attribute length for bearer name
syzbot reported uninit-value: ===================================================== BUG: KMSAN: uninit-value in stringnocheck lib/vsprintf.c:644 [inline] BUG: KMSAN: uninit-value in string+0x4f9/0x6f0 lib/vsprintf.c:725 stringnocheck lib/vsprintf.c:644 [inline] string+0x4f9/0x6f0 lib/vsprintf.c:725 vsnprintf+0x2222/0x3650 lib/vsprintf.c:2806 vprintkstore+0x537/0x2150 kernel/printk/printk.c:2158 vprintkemit+0x28b/0xab0 kernel/printk/printk.c:2256 vprintkdefault+0x86/0xa0 kernel/printk/printk.c:2283 vprintk+0x15f/0x180 kernel/printk/printksafe.c:50 printk+0x18d/0x1cf kernel/printk/printk.c:2293 tipcenablebearer net/tipc/bearer.c:371 [inline] tipcnlbearerenable+0x2022/0x22a0 net/tipc/bearer.c:1033 tipcnlbearerenable+0x6c/0xb0 net/tipc/bearer.c:1042 genlfamilyrcvmsgdoit net/netlink/genetlink.c:731 [inline]
- Do sanity check the attribute length for TIPCNLABEARERNAME. - Do not use 'illegal name' in printing message.
In the Linux kernel, the following vulnerability has been resolved:
watchdog: ts4800wdt: Fix refcount leak in ts4800wdtprobe
ofparsephandle() returns a node pointer with refcount incremented, we should use ofnodeput() on it when done. Add missing ofnodeput() in some error paths.
In the Linux kernel, the following vulnerability has been resolved:
jffs2: fix memory leak in jffs2dofillsuper
If jffs2iget() or dmakeroot() in jffs2dofillsuper() returns an error, we can observe the following kmemleak report:
-------------------------------------------- unreferenced object 0xffff888105a65340 (size 64): comm "mount", pid 710, jiffies 4302851558 (age 58.239s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<ffffffff859c45e5>] kmemcachealloctrace+0x475/0x8a0 [<ffffffff86160146>] jffs2suminit+0x96/0x1a0 [<ffffffff86140e25>] jffs2domountfs+0x745/0x2120 [<ffffffff86149fec>] jffs2dofillsuper+0x35c/0x810 [<ffffffff8614aae9>] jffs2fillsuper+0x2b9/0x3b0 [...] unreferenced object 0xffff8881bd7f0000 (size 65536): comm "mount", pid 710, jiffies 4302851558 (age 58.239s) hex dump (first 32 bytes): bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb ................ bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb ................ backtrace: [<ffffffff858579ba>] kmallocorder+0xda/0x110 [<ffffffff85857a11>] kmallocordertrace+0x21/0x130 [<ffffffff859c2ed1>] kmalloc+0x711/0x8a0 [<ffffffff86160189>] jffs2suminit+0xd9/0x1a0 [<ffffffff86140e25>] jffs2domountfs+0x745/0x2120 [<ffffffff86149fec>] jffs2dofillsuper+0x35c/0x810 [<ffffffff8614aae9>] jffs2fillsuper+0x2b9/0x3b0 [...] --------------------------------------------
This is because the resources allocated in jffs2suminit() are not released. Call jffs2sumexit() to release these resources to solve the problem.
In the Linux kernel, the following vulnerability has been resolved:
usb: usbip: fix a refcount leak in stubprobe()
usbgetdev() is called in stubdevicealloc(). When stubprobe() fails after that, usbputdev() needs to be called to release the reference.
Fix this by moving usbputdev() to sdevfree error path handling.
Find this by code review.
In the Linux kernel, the following vulnerability has been resolved:
scsi: lpfc: Address NULL pointer dereference after stargettorport()
Calls to stargettorport() may return NULL. Add check for NULL rport before dereference.
In the Linux kernel, the following vulnerability has been resolved:
bcache: avoid journal no-space deadlock by reserving 1 journal bucket
The journal no-space deadlock was reported time to time. Such deadlock can happen in the following situation.
When all journal buckets are fully filled by active jset with heavy write I/O load, the cache set registration (after a reboot) will load all active jsets and inserting them into the btree again (which is called journal replay). If a journaled bkey is inserted into a btree node and results btree node split, new journal request might be triggered. For example, the btree grows one more level after the node split, then the root node record in cache device super block will be upgrade by bchjournalmeta() from bchbtreesetroot(). But there is no space in journal buckets, the journal replay has to wait for new journal bucket to be reclaimed after at least one journal bucket replayed. This is one example that how the journal no-space deadlock happens.
The solution to avoid the deadlock is to reserve 1 journal bucket in run time, and only permit the reserved journal bucket to be used during cache set registration procedure for things like journal replay. Then the journal space will never be fully filled, there is no chance for journal no-space deadlock to happen anymore.
This patch adds a new member "bool doreserve" in struct journal, it is inititalized to 0 (false) when struct journal is allocated, and set to 1 (true) by bchjournalspacereserve() when all initialization done in runcacheset(). In the run time when journalreclaim() tries to allocate a new journal bucket, freejournalbuckets() is called to check whether there are enough free journal buckets to use. If there is only 1 free journal bucket and journal->doreserve is 1 (true), the last bucket is reserved and freejournalbuckets() will return 0 to indicate no free journal bucket. Then journalreclaim() will give up, and try next time to see whetheer there is free journal bucket to allocate. By this method, there is always 1 jouranl bucket reserved in run time.
During the cache set registration, journal->doreserve is 0 (false), so the reserved journal bucket can be used to avoid the no-space deadlock.
In the Linux kernel, the following vulnerability has been resolved:
drivers: usb: host: Fix deadlock in oxubussuspend()
There is a deadlock in oxubussuspend(), which is shown below:
(Thread 1) | (Thread 2) | timeraction() oxubussuspend() | modtimer() spinlockirq() //(1) | (wait a time) ... | oxuwatchdog() deltimersync() | spinlockirq() //(2) (wait timer to stop) | ...
We hold oxu->lock in position (1) of thread 1, and use deltimersync() to wait timer to stop, but timer handler also need oxu->lock in position (2) of thread 2. As a result, oxubussuspend() will block forever.
This patch extracts deltimersync() from the protection of spinlockirq(), which could let timer handler to obtain the needed lock.
In the Linux kernel, the following vulnerability has been resolved:
NFSv4: Don't hold the layoutget locks across multiple RPC calls
When doing layoutget as part of the open() compound, we have to be careful to release the layout locks before we can call any further RPC calls, such as setattr(). The reason is that those calls could trigger a recall, which could deadlock.
In the Linux kernel, the following vulnerability has been resolved:
drm/msm/mdp5: Return error code in mdp5piperelease when deadlock is detected
mdp5getglobalstate runs the risk of hitting a -EDEADLK when acquiring the modeset lock, but currently mdp5piperelease doesn't check for if an error is returned. Because of this, there is a possibility of mdp5piperelease hitting a NULL dereference error.
To avoid this, let's have mdp5piperelease check if mdp5getglobalstate returns an error and propogate that error.
Changes since v1: - Separated declaration and initialization of newstate to avoid compiler warning - Fixed some spelling mistakes in commit message
Changes since v2: - Return 0 in case where hwpipe is NULL as this is considered normal behavior - Added 2nd patch in series to fix a similar NULL dereference issue in mdp5mixerrelease
Patchwork: https://patchwork.freedesktop.org/patch/485179/
In the Linux kernel, the following vulnerability has been resolved:
ARM: versatile: Add missing ofnodeput in dcscbinit
The devicenode pointer is returned by offindcompatiblenode with refcount incremented. We should use ofnodeput() to avoid the refcount leak.
In the Linux kernel, the following vulnerability has been resolved:
ALSA: pcm: Check for null pointer of pointer substream before dereferencing it
Pointer substream is being dereferenced on the assignment of pointer card before substream is being null checked with the macro PCMRUNTIMECHECK. Although PCMRUNTIMECHECK calls BUGON, it still is useful to perform the the pointer check before card is assigned.
In the Linux kernel, the following vulnerability has been resolved:
drm/msm: don't free the IRQ if it was not requested
As msmdrmuninit() is called from the msmdrminit() error path, additional care should be necessary as not to call the freeirq() for the IRQ that was not requested before (because an error occured earlier than the requestirq() call).
This fixed the issue reported with the following backtrace:
[ 8.571329] Trying to free already-free IRQ 187 [ 8.571339] WARNING: CPU: 0 PID: 76 at kernel/irq/manage.c:1895 freeirq+0x1e0/0x35c [ 8.588746] Modules linked in: pmicglink pdrinterface fastrpc qrtrsmd sndsochdmicodec msm fsa4480 gpusched drmdpauxbus qrtr i2cqcomgeni crct10difce qcomstats qcomq6v5pas drmdisplayhelper gpi qcompilinfo drmkmshelper qcomq6v5 qcomsysmon qcomcommon qcomglinksmem qcomrng mdtloader qmihelpers phyqcomqmp ufsqcom typec qnocsm8350 socinfo rmtfsmem fuse drm ipv6 [ 8.624154] CPU: 0 PID: 76 Comm: kworker/u16:2 Not tainted 5.18.0-rc5-next-20220506-00033-g6cee8cab6089-dirty #419 [ 8.624161] Hardware name: Qualcomm Technologies, Inc. SM8350 HDK (DT) [ 8.641496] Workqueue: eventsunbound deferredprobeworkfunc [ 8.647510] pstate: 604000c5 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 8.654681] pc : freeirq+0x1e0/0x35c [ 8.658454] lr : freeirq+0x1e0/0x35c [ 8.662228] sp : ffff800008ab3950 [ 8.665642] x29: ffff800008ab3950 x28: 0000000000000000 x27: ffff16350f56a700 [ 8.672994] x26: ffff1635025df080 x25: ffff16350251badc x24: ffff16350251bb90 [ 8.680343] x23: 0000000000000000 x22: 00000000000000bb x21: ffff16350e8f9800 [ 8.687690] x20: ffff16350251ba00 x19: ffff16350cbd5880 x18: ffffffffffffffff [ 8.695039] x17: 0000000000000000 x16: ffffa2dd12179434 x15: ffffa2dd1431d02d [ 8.702391] x14: 0000000000000000 x13: ffffa2dd1431d028 x12: 662d79646165726c [ 8.709740] x11: ffffa2dd13fd2438 x10: 000000000000000a x9 : 00000000000000bb [ 8.717111] x8 : ffffa2dd13fd23f0 x7 : ffff800008ab3750 x6 : 00000000fffff202 [ 8.724487] x5 : ffff16377e870a18 x4 : 00000000fffff202 x3 : ffff735a6ae1b000 [ 8.731851] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff1635015f8000 [ 8.739217] Call trace: [ 8.741755] freeirq+0x1e0/0x35c [ 8.745198] msmdrmuninit.isra.0+0x14c/0x294 [msm] [ 8.750548] msmdrmbind+0x28c/0x5d0 [msm] [ 8.755081] trytobringupaggregatedevice+0x164/0x1d0 [ 8.760657] componentadd+0xa0/0x170 [ 8.764626] componentadd+0x14/0x20 [ 8.768337] dpdisplayprobe+0x2a4/0x464 [msm] [ 8.773242] platformprobe+0x68/0xe0 [ 8.777043] reallyprobe.part.0+0x9c/0x28c [ 8.781368] driverprobedevice+0x98/0x144 [ 8.785871] driverprobedevice+0x40/0x140 [ 8.790191] deviceattachdriver+0xb4/0x120 [ 8.794788] busforeachdrv+0x78/0xd0 [ 8.798751] deviceattach+0xdc/0x184 [ 8.802713] deviceinitialprobe+0x14/0x20 [ 8.807031] busprobedevice+0x9c/0xa4 [ 8.810991] deferredprobeworkfunc+0x88/0xc0 [ 8.815667] processonework+0x1d0/0x320 [ 8.819809] workerthread+0x14c/0x444 [ 8.823688] kthread+0x10c/0x110 [ 8.827036] retfromfork+0x10/0x20
Patchwork: https://patchwork.freedesktop.org/patch/485422/
In the Linux kernel, the following vulnerability has been resolved:
spi: spi-fsl-qspi: check return value after calling platformgetresourcebyname()
It will cause null-ptr-deref if platformgetresourcebyname() returns NULL, we need check the return value.
In the Linux kernel, the following vulnerability has been resolved:
net: phy: micrel: Allow probing without .driverdata
Currently, if the .probe element is present in the phydriver structure and the .driverdata is not, a NULL pointer dereference happens.
Allow passing .probe without .driverdata by inserting NULL checks for priv->type.
In the Linux kernel, the following vulnerability has been resolved:
media: rga: fix possible memory leak in rgaprobe
rga->m2mdev needs to be freed when rgaprobe fails.
In the Linux kernel, the following vulnerability has been resolved:
drm/msm/mdp5: Return error code in mdp5mixerrelease when deadlock is detected
There is a possibility for mdp5getglobalstate to return -EDEADLK when acquiring the modeset lock, but currently globalstate in mdp5mixerrelease doesn't check for if an error is returned.
To avoid a NULL dereference error, let's have mdp5mixerrelease check if an error is returned and propagate that error.
Patchwork: https://patchwork.freedesktop.org/patch/485181/
In the Linux kernel, the following vulnerability has been resolved:
mtd: rawnand: cadence: fix possible null-ptr-deref in cadencenanddtprobe()
It will cause null-ptr-deref when using 'res', if platformgetresource() returns NULL, so move using 'res' after devmioremapresource() that will check it to avoid null-ptr-deref. And use devmplatformgetandioremapresource() to simplify code.
In the Linux kernel, the following vulnerability has been resolved:
net: ethernet: ti: am65-cpsw: Fix segmentation fault at module unload
Move am65cpswnussphylinkcleanup() call to after am65cpswnusscleanupndev() so phylink is still valid to prevent the below Segmentation fault on module remove when first slave link is up.
[ 31.652944] Unable to handle kernel paging request at virtual address 00040008000005f4 [ 31.684627] Mem abort info: [ 31.687446] ESR = 0x0000000096000004 [ 31.704614] EC = 0x25: DABT (current EL), IL = 32 bits [ 31.720663] SET = 0, FnV = 0 [ 31.723729] EA = 0, S1PTW = 0 [ 31.740617] FSC = 0x04: level 0 translation fault [ 31.756624] Data abort info: [ 31.759508] ISV = 0, ISS = 0x00000004 [ 31.776705] CM = 0, WnR = 0 [ 31.779695] [00040008000005f4] address between user and kernel address ranges [ 31.808644] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP [ 31.814928] Modules linked in: wlcoresdio wl18xx wlcore mac80211 libarc4 cfg80211 rfkill crct10difce phygmiisel tiam65cpswnuss(-) schfqcodel ipv6 [ 31.828776] CPU: 0 PID: 1026 Comm: modprobe Not tainted 6.1.0-rc2-00012-gfabfcf7dafdb-dirty #160 [ 31.837547] Hardware name: Texas Instruments AM625 (DT) [ 31.842760] pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 31.849709] pc : phystop+0x18/0xf8 [ 31.853202] lr : phylinkstop+0x38/0xf8 [ 31.857031] sp : ffff80000a0839f0 [ 31.860335] x29: ffff80000a0839f0 x28: ffff000000de1c80 x27: 0000000000000000 [ 31.867462] x26: 0000000000000000 x25: 0000000000000000 x24: ffff80000a083b98 [ 31.874589] x23: 0000000000000800 x22: 0000000000000001 x21: ffff000001bfba90 [ 31.881715] x20: ffff0000015ee000 x19: 0004000800000200 x18: 0000000000000000 [ 31.888842] x17: ffff800076c45000 x16: ffff800008004000 x15: 000058e39660b106 [ 31.895969] x14: 0000000000000144 x13: 0000000000000144 x12: 0000000000000000 [ 31.903095] x11: 000000000000275f x10: 00000000000009e0 x9 : ffff80000a0837d0 [ 31.910222] x8 : ffff000000de26c0 x7 : ffff00007fbd6540 x6 : ffff00007fbd64c0 [ 31.917349] x5 : ffff00007fbd0b10 x4 : ffff00007fbd0b10 x3 : ffff00007fbd3920 [ 31.924476] x2 : d0a07fcff8b8d500 x1 : 0000000000000000 x0 : 0004000800000200 [ 31.931603] Call trace: [ 31.934042] phystop+0x18/0xf8 [ 31.937177] phylinkstop+0x38/0xf8 [ 31.940657] am65cpswnussndoslavestop+0x28/0x1e0 [tiam65cpswnuss] [ 31.947452] devclosemany+0xa4/0x140 [ 31.951371] devclosemany+0x84/0x128 [ 31.955115] unregisternetdevicemany+0x130/0x6d0 [ 31.959897] unregisternetdevicequeue+0x94/0xd8 [ 31.964591] unregisternetdev+0x24/0x38 [ 31.968504] am65cpswnusscleanupndev.isra.0+0x48/0x70 [tiam65cpswnuss] [ 31.975637] am65cpswnussremove+0x58/0xf8 [tiam65cpswnuss]
In the Linux kernel, the following vulnerability has been resolved:
vfio: Split migration ops from main device ops
vfio core checks whether the driver sets some migration op (e.g. setstate/getstate) and accordingly calls its op.
However, currently mlx5 driver sets the above ops without regards to its migration caps.
This might lead to unexpected usage/Oops if user space may call to the above ops even if the driver doesn't support migration. As for example, the migration statemutex is not initialized in that case.
The cleanest way to manage that seems to split the migration ops from the main device ops, this will let the driver setting them separately from the main ops when it's applicable.
As part of that, validate ops construction on registration and include a check for VFIOMIGRATIONSTOPCOPY since the uAPI claims it must be set in migrationflags.
HISI driver was changed as well to match this scheme.
This scheme may enable down the road to come with some extra group of ops (e.g. DMA log) that can be set without regards to the other options based on driver caps.
In the Linux kernel, the following vulnerability has been resolved:
iommu/arm-smmu-v3: check return value after calling platformgetresource()
It will cause null-ptr-deref if platformgetresource() returns NULL, we need check the return value.
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5: E-Switch, pair only capable devices
OFFLOADS paring using devcom is possible only on devices that support LAG. Filter based on lag capabilities.
This fixes an issue where mlx5getnextphysdev() was called without holding the interface lock.
This issue was found when commit bc4c2f2e0179 ("net/mlx5: Lag, filter non compatible devices") added an assert that verifies the interface lock is held.
WARNING: CPU: 9 PID: 1706 at drivers/net/ethernet/mellanox/mlx5/core/dev.c:642 mlx5getnextphysdev+0xd2/0x100 [mlx5core] Modules linked in: mlx5vdpa vringh vhostiotlb vdpa mlx5ib mlx5core xtconntrack xtMASQUERADE nfconntracknetlink nfnetlink xtaddrtype iptablenat nfnat brnetfilter rpcrdma rdmaucm ibiser libiscsi scsitransportiscsi rdmacm iwcm ibumad ibipoib ibcm ibuverbs ibcore overlay fuse [last unloaded: mlx5core] CPU: 9 PID: 1706 Comm: devlink Not tainted 5.18.0-rc7+ #11 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:mlx5getnextphysdev+0xd2/0x100 [mlx5core] Code: 02 00 75 48 48 8b 85 80 04 00 00 5d c3 31 c0 5d c3 be ff ff ff ff 48 c7 c7 08 41 5b a0 e8 36 87 28 e3 85 c0 0f 85 6f ff ff ff <0f> 0b e9 68 ff ff ff 48 c7 c7 0c 91 cc 84 e8 cb 36 6f e1 e9 4d ff RSP: 0018:ffff88811bf47458 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff88811b398000 RCX: 0000000000000001 RDX: 0000000080000000 RSI: ffffffffa05b4108 RDI: ffff88812daaaa78 RBP: ffff88812d050380 R08: 0000000000000001 R09: ffff88811d6b3437 R10: 0000000000000001 R11: 00000000fddd3581 R12: ffff88815238c000 R13: ffff88812d050380 R14: ffff8881018aa7e0 R15: ffff88811d6b3428 FS: 00007fc82e18ae80(0000) GS:ffff88842e080000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f9630d1b421 CR3: 0000000149802004 CR4: 0000000000370ea0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> mlx5eswoffloadsdevcomevent+0x99/0x3b0 [mlx5core] mlx5devcomsendevent+0x167/0x1d0 [mlx5core] eswoffloadsenable+0x1153/0x1500 [mlx5core] ? mlx5eswoffloadscontrollervalid+0x170/0x170 [mlx5core] ? waitforcompletioniotimeout+0x20/0x20 ? mlx5rescandriverslocked+0x318/0x810 [mlx5core] mlx5eswitchenablelocked+0x586/0xc50 [mlx5core] ? mlx5eswitchdisablepfvfvports+0x1d0/0x1d0 [mlx5core] ? mlx5eswtrylock+0x1b/0xb0 [mlx5core] ? mlx5eswitchenable+0x270/0x270 [mlx5core] ? debugfscreatefile+0x260/0x3e0 mlx5devlinkeswitchmodeset+0x27e/0x870 [mlx5core] ? mutexlockionested+0x12c0/0x12c0 ? eswoffloadsdisable+0x250/0x250 [mlx5core] ? devlinknlcmdtrapgetdumpit+0x470/0x470 ? rcureadlockschedheld+0x3f/0x70 devlinknlcmdeswitchsetdoit+0x217/0x620
In the Linux kernel, the following vulnerability has been resolved:
tty: Fix a possible resource leak in icomprobe
When pcireadconfigdword failed, call pcireleaseregions() and pcidisabledevice() to recycle the resource previously allocated.
In the Linux kernel, the following vulnerability has been resolved:
RDMA/hns: Fix NULL pointer problem in freemrinit()
Lock grab occurs in a concurrent scenario, resulting in stepping on a NULL pointer. It should be init mutexinit() first before use the lock.
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 Call trace: mutexlock.constprop.0+0xd0/0x5c0 mutexlockslowpath+0x1c/0x2c mutexlock+0x44/0x50 freemrsendcmdtohw+0x7c/0x1c0 [hnsrocehwv2] hnsrocev2deregmr+0x30/0x40 [hnsrocehwv2] hnsrocederegmr+0x4c/0x130 [hnsrocehwv2] ibderegmruser+0x54/0x124 uverbsfreemr+0x24/0x30 destroyhwidruobject+0x38/0x74 uverbsdestroyuobject+0x48/0x1c4 uobjdestroy+0x74/0xcc ibuverbscmdverbs+0x368/0xbb0 ibuverbsioctl+0xec/0x1a4 arm64sysioctl+0xb4/0x100 invokesyscall+0x50/0x120 el0svccommon.constprop.0+0x58/0x190 doel0svc+0x30/0x90 el0svc+0x2c/0xb4 el0t64synchandler+0x1a4/0x1b0 el0t64sync+0x19c/0x1a0
In the Linux kernel, the following vulnerability has been resolved:
drbd: only clone bio if we have a backing device
Commit c347a787e34cb (drbd: set ->bibdev in drbdreqnew) moved a biosetdev call (which has since been removed) to "earlier", from drbdrequestprepare to drbdreqnew.
The problem is that this accesses device->ldev->backingbdev, which is not NULL-checked at this point. When we don't have an ldev (i.e. when the DRBD device is diskless), this leads to a null pointer deref.
So, only allocate the privatebio if we actually have a disk. This is also a small optimization, since we don't clone the bio to only to immediately free it again in the diskless case.
In the Linux kernel, the following vulnerability has been resolved:
VMCI: Use threaded irqs instead of tasklets
The vmcidispatchdgs() tasklet function calls vmcireaddata() which uses waitevent() resulting in invalid sleep in an atomic context (and therefore potentially in a deadlock).
Use threaded irqs to fix this issue and completely remove usage of tasklets.
[ 20.264639] BUG: sleeping function called from invalid context at drivers/misc/vmwvmci/vmciguest.c:145 [ 20.264643] inatomic(): 1, irqsdisabled(): 0, nonblock: 0, pid: 762, name: vmtoolsd [ 20.264645] preemptcount: 101, expected: 0 [ 20.264646] RCU nest depth: 0, expected: 0 [ 20.264647] 1 lock held by vmtoolsd/762: [ 20.264648] #0: ffff0000874ae440 (sklock-AFVSOCK){+.+.}-{0:0}, at: vsockconnect+0x60/0x330 [vsock] [ 20.264658] Preemption disabled at: [ 20.264659] [<ffff80000151d7d8>] vmcisenddatagram+0x44/0xa0 [vmwvmci] [ 20.264665] CPU: 0 PID: 762 Comm: vmtoolsd Not tainted 5.19.0-0.rc8.20220727git39c3c396f813.60.fc37.aarch64 #1 [ 20.264667] Hardware name: VMware, Inc. VBSA/VBSA, BIOS VEFI 12/31/2020 [ 20.264668] Call trace: [ 20.264669] dumpbacktrace+0xc4/0x130 [ 20.264672] showstack+0x24/0x80 [ 20.264673] dumpstacklvl+0x88/0xb4 [ 20.264676] dumpstack+0x18/0x34 [ 20.264677] mightresched+0x1a0/0x280 [ 20.264679] mightsleep+0x58/0x90 [ 20.264681] vmcireaddata+0x74/0x120 [vmwvmci] [ 20.264683] vmcidispatchdgs+0x64/0x204 [vmwvmci] [ 20.264686] taskletactioncommon.constprop.0+0x13c/0x150 [ 20.264688] taskletaction+0x40/0x50 [ 20.264689] dosoftirq+0x23c/0x6b4 [ 20.264690] irqexitrcu+0x104/0x214 [ 20.264691] irqexitrcu+0x1c/0x50 [ 20.264693] el1interrupt+0x38/0x6c [ 20.264695] el1h64irqhandler+0x18/0x24 [ 20.264696] el1h64irq+0x68/0x6c [ 20.264697] preemptcountsub+0xa4/0xe0 [ 20.264698] rawspinunlockirqrestore+0x64/0xb0 [ 20.264701] vmcisenddatagram+0x7c/0xa0 [vmwvmci] [ 20.264703] vmcidatagramdispatch+0x84/0x100 [vmwvmci] [ 20.264706] vmcidatagramsend+0x2c/0x40 [vmwvmci] [ 20.264709] vmcitransportsendcontrolpkt+0xb8/0x120 [vmwvsockvmcitransport] [ 20.264711] vmcitransportconnect+0x40/0x7c [vmwvsockvmcitransport] [ 20.264713] vsockconnect+0x278/0x330 [vsock] [ 20.264715] sysconnectfile+0x8c/0xc0 [ 20.264718] sysconnect+0x84/0xb4 [ 20.264720] arm64sysconnect+0x2c/0x3c [ 20.264721] invokesyscall+0x78/0x100 [ 20.264723] el0svccommon.constprop.0+0x68/0x124 [ 20.264724] doel0svc+0x38/0x4c [ 20.264725] el0svc+0x60/0x180 [ 20.264726] el0t64synchandler+0x11c/0x150 [ 20.264728] el0t64sync+0x190/0x194