gtp: Fix use-after-free in __gtp_encap_destroy().
In the Linux kernel, the following vulnerability has been resolved: gtp: Fix use-after-free in __gtp_encap_destroy(). syzkaller reported use-after-free in __gtp_encap_destroy(). [0] It shows the same process freed sk and touched it illegally. Commit e198987e7dd7 ("gtp: fix suspicious RCU usage") added lock_sock() and release_sock() in __gtp_encap_destroy() to protect sk->sk_user_data, but release_sock() is called after sock_put() releases the last refcnt. [0]: BUG: KASAN: slab-use-after-free in instrument_atomic_read_write include/linux/instrumented.h:96 [inline] BUG: KASAN: slab-use-after-free in atomic_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:541 [inline] BUG: KASAN: slab-use-after-free in queued_spin_lock include/asm-generic/qspinlock.h:111 [inline] BUG: KASAN: slab-use-after-free in do_raw_spin_lock include/linux/spinlock.h:186 [inline] BUG: KASAN: slab-use-after-free in __raw_spin_lock_bh include/linux/spinlock_api_smp.h:127 [inline] BUG: KASAN: slab-use-after-free in _raw_spin_lock_bh+0x75/0xe0 kernel/locking/spinlock.c:178 Write of size 4 at addr ffff88800dbef398 by task syz-executor.2/2401 CPU: 1 PID: 2401 Comm: syz-executor.2 Not tainted 6.4.0-rc5-01219-gfa0e21fa4443 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x72/0xa0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:351 [inline] print_r
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 4.14.322, 4.19.291, 5.10.188, 5.15.121, 5.4.251, 6.1.39, 6.3.13, 6.4.4
- CVEs
- CVE-2023-54142
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 28 Oct 2026, 08:57 UTC · Revision 1
Source evidence
gtp: Fix use-after-free in __gtp_encap_destroy().
core-osv · Original sourcePublished 24 Dec 2025, 13:06 UTC
In the Linux kernel, the following vulnerability has been resolved: gtp: Fix use-after-free in __gtp_encap_destroy(). syzkaller reported use-after-free in __gtp_encap_destroy(). [0] It shows the same process freed sk and touched it illegally. Commit e198987e7dd7 ("gtp: fix suspicious RCU usage") added lock_sock() and release_sock() in __gtp_encap_destroy() to protect sk->sk_user_data, but release_sock() is called after sock_put() releases the last refcnt. [0]: BUG: KASAN: slab-use-after-free in instrument_atomic_read_write include/linux/instrumented.h:96 [inline] BUG: KASAN: slab-use-after-free in atomic_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:541 [inline] BUG: KASAN: slab-use-after-free in queued_spin_lock include/asm-generic/qspinlock.h:111 [inline] BUG: KASAN: slab-use-after-free in do_raw_spin_lock include/linux/spinlock.h:186 [inline] BUG: KASAN: slab-use-after-free in __raw_spin_lock_bh include/linux/spinlock_api_smp.h:127 [inline] BUG: KASAN: slab-use-after-free in _raw_spin_lock_bh+0x75/0xe0 kernel/locking/spinlock.c:178 Write of size 4 at addr ffff88800dbef398 by task syz-executor.2/2401 CPU: 1 PID: 2401 Comm: syz-executor.2 Not tainted 6.4.0-rc5-01219-gfa0e21fa4443 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x72/0xa0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:351 [inline] print_r
osv:CVE-2023-54142
Kernel
Fixed versions: 4.14.322, 4.19.291, 5.4.251, 5.10.188, 5.15.121, 6.1.39, 6.3.13, 6.4.4
Complete source record
{
"id": "211513d8e511610ca52aa6605cf0d02625a12f091e8cfc8f12e9abf5dea6444c",
"url": "https://osv.dev/vulnerability/CVE-2023-54142",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "gtp: Fix use-after-free in __gtp_encap_destroy().",
"summary": "In the Linux kernel, the following vulnerability has been resolved: gtp: Fix use-after-free in __gtp_encap_destroy(). syzkaller reported use-after-free in __gtp_encap_destroy(). [0] It shows the same process freed sk and touched it illegally. Commit e198987e7dd7 (\"gtp: fix suspicious RCU usage\") added lock_sock() and release_sock() in __gtp_encap_destroy() to protect sk->sk_user_data, but release_sock() is called after sock_put() releases the last refcnt. [0]: BUG: KASAN: slab-use-after-free in instrument_atomic_read_write include/linux/instrumented.h:96 [inline] BUG: KASAN: slab-use-after-free in atomic_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:541 [inline] BUG: KASAN: slab-use-after-free in queued_spin_lock include/asm-generic/qspinlock.h:111 [inline] BUG: KASAN: slab-use-after-free in do_raw_spin_lock include/linux/spinlock.h:186 [inline] BUG: KASAN: slab-use-after-free in __raw_spin_lock_bh include/linux/spinlock_api_smp.h:127 [inline] BUG: KASAN: slab-use-after-free in _raw_spin_lock_bh+0x75/0xe0 kernel/locking/spinlock.c:178 Write of size 4 at addr ffff88800dbef398 by task syz-executor.2/2401 CPU: 1 PID: 2401 Comm: syz-executor.2 Not tainted 6.4.0-rc5-01219-gfa0e21fa4443 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x72/0xa0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:351 [inline] print_r",
"evidence": "osv:CVE-2023-54142",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "4.14.322",
"evidence": "/affected/1/ranges"
},
{
"value": "4.19.291",
"evidence": "/affected/1/ranges"
},
{
"value": "5.4.251",
"evidence": "/affected/1/ranges"
},
{
"value": "5.10.188",
"evidence": "/affected/1/ranges"
},
{
"value": "5.15.121",
"evidence": "/affected/1/ranges"
},
{
"value": "6.1.39",
"evidence": "/affected/1/ranges"
},
{
"value": "6.3.13",
"evidence": "/affected/1/ranges"
},
{
"value": "6.4.4",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2023-54142",
"aliases": [
"CVE-2023-54142"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "01f3c64e405ab3d25887d080a103ad76f30661d2"
},
{
"fixed": "d38039697184aacff1cf576e14ef583112fdefef"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "e117a04133c673cc54292e12086a8177cd9bd4a4"
},
{
"fixed": "e5aa6d829831a55a693dbaeb58f8d22ba7f2b3e6"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "e198987e7dd7d3645a53875151cd6f8fc425b706"
},
{
"fixed": "9c9662e2512b5e4ee7b03108802c5222e0fa77a4"
},
{
"fixed": "bccc7ace12e69dee4684a3bb4b69737972e570d6"
},
{
"fixed": "ebd6d2077a083329110695a996c00e8ca94bc640"
},
{
"fixed": "17d6b6354f0025b7c10a56da783fd0cbb3819c5d"
},
{
"fixed": "dae6095bdb24f537b4798ffd9201515b97bac94e"
},
{
"fixed": "58fa341327fdb4bdf92597fd8796a9abc8d20ea3"
},
{
"fixed": "ce3aee7114c575fab32a5e9e939d4bbb3dcca79f"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "4.14.135"
},
{
"fixed": "4.14.322"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "4.19.61"
},
{
"fixed": "4.19.291"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "5.1.20"
},
{
"fixed": "5.2"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "5.2.3"
},
{
"fixed": "5.3"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "bf75202df8e473d4ee914894542f213158066d8b"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "76357f65f18f180f44ccbbbf713461881d0ab219"
}
]
}
],
"versions": [
"v4.14.321",
"v4.14.320",
"v4.14.319",
"v4.14.318",
"v4.14.317",
"v4.14.316",
"v4.14.315",
"v4.14.314",
"v4.14.313",
"v4.14.312",
"v4.14.311",
"v4.14.310",
"v4.14.309",
"v4.14.308",
"v4.14.307",
"v4.14.306",
"v4.14.305",
"v4.14.304",
"v4.14.303",
"v4.14.302",
"v4.14.301",
"v4.14.300",
"v4.14.299",
"v4.14.298",
"v4.14.297",
"v4.14.296",
"v4.14.295",
"v4.14.294",
"v4.14.293",
"v4.14.292",
"v4.14.291",
"v4.14.290",
"v4.14.289",
"v4.14.288",
"v4.14.287",
"v4.14.286",
"v4.14.285",
"v4.14.284",
"v4.14.283",
"v4.14.282",
"v4.14.281",
"v4.14.280",
"v4.14.279",
"v4.14.278",
"v4.14.277",
"v4.14.276",
"v4.14.275",
"v4.14.274",
"v4.14.273",
"v4.14.272",
"v4.14.271",
"v4.14.270",
"v4.14.269",
"v4.14.268",
"v4.14.267",
"v4.14.266",
"v4.14.265",
"v4.14.264",
"v4.14.263",
"v4.14.262",
"v4.14.261",
"v4.14.260",
"v4.14.259",
"v4.14.258",
"v4.14.257",
"v4.14.256",
"v4.14.255",
"v4.14.254",
"v4.14.253",
"v4.14.252",
"v4.14.251",
"v4.14.250",
"v4.14.249",
"v4.14.248",
"v4.14.247",
"v4.14.246",
"v4.14.245",
"v4.14.244",
"v4.14.243",
"v4.14.242",
"v4.14.241",
"v4.14.240",
"v4.14.239",
"v4.14.238",
"v4.14.237",
"v4.14.236",
"v4.14.235",
"v4.14.234",
"v4.14.233",
"v4.14.232",
"v4.14.231",
"v4.14.230",
"v4.14.229",
"v4.14.228",
"v4.14.227",
"v4.14.226",
"v4.14.225",
"v4.14.224",
"v4.14.223",
"v4.14.222",
"v4.14.221",
"v4.14.220",
"v4.14.219",
"v4.14.218",
"v4.14.217",
"v4.14.216",
"v4.14.215",
"v4.14.214",
"v4.14.213",
"v4.14.212",
"v4.14.211",
"v4.14.210",
"v4.14.209",
"v4.14.208",
"v4.14.207",
"v4.14.206",
"v4.14.205",
"v4.14.204",
"v4.14.203",
"v4.14.202",
"v4.14.201",
"v4.14.200",
"v4.14.199",
"v4.14.198",
"v4.14.197",
"v4.14.196",
"v4.14.195",
"v4.14.194",
"v4.14.193",
"v4.14.192",
"v4.14.191",
"v4.14.190",
"v4.14.189",
"v4.14.188",
"v4.14.187",
"v4.14.186",
"v4.14.185",
"v4.14.184",
"v4.14.183",
"v4.14.182",
"v4.14.181",
"v4.14.180",
"v4.14.179",
"v4.14.178",
"v4.14.177",
"v4.14.176",
"v4.14.175",
"v4.14.174",
"v4.14.173",
"v4.14.172",
"v4.14.171",
"v4.14.170",
"v4.14.169",
"v4.14.168",
"v4.14.167",
"v4.14.166",
"v4.14.165",
"v4.14.164",
"v4.14.163",
"v4.14.162",
"v4.14.161",
"v4.14.160",
"v4.14.159",
"v4.14.158",
"v4.14.157",
"v4.14.156",
"v4.14.155",
"v4.14.154",
"v4.14.153",
"v4.14.152",
"v4.14.151",
"v4.14.150",
"v4.14.149",
"v4.14.148",
"v4.14.147",
"v4.14.146",
"v4.14.145",
"v4.14.144",
"v4.14.143",
"v4.14.142",
"v4.14.141",
"v4.14.140",
"v4.14.139",
"v4.14.138",
"v4.14.137",
"v4.14.136",
"v4.14.135",
"v4.19.290",
"v4.19.289",
"v4.19.288",
"v4.19.287",
"v4.19.286",
"v4.19.285",
"v4.19.284",
"v4.19.283",
"v4.19.282",
"v4.19.281",
"v4.19.280",
"v4.19.279",
"v4.19.278",
"v4.19.277",
"v4.19.276",
"v4.19.275",
"v4.19.274",
"v4.19.273",
"v4.19.272",
"v4.19.271",
"v4.19.270",
"v4.19.269",
"v4.19.268",
"v4.19.267",
"v4.19.266",
"v4.19.265",
"v4.19.264",
"v4.19.263",
"v4.19.262",
"v4.19.261",
"v4.19.260",
"v4.19.259",
"v4.19.258",
"v4.19.257",
"v4.19.256",
"v4.19.255",
"v4.19.254",
"v4.19.253",
"v4.19.252",
"v4.19.251",
"v4.19.250",
"v4.19.249",
"v4.19.248",
"v4.19.247",
"v4.19.246",
"v4.19.245",
"v4.19.244",
"v4.19.243",
"v4.19.242",
"v4.19.241",
"v4.19.240",
"v4.19.239",
"v4.19.238",
"v4.19.237",
"v4.19.236",
"v4.19.235",
"v4.19.234",
"v4.19.233",
"v4.19.232",
"v4.19.231",
"v4.19.230",
"v4.19.229",
"v4.19.228",
"v4.19.227",
"v4.19.226",
"v4.19.225",
"v4.19.224",
"v4.19.223",
"v4.19.222",
"v4.19.221",
"v4.19.220",
"v4.19.219",
"v4.19.218",
"v4.19.217",
"v4.19.216",
"v4.19.215",
"v4.19.214",
"v4.19.213",
"v4.19.212",
"v4.19.211",
"v4.19.210",
"v4.19.209",
"v4.19.208",
"v4.19.207",
"v4.19.206",
"v4.19.205",
"v4.19.204",
"v4.19.203",
"v4.19.202",
"v4.19.201",
"v4.19.200",
"v4.19.199",
"v4.19.198",
"v4.19.197",
"v4.19.196",
"v4.19.195",
"v4.19.194",
"v4.19.193",
"v4.19.192",
"v4.19.191",
"v4.19.190",
"v4.19.189",
"v4.19.188",
"v4.19.187",
"v4.19.186",
"v4.19.185",
"v4.19.184",
"v4.19.183",
"v4.19.182",
"v4.19.181",
"v4.19.180",
"v4.19.179",
"v4.19.178",
"v4.19.177",
"v4.19.176",
"v4.19.175",
"v4.19.174",
"v4.19.173",
"v4.19.172",
"v4.19.171",
"v4.19.170",
"v4.19.169",
"v4.19.168",
"v4.19.167",
"v4.19.166",
"v4.19.165",
"v4.19.164",
"v4.19.163",
"v4.19.162",
"v4.19.161",
"v4.19.160",
"v4.19.159",
"v4.19.158",
"v4.19.157",
"v4.19.156",
"v4.19.155",
"v4.19.154",
"v4.19.153",
"v4.19.152",
"v4.19.151",
"v4.19.150",
"v4.19.149",
"v4.19.148",
"v4.19.147",
"v4.19.146",
"v4.19.145",
"v4.19.144",
"v4.19.143",
"v4.19.142",
"v4.19.141",
"v4.19.140",
"v4.19.139",
"v4.19.138",
"v4.19.137",
"v4.19.136",
"v4.19.135",
"v4.19.134",
"v4.19.133",
"v4.19.132",
"v4.19.131",
"v4.19.130",
"v4.19.129",
"v4.19.128",
"v4.19.127",
"v4.19.126",
"v4.19.125",
"v4.19.124",
"v4.19.123",
"v4.19.122",
"v4.19.121",
"v4.19.120",
"v4.19.119",
"v4.19.118",
"v4.19.117",
"v4.19.116",
"v4.19.115",
"v4.19.114",
"v4.19.113",
"v4.19.112",
"v4.19.111",
"v4.19.110",
"v4.19.109",
"v4.19.108",
"v4.19.107",
"v4.19.106",
"v4.19.105",
"v4.19.104",
"v4.19.103",
"v4.19.102",
"v4.19.101",
"v4.19.100",
"v4.19.99",
"v4.19.98",
"v4.19.97",
"v4.19.96",
"v4.19.95",
"v4.19.94",
"v4.19.93",
"v4.19.92",
"v4.19.91",
"v4.19.90",
"v4.19.89",
"v4.19.88",
"v4.19.87",
"v4.19.86",
"v4.19.85",
"v4.19.84",
"v4.19.83",
"v4.19.82",
"v4.19.81",
"v4.19.80",
"v4.19.79",
"v4.19.78",
"v4.19.77",
"v4.19.76",
"v4.19.75",
"v4.19.74",
"v4.19.73",
"v4.19.72",
"v4.19.71",
"v4.19.70",
"v4.19.69",
"v4.19.68",
"v4.19.67",
"v4.19.66",
"v4.19.65",
"v4.19.64",
"v4.19.63",
"v4.19.62",
"v4.19.61",
"v5.1.21",
"v5.1.20",
"v5.2.21",
"v5.2.20",
"v5.2.19",
"v5.2.18",
"v5.2.17",
"v5.2.16",
"v5.2.15",
"v5.2.14",
"v5.2.13",
"v5.2.12",
"v5.2.11",
"v5.2.10",
"v5.2.9",
"v5.2.8",
"v5.2.7",
"v5.2.6",
"v5.2.5",
"v5.2.4",
"v5.2.3"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54142.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "4.14.322"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.15.0"
},
{
"fixed": "4.19.291"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.20.0"
},
{
"fixed": "5.4.251"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.3.0"
},
{
"fixed": "5.10.188"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.5.0"
},
{
"fixed": "5.15.121"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.11.0"
},
{
"fixed": "6.1.39"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "6.3.13"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.4.4"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54142.json"
}
}
],
"modified": "2026-10-08T02:48:35.852482025Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/17d6b6354f0025b7c10a56da783fd0cbb3819c5d",
"https://git.kernel.org/stable/c/58fa341327fdb4bdf92597fd8796a9abc8d20ea3",
"https://git.kernel.org/stable/c/9c9662e2512b5e4ee7b03108802c5222e0fa77a4",
"https://git.kernel.org/stable/c/bccc7ace12e69dee4684a3bb4b69737972e570d6",
"https://git.kernel.org/stable/c/ce3aee7114c575fab32a5e9e939d4bbb3dcca79f",
"https://git.kernel.org/stable/c/d38039697184aacff1cf576e14ef583112fdefef",
"https://git.kernel.org/stable/c/dae6095bdb24f537b4798ffd9201515b97bac94e",
"https://git.kernel.org/stable/c/e5aa6d829831a55a693dbaeb58f8d22ba7f2b3e6",
"https://git.kernel.org/stable/c/ebd6d2077a083329110695a996c00e8ca94bc640",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54142.json",
"https://nvd.nist.gov/vuln/detail/CVE-2023-54142",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54142.json"
}
},
"related_cves": [
{
"value": "CVE-2023-54142",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 98289,
"published_at": "2025-12-24T13:06:56.204+00:00"
}