In the Linux kernel, the following vulnerability has been resolved:
uio: Fix use-after-free in uio_open
uiounregisterdevice uioopen idev = idrfind() deviceunregister(&idev->dev) putdevice(&idev->dev) uiodevicerelease getdevice(&idev->dev) kfree(idev) uiofreeminor(minor) uiorelease put_device(&idev->dev)
In the core-1 uiounregisterdevice(), the deviceunregister will kfree idev when the idev->dev kobject ref is 1. But after core-1 deviceunregister, putdevice and before doing kfree, the core-2 may getdevice. Then: 1. After core-1 kfree idev, the core-2 will do use-after-free for idev. 2. When core-2 do uiorelease and putdevice, the idev will be double freed.
To address this issue, we can get idev atomic & inc idev reference with minor_lock.
[
{
"target": {
"file": "drivers/uio/uio.c"
},
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"25637862813570430150028689899054511243",
"284039532791897652967515511480722709202",
"225885273986592702892357228436399241947",
"182696424438124894938318372468649336642",
"38345659163619478199469823200032464579",
"88237423279483622664507537398369724201",
"91454792813174288487083679321181652140",
"264891331988053122758666192138232962437",
"136590445628889427115544681025750767380",
"151050674413565663253789548158826203175",
"197365326698251416961498446700706826215",
"281000864566439237324532776137266758882",
"49921195386811512751768241413405022766",
"240308089071627423998474521676995657242"
]
},
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2023-52439-05c599c1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0c9ae0b8605078eafc3bea053cc78791e97ba2e2"
},
{
"target": {
"function": "uio_open",
"file": "drivers/uio/uio.c"
},
"deprecated": false,
"digest": {
"function_hash": "103612488759327609912746289776611095620",
"length": 1005.0
},
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2023-52439-06fab9ae",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e93da893d52d82d57fc0db2ca566024e0f26ff50"
},
{
"target": {
"function": "uio_unregister_device",
"file": "drivers/uio/uio.c"
},
"deprecated": false,
"digest": {
"function_hash": "307880825728659815925390920887782762281",
"length": 498.0
},
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2023-52439-0e69ce2c",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0c9ae0b8605078eafc3bea053cc78791e97ba2e2"
},
{
"target": {
"function": "uio_open",
"file": "drivers/uio/uio.c"
},
"deprecated": false,
"digest": {
"function_hash": "103612488759327609912746289776611095620",
"length": 1005.0
},
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2023-52439-10e9bcc8",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@35f102607054faafe78d2a6994b18d5d9d6e92ad"
},
{
"target": {
"function": "uio_unregister_device",
"file": "drivers/uio/uio.c"
},
"deprecated": false,
"digest": {
"function_hash": "307880825728659815925390920887782762281",
"length": 498.0
},
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2023-52439-1a299298",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@17a8519cb359c3b483fb5c7367efa9a8a508bdea"
},
{
"target": {
"function": "uio_unregister_device",
"file": "drivers/uio/uio.c"
},
"deprecated": false,
"digest": {
"function_hash": "307880825728659815925390920887782762281",
"length": 498.0
},
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2023-52439-20e3b2d8",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5e0be1229ae199ebb90b33102f74a0f22d152570"
},
{
"target": {
"function": "uio_open",
"file": "drivers/uio/uio.c"
},
"deprecated": false,
"digest": {
"function_hash": "103612488759327609912746289776611095620",
"length": 1005.0
},
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2023-52439-2727e88f",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5e0be1229ae199ebb90b33102f74a0f22d152570"
},
{
"target": {
"function": "uio_open",
"file": "drivers/uio/uio.c"
},
"deprecated": false,
"digest": {
"function_hash": "326811743775496520023728117409986025380",
"length": 1026.0
},
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2023-52439-322a521f",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3174e0f7de1ba392dc191625da83df02d695b60c"
},
{
"target": {
"file": "drivers/uio/uio.c"
},
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"25637862813570430150028689899054511243",
"284039532791897652967515511480722709202",
"225885273986592702892357228436399241947",
"182696424438124894938318372468649336642",
"38345659163619478199469823200032464579",
"88237423279483622664507537398369724201",
"91454792813174288487083679321181652140",
"264891331988053122758666192138232962437",
"136590445628889427115544681025750767380",
"151050674413565663253789548158826203175",
"197365326698251416961498446700706826215",
"281000864566439237324532776137266758882",
"49921195386811512751768241413405022766",
"240308089071627423998474521676995657242"
]
},
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2023-52439-339a6ce4",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5e0be1229ae199ebb90b33102f74a0f22d152570"
},
{
"target": {
"file": "drivers/uio/uio.c"
},
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"25637862813570430150028689899054511243",
"284039532791897652967515511480722709202",
"225885273986592702892357228436399241947",
"182696424438124894938318372468649336642",
"38345659163619478199469823200032464579",
"88237423279483622664507537398369724201",
"91454792813174288487083679321181652140",
"264891331988053122758666192138232962437",
"136590445628889427115544681025750767380",
"151050674413565663253789548158826203175",
"197365326698251416961498446700706826215",
"281000864566439237324532776137266758882",
"49921195386811512751768241413405022766",
"240308089071627423998474521676995657242"
]
},
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2023-52439-450d1a05",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e93da893d52d82d57fc0db2ca566024e0f26ff50"
},
{
"target": {
"function": "uio_unregister_device",
"file": "drivers/uio/uio.c"
},
"deprecated": false,
"digest": {
"function_hash": "307880825728659815925390920887782762281",
"length": 498.0
},
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2023-52439-45ff03f7",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@35f102607054faafe78d2a6994b18d5d9d6e92ad"
},
{
"target": {
"file": "drivers/uio/uio.c"
},
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"25637862813570430150028689899054511243",
"284039532791897652967515511480722709202",
"225885273986592702892357228436399241947",
"182696424438124894938318372468649336642",
"38345659163619478199469823200032464579",
"88237423279483622664507537398369724201",
"91454792813174288487083679321181652140",
"264891331988053122758666192138232962437",
"136590445628889427115544681025750767380",
"156745446012081799940717701634778638096",
"316309656677463365922864937217856819245",
"251907273502240980066503734341679642113",
"49921195386811512751768241413405022766",
"240308089071627423998474521676995657242"
]
},
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2023-52439-4e2d044b",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3174e0f7de1ba392dc191625da83df02d695b60c"
},
{
"target": {
"function": "uio_open",
"file": "drivers/uio/uio.c"
},
"deprecated": false,
"digest": {
"function_hash": "103612488759327609912746289776611095620",
"length": 1005.0
},
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2023-52439-65380792",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5cf604ee538ed0c467abe3b4cda5308a6398f0f7"
},
{
"target": {
"file": "drivers/uio/uio.c"
},
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"25637862813570430150028689899054511243",
"284039532791897652967515511480722709202",
"225885273986592702892357228436399241947",
"182696424438124894938318372468649336642",
"38345659163619478199469823200032464579",
"88237423279483622664507537398369724201",
"91454792813174288487083679321181652140",
"264891331988053122758666192138232962437",
"136590445628889427115544681025750767380",
"151050674413565663253789548158826203175",
"197365326698251416961498446700706826215",
"281000864566439237324532776137266758882",
"49921195386811512751768241413405022766",
"240308089071627423998474521676995657242"
]
},
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2023-52439-6814cc1d",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@913205930da6213305616ac539447702eaa85e41"
},
{
"target": {
"function": "uio_open",
"file": "drivers/uio/uio.c"
},
"deprecated": false,
"digest": {
"function_hash": "103612488759327609912746289776611095620",
"length": 1005.0
},
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2023-52439-842c2a59",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0c9ae0b8605078eafc3bea053cc78791e97ba2e2"
},
{
"target": {
"function": "uio_unregister_device",
"file": "drivers/uio/uio.c"
},
"deprecated": false,
"digest": {
"function_hash": "307880825728659815925390920887782762281",
"length": 498.0
},
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2023-52439-98ac03ea",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e93da893d52d82d57fc0db2ca566024e0f26ff50"
},
{
"target": {
"function": "uio_unregister_device",
"file": "drivers/uio/uio.c"
},
"deprecated": false,
"digest": {
"function_hash": "307880825728659815925390920887782762281",
"length": 498.0
},
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2023-52439-a9f1a355",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5cf604ee538ed0c467abe3b4cda5308a6398f0f7"
},
{
"target": {
"file": "drivers/uio/uio.c"
},
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"25637862813570430150028689899054511243",
"284039532791897652967515511480722709202",
"225885273986592702892357228436399241947",
"182696424438124894938318372468649336642",
"38345659163619478199469823200032464579",
"88237423279483622664507537398369724201",
"91454792813174288487083679321181652140",
"264891331988053122758666192138232962437",
"136590445628889427115544681025750767380",
"151050674413565663253789548158826203175",
"197365326698251416961498446700706826215",
"281000864566439237324532776137266758882",
"49921195386811512751768241413405022766",
"240308089071627423998474521676995657242"
]
},
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2023-52439-b0aca43e",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@35f102607054faafe78d2a6994b18d5d9d6e92ad"
},
{
"target": {
"function": "uio_open",
"file": "drivers/uio/uio.c"
},
"deprecated": false,
"digest": {
"function_hash": "103612488759327609912746289776611095620",
"length": 1005.0
},
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2023-52439-b2f73bef",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@17a8519cb359c3b483fb5c7367efa9a8a508bdea"
},
{
"target": {
"function": "uio_unregister_device",
"file": "drivers/uio/uio.c"
},
"deprecated": false,
"digest": {
"function_hash": "309579464398045185478591657128668300895",
"length": 414.0
},
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2023-52439-c572254f",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3174e0f7de1ba392dc191625da83df02d695b60c"
},
{
"target": {
"function": "uio_unregister_device",
"file": "drivers/uio/uio.c"
},
"deprecated": false,
"digest": {
"function_hash": "307880825728659815925390920887782762281",
"length": 498.0
},
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2023-52439-d4a3264d",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@913205930da6213305616ac539447702eaa85e41"
},
{
"target": {
"file": "drivers/uio/uio.c"
},
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"25637862813570430150028689899054511243",
"284039532791897652967515511480722709202",
"225885273986592702892357228436399241947",
"182696424438124894938318372468649336642",
"38345659163619478199469823200032464579",
"88237423279483622664507537398369724201",
"91454792813174288487083679321181652140",
"264891331988053122758666192138232962437",
"136590445628889427115544681025750767380",
"151050674413565663253789548158826203175",
"197365326698251416961498446700706826215",
"281000864566439237324532776137266758882",
"49921195386811512751768241413405022766",
"240308089071627423998474521676995657242"
]
},
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2023-52439-d7db8c41",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5cf604ee538ed0c467abe3b4cda5308a6398f0f7"
},
{
"target": {
"function": "uio_open",
"file": "drivers/uio/uio.c"
},
"deprecated": false,
"digest": {
"function_hash": "103612488759327609912746289776611095620",
"length": 1005.0
},
"signature_version": "v1",
"signature_type": "Function",
"id": "CVE-2023-52439-eca6b279",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@913205930da6213305616ac539447702eaa85e41"
},
{
"target": {
"file": "drivers/uio/uio.c"
},
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"25637862813570430150028689899054511243",
"284039532791897652967515511480722709202",
"225885273986592702892357228436399241947",
"182696424438124894938318372468649336642",
"38345659163619478199469823200032464579",
"88237423279483622664507537398369724201",
"91454792813174288487083679321181652140",
"264891331988053122758666192138232962437",
"136590445628889427115544681025750767380",
"151050674413565663253789548158826203175",
"197365326698251416961498446700706826215",
"281000864566439237324532776137266758882",
"49921195386811512751768241413405022766",
"240308089071627423998474521676995657242"
]
},
"signature_version": "v1",
"signature_type": "Line",
"id": "CVE-2023-52439-fcb6f0cc",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@17a8519cb359c3b483fb5c7367efa9a8a508bdea"
}
]