In the Linux kernel, the following vulnerability has been resolved:
extcon: Modify extcon device to be created after driver data is set
Currently, someone can invoke the sysfs such as stateshow() intermittently before devset_drvdata() is done. And it can be a cause of kernel Oops because of edev is Null at that time. So modified the driver registration to after setting drviver data.
Backtrace: [<c067865c>] (stateshow) from [<c05222e8>] (devattrshow) [<c05222c0>] (devattrshow) from [<c02c66e0>] (sysfskfseqshow) [<c02c6648>] (sysfskfseqshow) from [<c02c496c>] (kernfsseqshow) [<c02c4938>] (kernfsseqshow) from [<c025e2a0>] (seqread) [<c025e11c>] (seqread) from [<c02c50a0>] (kernfsfopread) [<c02c5064>] (kernfsfopread) from [<c0231cac>] (vfsread) [<c0231c5c>] (vfsread) from [<c0231ee0>] (vfsread) [<c0231e34>] (vfsread) from [<c0232464>] (ksysread) [<c02323f0>] (ksysread) from [<c02324fc>] (sysread) [<c02324e4>] (sysread) from [<c00091d0>] (systrace_return)
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@368e68ad6da4317fc4170e8d92b51c13d1bfe7a7",
"target": {
"function": "extcon_dev_unregister",
"file": "drivers/extcon/extcon.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49308-00deb4d4",
"signature_type": "Function",
"digest": {
"length": 888.0,
"function_hash": "67475652968720427224679372842055258646"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6e721f3ad0535b24f19a62420f4da95212cf069c",
"target": {
"file": "drivers/extcon/extcon.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49308-012dcd09",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"71786666293278605058353271887739422931",
"125264669748842953698930296635289561636",
"166323605030475637950743479525860885682",
"122946166363315493268664502651742925778",
"98905472851882253550365069121880849492",
"264629933616740869175091945507359258355",
"331297745403690548604149943130342622145",
"27108643304381574814649566302789441656",
"103487438690334297603338129359702414674",
"319741434201926417437145773305480115807",
"327360455435213657502671938880621672955",
"101666295042220295674249777556548640061",
"69819034897803648729742621535577418037",
"133053196700581835455396797336490805617",
"66743266304464585045961096512500430759",
"135804247356952637611166851586690962070",
"195077069111761520959465803273869164263",
"252278282852629978598650508149101611849",
"72812199245000869907991036512473199509",
"197685584762204050356564489088469263111",
"82104704494696987139640584534115071501",
"263959961916166739961806648233519332530",
"244218363233409147563781018773112737960",
"240016058780504330249568664561392220611",
"18330117179639208406000446634501766170",
"24481725062643683365602792498011824625"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5dcc2afe716d69f5112ce035cb14f007461ff189",
"target": {
"file": "drivers/extcon/extcon.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49308-1b7abcf5",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"71786666293278605058353271887739422931",
"125264669748842953698930296635289561636",
"166323605030475637950743479525860885682",
"122946166363315493268664502651742925778",
"98905472851882253550365069121880849492",
"264629933616740869175091945507359258355",
"331297745403690548604149943130342622145",
"27108643304381574814649566302789441656",
"103487438690334297603338129359702414674",
"319741434201926417437145773305480115807",
"327360455435213657502671938880621672955",
"101666295042220295674249777556548640061",
"69819034897803648729742621535577418037",
"133053196700581835455396797336490805617",
"66743266304464585045961096512500430759",
"135804247356952637611166851586690962070",
"195077069111761520959465803273869164263",
"252278282852629978598650508149101611849",
"72812199245000869907991036512473199509",
"197685584762204050356564489088469263111",
"82104704494696987139640584534115071501",
"263959961916166739961806648233519332530",
"244218363233409147563781018773112737960",
"240016058780504330249568664561392220611",
"18330117179639208406000446634501766170",
"24481725062643683365602792498011824625"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@368e68ad6da4317fc4170e8d92b51c13d1bfe7a7",
"target": {
"function": "extcon_dev_register",
"file": "drivers/extcon/extcon.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49308-22a32779",
"signature_type": "Function",
"digest": {
"length": 4973.0,
"function_hash": "176155734881547716846711239701654208531"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@35ff1ac55d301efb3f467cf5426faaeb3452994b",
"target": {
"file": "drivers/extcon/extcon.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49308-23265d91",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"71786666293278605058353271887739422931",
"125264669748842953698930296635289561636",
"166323605030475637950743479525860885682",
"122946166363315493268664502651742925778",
"98905472851882253550365069121880849492",
"264629933616740869175091945507359258355",
"331297745403690548604149943130342622145",
"27108643304381574814649566302789441656",
"103487438690334297603338129359702414674",
"319741434201926417437145773305480115807",
"327360455435213657502671938880621672955",
"101666295042220295674249777556548640061",
"69819034897803648729742621535577418037",
"133053196700581835455396797336490805617",
"66743266304464585045961096512500430759",
"135804247356952637611166851586690962070",
"195077069111761520959465803273869164263",
"252278282852629978598650508149101611849",
"72812199245000869907991036512473199509",
"197685584762204050356564489088469263111",
"82104704494696987139640584534115071501",
"263959961916166739961806648233519332530",
"244218363233409147563781018773112737960",
"240016058780504330249568664561392220611",
"18330117179639208406000446634501766170",
"24481725062643683365602792498011824625"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cb81ea998c461868d1168411a867d8ffee12f23f",
"target": {
"file": "drivers/extcon/extcon.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49308-3060cff6",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"71786666293278605058353271887739422931",
"125264669748842953698930296635289561636",
"166323605030475637950743479525860885682",
"122946166363315493268664502651742925778",
"98905472851882253550365069121880849492",
"264629933616740869175091945507359258355",
"331297745403690548604149943130342622145",
"27108643304381574814649566302789441656",
"103487438690334297603338129359702414674",
"319741434201926417437145773305480115807",
"327360455435213657502671938880621672955",
"101666295042220295674249777556548640061",
"69819034897803648729742621535577418037",
"133053196700581835455396797336490805617",
"66743266304464585045961096512500430759",
"135804247356952637611166851586690962070",
"195077069111761520959465803273869164263",
"252278282852629978598650508149101611849",
"72812199245000869907991036512473199509",
"197685584762204050356564489088469263111",
"82104704494696987139640584534115071501",
"263959961916166739961806648233519332530",
"244218363233409147563781018773112737960",
"240016058780504330249568664561392220611",
"18330117179639208406000446634501766170",
"24481725062643683365602792498011824625"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@abf3b222614f49f98e606fccdd269161c0d70204",
"target": {
"function": "extcon_dev_unregister",
"file": "drivers/extcon/extcon.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49308-3a3da1e5",
"signature_type": "Function",
"digest": {
"length": 888.0,
"function_hash": "67475652968720427224679372842055258646"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5dcc2afe716d69f5112ce035cb14f007461ff189",
"target": {
"function": "extcon_dev_register",
"file": "drivers/extcon/extcon.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49308-3d905472",
"signature_type": "Function",
"digest": {
"length": 4973.0,
"function_hash": "176155734881547716846711239701654208531"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@033ec4e7e59ae5e1ef1e8c10bc6552926044ed1c",
"target": {
"function": "extcon_dev_unregister",
"file": "drivers/extcon/extcon.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49308-4fd3d5ab",
"signature_type": "Function",
"digest": {
"length": 888.0,
"function_hash": "67475652968720427224679372842055258646"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@abf3b222614f49f98e606fccdd269161c0d70204",
"target": {
"function": "extcon_dev_register",
"file": "drivers/extcon/extcon.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49308-5bfa0281",
"signature_type": "Function",
"digest": {
"length": 4973.0,
"function_hash": "176155734881547716846711239701654208531"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@35ff1ac55d301efb3f467cf5426faaeb3452994b",
"target": {
"function": "extcon_dev_unregister",
"file": "drivers/extcon/extcon.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49308-729fd6ee",
"signature_type": "Function",
"digest": {
"length": 888.0,
"function_hash": "67475652968720427224679372842055258646"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d472c78cc82999d07bd09193a6718016ce9cd386",
"target": {
"function": "extcon_dev_register",
"file": "drivers/extcon/extcon.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49308-75ae974a",
"signature_type": "Function",
"digest": {
"length": 4973.0,
"function_hash": "176155734881547716846711239701654208531"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@35ff1ac55d301efb3f467cf5426faaeb3452994b",
"target": {
"function": "extcon_dev_register",
"file": "drivers/extcon/extcon.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49308-7d9ee34d",
"signature_type": "Function",
"digest": {
"length": 4973.0,
"function_hash": "176155734881547716846711239701654208531"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d472c78cc82999d07bd09193a6718016ce9cd386",
"target": {
"file": "drivers/extcon/extcon.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49308-87c09741",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"71786666293278605058353271887739422931",
"125264669748842953698930296635289561636",
"166323605030475637950743479525860885682",
"122946166363315493268664502651742925778",
"98905472851882253550365069121880849492",
"264629933616740869175091945507359258355",
"331297745403690548604149943130342622145",
"27108643304381574814649566302789441656",
"103487438690334297603338129359702414674",
"319741434201926417437145773305480115807",
"327360455435213657502671938880621672955",
"101666295042220295674249777556548640061",
"69819034897803648729742621535577418037",
"133053196700581835455396797336490805617",
"66743266304464585045961096512500430759",
"135804247356952637611166851586690962070",
"195077069111761520959465803273869164263",
"252278282852629978598650508149101611849",
"72812199245000869907991036512473199509",
"197685584762204050356564489088469263111",
"82104704494696987139640584534115071501",
"263959961916166739961806648233519332530",
"244218363233409147563781018773112737960",
"240016058780504330249568664561392220611",
"18330117179639208406000446634501766170",
"24481725062643683365602792498011824625"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cb81ea998c461868d1168411a867d8ffee12f23f",
"target": {
"function": "extcon_dev_register",
"file": "drivers/extcon/extcon.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49308-88fc7981",
"signature_type": "Function",
"digest": {
"length": 5150.0,
"function_hash": "322139081123885095894619881867226082620"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@033ec4e7e59ae5e1ef1e8c10bc6552926044ed1c",
"target": {
"function": "extcon_dev_register",
"file": "drivers/extcon/extcon.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49308-a7a799f3",
"signature_type": "Function",
"digest": {
"length": 4973.0,
"function_hash": "176155734881547716846711239701654208531"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@033ec4e7e59ae5e1ef1e8c10bc6552926044ed1c",
"target": {
"file": "drivers/extcon/extcon.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49308-a81e3e63",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"71786666293278605058353271887739422931",
"125264669748842953698930296635289561636",
"166323605030475637950743479525860885682",
"122946166363315493268664502651742925778",
"98905472851882253550365069121880849492",
"264629933616740869175091945507359258355",
"331297745403690548604149943130342622145",
"27108643304381574814649566302789441656",
"103487438690334297603338129359702414674",
"319741434201926417437145773305480115807",
"327360455435213657502671938880621672955",
"101666295042220295674249777556548640061",
"69819034897803648729742621535577418037",
"133053196700581835455396797336490805617",
"66743266304464585045961096512500430759",
"135804247356952637611166851586690962070",
"195077069111761520959465803273869164263",
"252278282852629978598650508149101611849",
"72812199245000869907991036512473199509",
"197685584762204050356564489088469263111",
"82104704494696987139640584534115071501",
"263959961916166739961806648233519332530",
"244218363233409147563781018773112737960",
"240016058780504330249568664561392220611",
"18330117179639208406000446634501766170",
"24481725062643683365602792498011824625"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d472c78cc82999d07bd09193a6718016ce9cd386",
"target": {
"function": "extcon_dev_unregister",
"file": "drivers/extcon/extcon.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49308-af0728f6",
"signature_type": "Function",
"digest": {
"length": 888.0,
"function_hash": "67475652968720427224679372842055258646"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cb81ea998c461868d1168411a867d8ffee12f23f",
"target": {
"function": "extcon_dev_unregister",
"file": "drivers/extcon/extcon.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49308-be5f87fe",
"signature_type": "Function",
"digest": {
"length": 888.0,
"function_hash": "67475652968720427224679372842055258646"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6e721f3ad0535b24f19a62420f4da95212cf069c",
"target": {
"function": "extcon_dev_register",
"file": "drivers/extcon/extcon.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49308-c5ce10b1",
"signature_type": "Function",
"digest": {
"length": 5204.0,
"function_hash": "232753787061113938476834886928138491056"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5dcc2afe716d69f5112ce035cb14f007461ff189",
"target": {
"function": "extcon_dev_unregister",
"file": "drivers/extcon/extcon.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49308-c9cf2725",
"signature_type": "Function",
"digest": {
"length": 888.0,
"function_hash": "67475652968720427224679372842055258646"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@368e68ad6da4317fc4170e8d92b51c13d1bfe7a7",
"target": {
"file": "drivers/extcon/extcon.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49308-d8865438",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"71786666293278605058353271887739422931",
"125264669748842953698930296635289561636",
"166323605030475637950743479525860885682",
"122946166363315493268664502651742925778",
"98905472851882253550365069121880849492",
"264629933616740869175091945507359258355",
"331297745403690548604149943130342622145",
"27108643304381574814649566302789441656",
"103487438690334297603338129359702414674",
"319741434201926417437145773305480115807",
"327360455435213657502671938880621672955",
"101666295042220295674249777556548640061",
"69819034897803648729742621535577418037",
"133053196700581835455396797336490805617",
"66743266304464585045961096512500430759",
"135804247356952637611166851586690962070",
"195077069111761520959465803273869164263",
"252278282852629978598650508149101611849",
"72812199245000869907991036512473199509",
"197685584762204050356564489088469263111",
"82104704494696987139640584534115071501",
"263959961916166739961806648233519332530",
"244218363233409147563781018773112737960",
"240016058780504330249568664561392220611",
"18330117179639208406000446634501766170",
"24481725062643683365602792498011824625"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6e721f3ad0535b24f19a62420f4da95212cf069c",
"target": {
"function": "extcon_dev_unregister",
"file": "drivers/extcon/extcon.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49308-ee0707bf",
"signature_type": "Function",
"digest": {
"length": 888.0,
"function_hash": "67475652968720427224679372842055258646"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@abf3b222614f49f98e606fccdd269161c0d70204",
"target": {
"file": "drivers/extcon/extcon.c"
},
"deprecated": false,
"signature_version": "v1",
"id": "CVE-2022-49308-fbf67369",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"71786666293278605058353271887739422931",
"125264669748842953698930296635289561636",
"166323605030475637950743479525860885682",
"122946166363315493268664502651742925778",
"98905472851882253550365069121880849492",
"264629933616740869175091945507359258355",
"331297745403690548604149943130342622145",
"27108643304381574814649566302789441656",
"103487438690334297603338129359702414674",
"319741434201926417437145773305480115807",
"327360455435213657502671938880621672955",
"101666295042220295674249777556548640061",
"69819034897803648729742621535577418037",
"133053196700581835455396797336490805617",
"66743266304464585045961096512500430759",
"135804247356952637611166851586690962070",
"195077069111761520959465803273869164263",
"252278282852629978598650508149101611849",
"72812199245000869907991036512473199509",
"197685584762204050356564489088469263111",
"82104704494696987139640584534115071501",
"263959961916166739961806648233519332530",
"244218363233409147563781018773112737960",
"240016058780504330249568664561392220611",
"18330117179639208406000446634501766170",
"24481725062643683365602792498011824625"
]
}
}
]