In the Linux kernel, the following vulnerability has been resolved:
cxl: fix possible null-ptr-deref in cxlguestinit_afu|adapter()
If deviceregister() fails in cxlregisterafu|adapter(), the device is not added, deviceunregister() can not be called in the error path, otherwise it will cause a null-ptr-deref because of removing not added device.
As comment of deviceregister() says, it should use putdevice() to give up the reference in the error path. So split deviceunregister() into devicedel() and put_device(), then goes to put dev when register fails.
[
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"9438378464718364962878964913430884427",
"41276585980274909571808237909382453856",
"35488252244553393986071545535901233209",
"74839710731227101095473978836478415942",
"134323843050714788561098986529648533223",
"210667570921638122088247098612863904374",
"20309637364150780384881057270579846440",
"16347813411824758863230218896642367000",
"187590484850441321755447831257647803013",
"239615023334853647142605076768139452588",
"339842433485369332284474751955491437537",
"178490816160456397724334850666976411390",
"22800455263183988580760262584174447196",
"232589786877651449594995626237986527488",
"114109543124619712329773024021249945215",
"169962098430616898625710310030807074345",
"300290368379536929294230773128997565192",
"199194435079621120687900095053105001392",
"103148769233108258192587753191794806203",
"284543329160311086316113546838250757638",
"142795574304018145874124205293038567733",
"34755028257611678087103263405735705961",
"19163601415753284957677092671302103392",
"206649103469418144423898747779714929273",
"330958869700080332707149791500823602823",
"219742868614130764548824746196073606967",
"29955224155911400597328791907387997567"
]
},
"target": {
"file": "drivers/misc/cxl/guest.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b32559ee4e6667c5c3daf4ec5454c277d1f255d2",
"id": "CVE-2022-50481-17a8a89f",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "282150084879898550675247199351039079967",
"length": 958.0
},
"target": {
"file": "drivers/misc/cxl/guest.c",
"function": "cxl_guest_init_adapter"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@170e8c2d2b61e15e7f7cfeded81bc1e959a15ed8",
"id": "CVE-2022-50481-1b9f649e",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "78730643564266014519263970017501751405",
"length": 1616.0
},
"target": {
"file": "drivers/misc/cxl/guest.c",
"function": "cxl_guest_init_afu"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@61c80d1c3833e196256fb060382db94f24d3d9a7",
"id": "CVE-2022-50481-21e6b40a",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "282150084879898550675247199351039079967",
"length": 958.0
},
"target": {
"file": "drivers/misc/cxl/guest.c",
"function": "cxl_guest_init_adapter"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b32559ee4e6667c5c3daf4ec5454c277d1f255d2",
"id": "CVE-2022-50481-2febba37",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"9438378464718364962878964913430884427",
"41276585980274909571808237909382453856",
"35488252244553393986071545535901233209",
"74839710731227101095473978836478415942",
"134323843050714788561098986529648533223",
"210667570921638122088247098612863904374",
"20309637364150780384881057270579846440",
"16347813411824758863230218896642367000",
"187590484850441321755447831257647803013",
"239615023334853647142605076768139452588",
"339842433485369332284474751955491437537",
"178490816160456397724334850666976411390",
"22800455263183988580760262584174447196",
"232589786877651449594995626237986527488",
"114109543124619712329773024021249945215",
"169962098430616898625710310030807074345",
"300290368379536929294230773128997565192",
"199194435079621120687900095053105001392",
"103148769233108258192587753191794806203",
"284543329160311086316113546838250757638",
"142795574304018145874124205293038567733",
"34755028257611678087103263405735705961",
"19163601415753284957677092671302103392",
"206649103469418144423898747779714929273",
"330958869700080332707149791500823602823",
"219742868614130764548824746196073606967",
"29955224155911400597328791907387997567"
]
},
"target": {
"file": "drivers/misc/cxl/guest.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e5021bbf11b024cc65ea1e84c377df484183be4b",
"id": "CVE-2022-50481-366cbe03",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "78730643564266014519263970017501751405",
"length": 1616.0
},
"target": {
"file": "drivers/misc/cxl/guest.c",
"function": "cxl_guest_init_afu"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@60b2ed21a65f3f5318666ccd765c3507991370cf",
"id": "CVE-2022-50481-3b5a0ac0",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "78730643564266014519263970017501751405",
"length": 1616.0
},
"target": {
"file": "drivers/misc/cxl/guest.c",
"function": "cxl_guest_init_afu"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e5021bbf11b024cc65ea1e84c377df484183be4b",
"id": "CVE-2022-50481-41495379",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "78730643564266014519263970017501751405",
"length": 1616.0
},
"target": {
"file": "drivers/misc/cxl/guest.c",
"function": "cxl_guest_init_afu"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ab44c182353be101c3be9465e1d15d42130c53c4",
"id": "CVE-2022-50481-4b485601",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "282150084879898550675247199351039079967",
"length": 958.0
},
"target": {
"file": "drivers/misc/cxl/guest.c",
"function": "cxl_guest_init_adapter"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@61c80d1c3833e196256fb060382db94f24d3d9a7",
"id": "CVE-2022-50481-4f93b289",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"9438378464718364962878964913430884427",
"41276585980274909571808237909382453856",
"35488252244553393986071545535901233209",
"74839710731227101095473978836478415942",
"134323843050714788561098986529648533223",
"210667570921638122088247098612863904374",
"20309637364150780384881057270579846440",
"16347813411824758863230218896642367000",
"187590484850441321755447831257647803013",
"239615023334853647142605076768139452588",
"339842433485369332284474751955491437537",
"178490816160456397724334850666976411390",
"22800455263183988580760262584174447196",
"232589786877651449594995626237986527488",
"114109543124619712329773024021249945215",
"169962098430616898625710310030807074345",
"300290368379536929294230773128997565192",
"199194435079621120687900095053105001392",
"103148769233108258192587753191794806203",
"284543329160311086316113546838250757638",
"142795574304018145874124205293038567733",
"34755028257611678087103263405735705961",
"19163601415753284957677092671302103392",
"206649103469418144423898747779714929273",
"330958869700080332707149791500823602823",
"219742868614130764548824746196073606967",
"29955224155911400597328791907387997567"
]
},
"target": {
"file": "drivers/misc/cxl/guest.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ab44c182353be101c3be9465e1d15d42130c53c4",
"id": "CVE-2022-50481-5974ca38",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "282150084879898550675247199351039079967",
"length": 958.0
},
"target": {
"file": "drivers/misc/cxl/guest.c",
"function": "cxl_guest_init_adapter"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d775a1da5a52b4f4bb02f2707ba420d1bec48dbb",
"id": "CVE-2022-50481-60b7a011",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"9438378464718364962878964913430884427",
"41276585980274909571808237909382453856",
"35488252244553393986071545535901233209",
"74839710731227101095473978836478415942",
"134323843050714788561098986529648533223",
"210667570921638122088247098612863904374",
"20309637364150780384881057270579846440",
"16347813411824758863230218896642367000",
"187590484850441321755447831257647803013",
"239615023334853647142605076768139452588",
"339842433485369332284474751955491437537",
"178490816160456397724334850666976411390",
"22800455263183988580760262584174447196",
"232589786877651449594995626237986527488",
"114109543124619712329773024021249945215",
"169962098430616898625710310030807074345",
"300290368379536929294230773128997565192",
"199194435079621120687900095053105001392",
"103148769233108258192587753191794806203",
"284543329160311086316113546838250757638",
"142795574304018145874124205293038567733",
"34755028257611678087103263405735705961",
"19163601415753284957677092671302103392",
"206649103469418144423898747779714929273",
"330958869700080332707149791500823602823",
"219742868614130764548824746196073606967",
"29955224155911400597328791907387997567"
]
},
"target": {
"file": "drivers/misc/cxl/guest.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1ae581696b7a799afa39a664c4b721569643f58a",
"id": "CVE-2022-50481-69fb5751",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "282150084879898550675247199351039079967",
"length": 958.0
},
"target": {
"file": "drivers/misc/cxl/guest.c",
"function": "cxl_guest_init_adapter"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ab44c182353be101c3be9465e1d15d42130c53c4",
"id": "CVE-2022-50481-6c914ba9",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "282150084879898550675247199351039079967",
"length": 958.0
},
"target": {
"file": "drivers/misc/cxl/guest.c",
"function": "cxl_guest_init_adapter"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@96fba6fb95bdede80583c262ac185da09661f264",
"id": "CVE-2022-50481-7123e81d",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"9438378464718364962878964913430884427",
"41276585980274909571808237909382453856",
"35488252244553393986071545535901233209",
"74839710731227101095473978836478415942",
"134323843050714788561098986529648533223",
"210667570921638122088247098612863904374",
"20309637364150780384881057270579846440",
"16347813411824758863230218896642367000",
"187590484850441321755447831257647803013",
"239615023334853647142605076768139452588",
"339842433485369332284474751955491437537",
"178490816160456397724334850666976411390",
"22800455263183988580760262584174447196",
"232589786877651449594995626237986527488",
"114109543124619712329773024021249945215",
"169962098430616898625710310030807074345",
"300290368379536929294230773128997565192",
"199194435079621120687900095053105001392",
"103148769233108258192587753191794806203",
"284543329160311086316113546838250757638",
"142795574304018145874124205293038567733",
"34755028257611678087103263405735705961",
"19163601415753284957677092671302103392",
"206649103469418144423898747779714929273",
"330958869700080332707149791500823602823",
"219742868614130764548824746196073606967",
"29955224155911400597328791907387997567"
]
},
"target": {
"file": "drivers/misc/cxl/guest.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@61c80d1c3833e196256fb060382db94f24d3d9a7",
"id": "CVE-2022-50481-7ce9aa79",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"9438378464718364962878964913430884427",
"41276585980274909571808237909382453856",
"35488252244553393986071545535901233209",
"74839710731227101095473978836478415942",
"134323843050714788561098986529648533223",
"210667570921638122088247098612863904374",
"20309637364150780384881057270579846440",
"16347813411824758863230218896642367000",
"187590484850441321755447831257647803013",
"239615023334853647142605076768139452588",
"339842433485369332284474751955491437537",
"178490816160456397724334850666976411390",
"22800455263183988580760262584174447196",
"232589786877651449594995626237986527488",
"114109543124619712329773024021249945215",
"169962098430616898625710310030807074345",
"300290368379536929294230773128997565192",
"199194435079621120687900095053105001392",
"103148769233108258192587753191794806203",
"284543329160311086316113546838250757638",
"142795574304018145874124205293038567733",
"34755028257611678087103263405735705961",
"19163601415753284957677092671302103392",
"206649103469418144423898747779714929273",
"330958869700080332707149791500823602823",
"219742868614130764548824746196073606967",
"29955224155911400597328791907387997567"
]
},
"target": {
"file": "drivers/misc/cxl/guest.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d775a1da5a52b4f4bb02f2707ba420d1bec48dbb",
"id": "CVE-2022-50481-80211817",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "282150084879898550675247199351039079967",
"length": 958.0
},
"target": {
"file": "drivers/misc/cxl/guest.c",
"function": "cxl_guest_init_adapter"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@60b2ed21a65f3f5318666ccd765c3507991370cf",
"id": "CVE-2022-50481-804e52f6",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "78730643564266014519263970017501751405",
"length": 1616.0
},
"target": {
"file": "drivers/misc/cxl/guest.c",
"function": "cxl_guest_init_afu"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@96fba6fb95bdede80583c262ac185da09661f264",
"id": "CVE-2022-50481-8448d85f",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "282150084879898550675247199351039079967",
"length": 958.0
},
"target": {
"file": "drivers/misc/cxl/guest.c",
"function": "cxl_guest_init_adapter"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1ae581696b7a799afa39a664c4b721569643f58a",
"id": "CVE-2022-50481-881b47ed",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "78730643564266014519263970017501751405",
"length": 1616.0
},
"target": {
"file": "drivers/misc/cxl/guest.c",
"function": "cxl_guest_init_afu"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1ae581696b7a799afa39a664c4b721569643f58a",
"id": "CVE-2022-50481-8d4fc594",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"9438378464718364962878964913430884427",
"41276585980274909571808237909382453856",
"35488252244553393986071545535901233209",
"74839710731227101095473978836478415942",
"134323843050714788561098986529648533223",
"210667570921638122088247098612863904374",
"20309637364150780384881057270579846440",
"16347813411824758863230218896642367000",
"187590484850441321755447831257647803013",
"239615023334853647142605076768139452588",
"339842433485369332284474751955491437537",
"178490816160456397724334850666976411390",
"22800455263183988580760262584174447196",
"232589786877651449594995626237986527488",
"114109543124619712329773024021249945215",
"169962098430616898625710310030807074345",
"300290368379536929294230773128997565192",
"199194435079621120687900095053105001392",
"103148769233108258192587753191794806203",
"284543329160311086316113546838250757638",
"142795574304018145874124205293038567733",
"34755028257611678087103263405735705961",
"19163601415753284957677092671302103392",
"206649103469418144423898747779714929273",
"330958869700080332707149791500823602823",
"219742868614130764548824746196073606967",
"29955224155911400597328791907387997567"
]
},
"target": {
"file": "drivers/misc/cxl/guest.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@96fba6fb95bdede80583c262ac185da09661f264",
"id": "CVE-2022-50481-9aed1042",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "78730643564266014519263970017501751405",
"length": 1616.0
},
"target": {
"file": "drivers/misc/cxl/guest.c",
"function": "cxl_guest_init_afu"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@170e8c2d2b61e15e7f7cfeded81bc1e959a15ed8",
"id": "CVE-2022-50481-ac643016",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"9438378464718364962878964913430884427",
"41276585980274909571808237909382453856",
"35488252244553393986071545535901233209",
"74839710731227101095473978836478415942",
"134323843050714788561098986529648533223",
"210667570921638122088247098612863904374",
"20309637364150780384881057270579846440",
"16347813411824758863230218896642367000",
"187590484850441321755447831257647803013",
"239615023334853647142605076768139452588",
"339842433485369332284474751955491437537",
"178490816160456397724334850666976411390",
"22800455263183988580760262584174447196",
"232589786877651449594995626237986527488",
"114109543124619712329773024021249945215",
"169962098430616898625710310030807074345",
"300290368379536929294230773128997565192",
"199194435079621120687900095053105001392",
"103148769233108258192587753191794806203",
"284543329160311086316113546838250757638",
"142795574304018145874124205293038567733",
"34755028257611678087103263405735705961",
"19163601415753284957677092671302103392",
"206649103469418144423898747779714929273",
"330958869700080332707149791500823602823",
"219742868614130764548824746196073606967",
"29955224155911400597328791907387997567"
]
},
"target": {
"file": "drivers/misc/cxl/guest.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@60b2ed21a65f3f5318666ccd765c3507991370cf",
"id": "CVE-2022-50481-cc58d88f",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "78730643564266014519263970017501751405",
"length": 1616.0
},
"target": {
"file": "drivers/misc/cxl/guest.c",
"function": "cxl_guest_init_afu"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d775a1da5a52b4f4bb02f2707ba420d1bec48dbb",
"id": "CVE-2022-50481-d2e7a643",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"9438378464718364962878964913430884427",
"41276585980274909571808237909382453856",
"35488252244553393986071545535901233209",
"74839710731227101095473978836478415942",
"134323843050714788561098986529648533223",
"210667570921638122088247098612863904374",
"20309637364150780384881057270579846440",
"16347813411824758863230218896642367000",
"187590484850441321755447831257647803013",
"239615023334853647142605076768139452588",
"339842433485369332284474751955491437537",
"178490816160456397724334850666976411390",
"22800455263183988580760262584174447196",
"232589786877651449594995626237986527488",
"114109543124619712329773024021249945215",
"169962098430616898625710310030807074345",
"300290368379536929294230773128997565192",
"199194435079621120687900095053105001392",
"103148769233108258192587753191794806203",
"284543329160311086316113546838250757638",
"142795574304018145874124205293038567733",
"34755028257611678087103263405735705961",
"19163601415753284957677092671302103392",
"206649103469418144423898747779714929273",
"330958869700080332707149791500823602823",
"219742868614130764548824746196073606967",
"29955224155911400597328791907387997567"
]
},
"target": {
"file": "drivers/misc/cxl/guest.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@170e8c2d2b61e15e7f7cfeded81bc1e959a15ed8",
"id": "CVE-2022-50481-d70af5ba",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "78730643564266014519263970017501751405",
"length": 1616.0
},
"target": {
"file": "drivers/misc/cxl/guest.c",
"function": "cxl_guest_init_afu"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b32559ee4e6667c5c3daf4ec5454c277d1f255d2",
"id": "CVE-2022-50481-e3b717c6",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "282150084879898550675247199351039079967",
"length": 958.0
},
"target": {
"file": "drivers/misc/cxl/guest.c",
"function": "cxl_guest_init_adapter"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e5021bbf11b024cc65ea1e84c377df484183be4b",
"id": "CVE-2022-50481-fd4ee2d6",
"deprecated": false,
"signature_version": "v1"
}
]