CVE-2022-50469

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-50469
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50469.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-50469
Downstream
Related
Published
2025-10-01T11:45:39Z
Modified
2025-10-15T14:44:40.694661Z
Summary
staging: rtl8723bs: fix potential memory leak in rtw_init_drv_sw()
Details

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

staging: rtl8723bs: fix potential memory leak in rtwinitdrv_sw()

In rtwinitdrv_sw(), there are various init functions are called to populate the padapter structure and some checks for their return value. However, except for the first one error path, the other five error paths do not properly release the previous allocated resources, which leads to various memory leaks.

This patch fixes them and keeps the success and error separate. Note that these changes keep the form of rtw_init_drv_sw() in "drivers/staging/r8188eu/osdep/osintfs.c". As there is no proper device to test with, no runtime testing was performed.

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
554c0a3abf216c991c5ebddcdb2c08689ecd290b
Fixed
b4573a2bad3c3e2643ef3939079eb7035a30e6ee
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
554c0a3abf216c991c5ebddcdb2c08689ecd290b
Fixed
6b2052b365f8035ab7f09ac24b5b499002b298cb
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
554c0a3abf216c991c5ebddcdb2c08689ecd290b
Fixed
d95d1526d9f06978c1a7186810a5490d72c62742
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
554c0a3abf216c991c5ebddcdb2c08689ecd290b
Fixed
5a5aa9cce621e2c0e25a1e5d72d6be1749167cc0

Affected versions

v4.*

v4.11
v4.11-rc5
v4.11-rc6
v4.11-rc7
v4.11-rc8
v4.12
v4.12-rc1
v4.12-rc2
v4.12-rc3
v4.12-rc4
v4.12-rc5
v4.12-rc6
v4.12-rc7
v4.13
v4.13-rc1
v4.13-rc2
v4.13-rc3
v4.13-rc4
v4.13-rc5
v4.13-rc6
v4.13-rc7
v4.14
v4.14-rc1
v4.14-rc2
v4.14-rc3
v4.14-rc4
v4.14-rc5
v4.14-rc6
v4.14-rc7
v4.14-rc8
v4.15
v4.15-rc1
v4.15-rc2
v4.15-rc3
v4.15-rc4
v4.15-rc5
v4.15-rc6
v4.15-rc7
v4.15-rc8
v4.15-rc9
v4.16
v4.16-rc1
v4.16-rc2
v4.16-rc3
v4.16-rc4
v4.16-rc5
v4.16-rc6
v4.16-rc7
v4.17
v4.17-rc1
v4.17-rc2
v4.17-rc3
v4.17-rc4
v4.17-rc5
v4.17-rc6
v4.17-rc7
v4.18
v4.18-rc1
v4.18-rc2
v4.18-rc3
v4.18-rc4
v4.18-rc5
v4.18-rc6
v4.18-rc7
v4.18-rc8
v4.19
v4.19-rc1
v4.19-rc2
v4.19-rc3
v4.19-rc4
v4.19-rc5
v4.19-rc6
v4.19-rc7
v4.19-rc8
v4.20
v4.20-rc1
v4.20-rc2
v4.20-rc3
v4.20-rc4
v4.20-rc5
v4.20-rc6
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
v5.15
v5.15-rc1
v5.15-rc2
v5.15-rc3
v5.15-rc4
v5.15-rc5
v5.15-rc6
v5.15-rc7
v5.15.1
v5.15.10
v5.15.11
v5.15.12
v5.15.13
v5.15.14
v5.15.15
v5.15.16
v5.15.17
v5.15.18
v5.15.19
v5.15.2
v5.15.20
v5.15.21
v5.15.22
v5.15.23
v5.15.24
v5.15.25
v5.15.26
v5.15.27
v5.15.28
v5.15.29
v5.15.3
v5.15.30
v5.15.31
v5.15.32
v5.15.33
v5.15.34
v5.15.35
v5.15.36
v5.15.37
v5.15.38
v5.15.39
v5.15.4
v5.15.40
v5.15.41
v5.15.42
v5.15.43
v5.15.44
v5.15.45
v5.15.46
v5.15.47
v5.15.48
v5.15.49
v5.15.5
v5.15.50
v5.15.51
v5.15.52
v5.15.53
v5.15.54
v5.15.55
v5.15.56
v5.15.57
v5.15.58
v5.15.59
v5.15.6
v5.15.60
v5.15.61
v5.15.62
v5.15.63
v5.15.64
v5.15.65
v5.15.66
v5.15.67
v5.15.68
v5.15.69
v5.15.7
v5.15.70
v5.15.71
v5.15.72
v5.15.73
v5.15.74
v5.15.8
v5.15.9
v5.16
v5.16-rc1
v5.16-rc2
v5.16-rc3
v5.16-rc4
v5.16-rc5
v5.16-rc6
v5.16-rc7
v5.16-rc8
v5.17
v5.17-rc1
v5.17-rc2
v5.17-rc3
v5.17-rc4
v5.17-rc5
v5.17-rc6
v5.17-rc7
v5.17-rc8
v5.18
v5.18-rc1
v5.18-rc2
v5.18-rc3
v5.18-rc4
v5.18-rc5
v5.18-rc6
v5.18-rc7
v5.19
v5.19-rc1
v5.19-rc2
v5.19-rc3
v5.19-rc4
v5.19-rc5
v5.19-rc6
v5.19-rc7
v5.19-rc8
v5.19.1
v5.19.10
v5.19.11
v5.19.12
v5.19.13
v5.19.14
v5.19.15
v5.19.16
v5.19.2
v5.19.3
v5.19.4
v5.19.5
v5.19.6
v5.19.7
v5.19.8
v5.19.9
v5.2
v5.2-rc1
v5.2-rc2
v5.2-rc3
v5.2-rc4
v5.2-rc5
v5.2-rc6
v5.2-rc7
v5.3
v5.3-rc1
v5.3-rc2
v5.3-rc3
v5.3-rc4
v5.3-rc5
v5.3-rc6
v5.3-rc7
v5.3-rc8
v5.4
v5.4-rc1
v5.4-rc2
v5.4-rc3
v5.4-rc4
v5.4-rc5
v5.4-rc6
v5.4-rc7
v5.4-rc8
v5.5
v5.5-rc1
v5.5-rc2
v5.5-rc3
v5.5-rc4
v5.5-rc5
v5.5-rc6
v5.5-rc7
v5.6
v5.6-rc1
v5.6-rc2
v5.6-rc3
v5.6-rc4
v5.6-rc5
v5.6-rc6
v5.6-rc7
v5.7
v5.7-rc1
v5.7-rc2
v5.7-rc3
v5.7-rc4
v5.7-rc5
v5.7-rc6
v5.7-rc7
v5.8
v5.8-rc1
v5.8-rc2
v5.8-rc3
v5.8-rc4
v5.8-rc5
v5.8-rc6
v5.8-rc7
v5.9
v5.9-rc1
v5.9-rc2
v5.9-rc3
v5.9-rc4
v5.9-rc5
v5.9-rc6
v5.9-rc7
v5.9-rc8

