CVE-2023-53105

Source
https://nvd.nist.gov/vuln/detail/CVE-2023-53105
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-53105.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2023-53105
Downstream
Related
Published
2025-05-02T15:55:46Z
Modified
2025-10-14T09:57:32.233523Z
Summary
net/mlx5e: Fix cleanup null-ptr deref on encap lock
Details

In the Linux kernel, the following vulnerability has been resolved:

net/mlx5e: Fix cleanup null-ptr deref on encap lock

During module is unloaded while a peer tc flow is still offloaded, first the peer uplink rep profile is changed to a nic profile, and so neigh encap lock is destroyed. Next during unload, the VF reps netdevs are unregistered which causes the original non-peer tc flow to be deleted, which deletes the peer flow. The peer flow deletion detaches the encap entry and try to take the already destroyed encap lock, causing the below trace.

Fix this by clearing peer flows during tc eswitch cleanup (mlx5etcesw_cleanup()).

Relevant trace: [ 4316.837128] BUG: kernel NULL pointer dereference, address: 00000000000001d8 [ 4316.842239] RIP: 0010:_mutexlock+0xb5/0xc40 [ 4316.851897] Call Trace: [ 4316.852481] <TASK> [ 4316.857214] mlx5erepneighentryrelease+0x93/0x790 [mlx5core] [ 4316.858258] mlx5erepencapentrydetach+0xa7/0xf0 [mlx5core] [ 4316.859134] mlx5eencapdealloc+0xa3/0xf0 [mlx5core] [ 4316.859867] cleanencapdests.part.0+0x5c/0xe0 [mlx5core] [ 4316.860605] mlx5etcdelfdbflow+0x32a/0x810 [mlx5core] [ 4316.862609] _mlx5etcdelfdbpeerflow+0x1a2/0x250 [mlx5core] [ 4316.863394] mlx5etcdelflow+0x(/0x630 [mlx5core] [ 4316.864090] mlx5eflowput+0x5f/0x100 [mlx5core] [ 4316.864771] mlx5edeleteflower+0x4de/0xa40 [mlx5core] [ 4316.865486] tcsetupcbreoffload+0x20/0x80 [ 4316.865905] flreoffload+0x47c/0x510 [clsflower] [ 4316.869181] tcfblockplaybackoffloads+0x91/0x1d0 [ 4316.869649] tcfblockunbind+0xe7/0x1b0 [ 4316.870049] tcfblockoffloadcmd.isra.0+0x1ee/0x270 [ 4316.879266] tcfblockoffloadunbind+0x61/0xa0 [ 4316.879711] _tcfblock_put+0xa4/0x310

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
04de7dda7394fa9c2b0fc9cec65661d9b4f0d04d
Fixed
b7350f8dbe0c2a1d4d3ad7c35b610abd3cb91750
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
04de7dda7394fa9c2b0fc9cec65661d9b4f0d04d
Fixed
01fdaea410787fe372daeaeda93a29ed0606d334
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
04de7dda7394fa9c2b0fc9cec65661d9b4f0d04d
Fixed
c9668f0b1d28570327dbba189f2c61f6f9e43ae7

Affected versions

v4.*

v4.20
v4.20-rc7

v5.*

v5.0
v5.0-rc1
v5.0-rc2
v5.0-rc3
v5.0-rc4
v5.0-rc5
v5.0-rc6
v5.0-rc7
v5.0-rc8
v5.1
v5.1-rc1
v5.1-rc2
v5.1-rc3
v5.1-rc4
v5.1-rc5
v5.1-rc6
v5.1-rc7
v5.10
v5.10-rc1
v5.10-rc2
v5.10-rc3
v5.10-rc4
v5.10-rc5
v5.10-rc6
v5.10-rc7
v5.11
v5.11-rc1
v5.11-rc2
v5.11-rc3
v5.11-rc4
v5.11-rc5
v5.11-rc6
v5.11-rc7
v5.12
v5.12-rc1
v5.12-rc1-dontuse
v5.12-rc2
v5.12-rc3
v5.12-rc4
v5.12-rc5
v5.12-rc6
v5.12-rc7
v5.12-rc8
v5.13
v5.13-rc1
v5.13-rc2
v5.13-rc3
v5.13-rc4
v5.13-rc5
v5.13-rc6
v5.13-rc7
v5.14
v5.14-rc1
v5.14-rc2
v5.14-rc3
v5.14-rc4
v5.14-rc5
v5.14-rc6
v5.14-rc7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