v6.*

v6.0
v6.0-rc1
v6.0-rc2
v6.0-rc3
v6.0-rc4
v6.0-rc5
v6.0-rc6
v6.0-rc7
v6.0.1
v6.0.2

Database specific

vanir_signatures

[
    {
        "signature_type": "Line",
        "id": "CVE-2022-50469-110f7301",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d95d1526d9f06978c1a7186810a5490d72c62742",
        "signature_version": "v1",
        "target": {
            "file": "drivers/staging/rtl8723bs/os_dep/os_intfs.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "179109865298419338724374682689824582438",
                "7025779285177078009162018613782226722",
                "76771671034367010845836597618008713515",
                "30412740957362424629229957899712108849",
                "24347511704892992405736179406646713895",
                "167133833383002618357222159318494915898",
                "180582366492928600169703813826658561314",
                "191273831249903052328870298183895802624",
                "249975009568412472440693884371187997248",
                "226770423600360843323111439095074924232",
                "219661562018566198099879139363794025028",
                "260675162953833872738354684495309825646",
                "252227463061157305021922810180559196330",
                "121171988415093598966013585304291285404",
                "158008122542506832446290593870588920854",
                "34731101658390221808123683699152631147",
                "142426614320235585422597323955835680980",
                "169262384478838013277693941463263461039",
                "147984676352109864861128388279201052769",
                "63390626628180538884063139040430261480",
                "184302348343886408603894330386576506840",
                "142697774022309373643298098873750724486",
                "237174850365512628916332409286491589054",
                "168834501464008086760913664675000915608",
                "118257045571675069725128316377795387797",
                "234230056905104077232834006375377901991",
                "138833578248901766886794087456030838129",
                "199208665649511206952227175952493624705",
                "70120632649301202057827638813865876325",
                "270435461417604462930457339500845794474",
                "4135664760235539068047535880540429655",
                "47201707117176207273131661077725997958",
                "146969865424531058062965435025768728249",
                "301028094607068289191207729485224984956",
                "110445126707644158326360370780030566615",
                "329971727716315865326793392737226206409",
                "116604428409469501855580364284766266157",
                "57758984395388342017996697194782934033"
            ]
        },
        "deprecated": false
    },
    {
        "signature_type": "Line",
        "id": "CVE-2022-50469-5708a730",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5a5aa9cce621e2c0e25a1e5d72d6be1749167cc0",
        "signature_version": "v1",
        "target": {
            "file": "drivers/staging/rtl8723bs/os_dep/os_intfs.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "179109865298419338724374682689824582438",
                "7025779285177078009162018613782226722",
                "76771671034367010845836597618008713515",
                "30412740957362424629229957899712108849",
                "24347511704892992405736179406646713895",
                "167133833383002618357222159318494915898",
                "180582366492928600169703813826658561314",
                "191273831249903052328870298183895802624",
                "249975009568412472440693884371187997248",
                "226770423600360843323111439095074924232",
                "219661562018566198099879139363794025028",
                "260675162953833872738354684495309825646",
                "252227463061157305021922810180559196330",
                "121171988415093598966013585304291285404",
                "158008122542506832446290593870588920854",
                "34731101658390221808123683699152631147",
                "142426614320235585422597323955835680980",
                "169262384478838013277693941463263461039",
                "147984676352109864861128388279201052769",
                "63390626628180538884063139040430261480",
                "184302348343886408603894330386576506840",
                "142697774022309373643298098873750724486",
                "237174850365512628916332409286491589054",
                "168834501464008086760913664675000915608",
                "118257045571675069725128316377795387797",
                "234230056905104077232834006375377901991",
                "138833578248901766886794087456030838129",
                "199208665649511206952227175952493624705",
                "70120632649301202057827638813865876325",
                "270435461417604462930457339500845794474",
                "4135664760235539068047535880540429655",
                "47201707117176207273131661077725997958",
                "146969865424531058062965435025768728249",
                "301028094607068289191207729485224984956",
                "110445126707644158326360370780030566615",
                "329971727716315865326793392737226206409",
                "116604428409469501855580364284766266157",
                "57758984395388342017996697194782934033"
            ]
        },
        "deprecated": false
    },
    {
        "signature_type": "Function",
        "id": "CVE-2022-50469-731c1a3d",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b4573a2bad3c3e2643ef3939079eb7035a30e6ee",
        "signature_version": "v1",
        "target": {
            "function": "rtw_init_drv_sw",
            "file": "drivers/staging/rtl8723bs/os_dep/os_intfs.c"
        },
        "digest": {
            "function_hash": "5094682755077177446102198845796498671",
            "length": 832.0
        },
        "deprecated": false
    },
    {
        "signature_type": "Line",
        "id": "CVE-2022-50469-8e8c02de",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b4573a2bad3c3e2643ef3939079eb7035a30e6ee",
        "signature_version": "v1",
        "target": {
            "file": "drivers/staging/rtl8723bs/os_dep/os_intfs.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "179109865298419338724374682689824582438",
                "7025779285177078009162018613782226722",
                "76771671034367010845836597618008713515",
                "30412740957362424629229957899712108849",
                "24347511704892992405736179406646713895",
                "167133833383002618357222159318494915898",
                "180582366492928600169703813826658561314",
                "191273831249903052328870298183895802624",
                "249975009568412472440693884371187997248",
                "226770423600360843323111439095074924232",
                "219661562018566198099879139363794025028",
                "260675162953833872738354684495309825646",
                "252227463061157305021922810180559196330",
                "121171988415093598966013585304291285404",
                "158008122542506832446290593870588920854",
                "34731101658390221808123683699152631147",
                "142426614320235585422597323955835680980",
                "169262384478838013277693941463263461039",
                "147984676352109864861128388279201052769",
                "63390626628180538884063139040430261480",
                "184302348343886408603894330386576506840",
                "142697774022309373643298098873750724486",
                "237174850365512628916332409286491589054",
                "168834501464008086760913664675000915608",
                "118257045571675069725128316377795387797",
                "234230056905104077232834006375377901991",
                "138833578248901766886794087456030838129",
                "199208665649511206952227175952493624705",
                "70120632649301202057827638813865876325",
                "270435461417604462930457339500845794474",
                "4135664760235539068047535880540429655",
                "47201707117176207273131661077725997958",
                "146969865424531058062965435025768728249",
                "301028094607068289191207729485224984956",
                "110445126707644158326360370780030566615",
                "329971727716315865326793392737226206409",
                "116604428409469501855580364284766266157",
                "57758984395388342017996697194782934033"
            ]
        },
        "deprecated": false
    },
    {
        "signature_type": "Line",
        "id": "CVE-2022-50469-a040cf5d",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6b2052b365f8035ab7f09ac24b5b499002b298cb",
        "signature_version": "v1",
        "target": {
            "file": "drivers/staging/rtl8723bs/os_dep/os_intfs.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "179109865298419338724374682689824582438",
                "7025779285177078009162018613782226722",
                "76771671034367010845836597618008713515",
                "30412740957362424629229957899712108849",
                "24347511704892992405736179406646713895",
                "167133833383002618357222159318494915898",
                "180582366492928600169703813826658561314",
                "191273831249903052328870298183895802624",
                "249975009568412472440693884371187997248",
                "226770423600360843323111439095074924232",
                "219661562018566198099879139363794025028",
                "260675162953833872738354684495309825646",
                "252227463061157305021922810180559196330",
                "121171988415093598966013585304291285404",
                "158008122542506832446290593870588920854",
                "34731101658390221808123683699152631147",
                "142426614320235585422597323955835680980",
                "169262384478838013277693941463263461039",
                "147984676352109864861128388279201052769",
                "63390626628180538884063139040430261480",
                "184302348343886408603894330386576506840",
                "142697774022309373643298098873750724486",
                "237174850365512628916332409286491589054",
                "168834501464008086760913664675000915608",
                "118257045571675069725128316377795387797",
                "234230056905104077232834006375377901991",
                "138833578248901766886794087456030838129",
                "199208665649511206952227175952493624705",
                "70120632649301202057827638813865876325",
                "270435461417604462930457339500845794474",
                "4135664760235539068047535880540429655",
                "47201707117176207273131661077725997958",
                "146969865424531058062965435025768728249",
                "301028094607068289191207729485224984956",
                "110445126707644158326360370780030566615",
                "329971727716315865326793392737226206409",
                "116604428409469501855580364284766266157",
                "57758984395388342017996697194782934033"
            ]
        },
        "deprecated": false
    },
    {
        "signature_type": "Function",
        "id": "CVE-2022-50469-c0981470",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6b2052b365f8035ab7f09ac24b5b499002b298cb",
        "signature_version": "v1",
        "target": {
            "function": "rtw_init_drv_sw",
            "file": "drivers/staging/rtl8723bs/os_dep/os_intfs.c"
        },
        "digest": {
            "function_hash": "5094682755077177446102198845796498671",
            "length": 832.0
        },
        "deprecated": false
    },
    {
        "signature_type": "Function",
        "id": "CVE-2022-50469-cf709996",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d95d1526d9f06978c1a7186810a5490d72c62742",
        "signature_version": "v1",
        "target": {
            "function": "rtw_init_drv_sw",
            "file": "drivers/staging/rtl8723bs/os_dep/os_intfs.c"
        },
        "digest": {
            "function_hash": "5094682755077177446102198845796498671",
            "length": 832.0
        },
        "deprecated": false
    },
    {
        "signature_type": "Function",
        "id": "CVE-2022-50469-eb37daa9",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5a5aa9cce621e2c0e25a1e5d72d6be1749167cc0",
        "signature_version": "v1",
        "target": {
            "function": "rtw_init_drv_sw",
            "file": "drivers/staging/rtl8723bs/os_dep/os_intfs.c"
        },
        "digest": {
            "function_hash": "5094682755077177446102198845796498671",
            "length": 832.0
        },
        "deprecated": false
    }
]

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.12.0
Fixed
5.15.75
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
5.19.17
Type
ECOSYSTEM
Events
Introduced
5.20.0
Fixed
6.0.3