In the Linux kernel, the following vulnerability has been resolved:
tipc: re-fetch skb cb after tipcmsgvalidate
As the call trace shows, the original skb was freed in tipcmsgvalidate(), and dereferencing the old skb cb would cause an use-after-free crash.
BUG: KASAN: use-after-free in tipccryptorcvcomplete+0x1835/0x2240 [tipc] Call Trace: <IRQ> tipccryptorcvcomplete+0x1835/0x2240 [tipc] tipccryptorcv+0xd32/0x1ec0 [tipc] tipcrcv+0x744/0x1150 [tipc] ... Allocated by task 47078: kmemcacheallocnode+0x158/0x4d0 _allocskb+0x1c1/0x270 tipcbufacquire+0x1e/0xe0 [tipc] tipcmsgcreate+0x33/0x1c0 [tipc] tipclinkbuildprotomsg+0x38a/0x2100 [tipc] tipclinktimeout+0x8b8/0xef0 [tipc] tipcnodetimeout+0x2a1/0x960 [tipc] calltimerfn+0x2d/0x1c0 ... Freed by task 47078: tipcmsgvalidate+0x7b/0x440 [tipc] tipccryptorcvcomplete+0x4b5/0x2240 [tipc] tipccryptorcv+0xd32/0x1ec0 [tipc] tipcrcv+0x744/0x1150 [tipc]
This patch fixes it by re-fetching the skb cb from the new allocated skb after calling tipcmsgvalidate().
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49017.json"
}[
{
"signature_version": "v1",
"digest": {
"function_hash": "111451558915509310919518337676303019958",
"length": 2323.0
},
"deprecated": false,
"target": {
"file": "net/tipc/crypto.c",
"function": "tipc_crypto_rcv_complete"
},
"signature_type": "Function",
"id": "CVE-2022-49017-21c500b5",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a1ba595e35aa3afbe417ff0af353afb9f65559c0"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"307659943125488272382884835378254761896",
"319359191484677911980672913778482405238",
"334850375666966076944213098547100215634"
],
"threshold": 0.9
},
"deprecated": false,
"target": {
"file": "net/tipc/crypto.c"
},
"signature_type": "Line",
"id": "CVE-2022-49017-45a4ce4b",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a1ba595e35aa3afbe417ff0af353afb9f65559c0"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "50728155377820334047749792303191327343",
"length": 2347.0
},
"deprecated": false,
"target": {
"file": "net/tipc/crypto.c",
"function": "tipc_crypto_rcv_complete"
},
"signature_type": "Function",
"id": "CVE-2022-49017-6c18798c",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3067bc61fcfe3081bf4807ce65560f499e895e77"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"307659943125488272382884835378254761896",
"319359191484677911980672913778482405238",
"334850375666966076944213098547100215634"
],
"threshold": 0.9
},
"deprecated": false,
"target": {
"file": "net/tipc/crypto.c"
},
"signature_type": "Line",
"id": "CVE-2022-49017-89ba0326",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3067bc61fcfe3081bf4807ce65560f499e895e77"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "50728155377820334047749792303191327343",
"length": 2347.0
},
"deprecated": false,
"target": {
"file": "net/tipc/crypto.c",
"function": "tipc_crypto_rcv_complete"
},
"signature_type": "Function",
"id": "CVE-2022-49017-daa30d95",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e128190adb2edfd5042105b5d1ed4553f295f5ef"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"307659943125488272382884835378254761896",
"319359191484677911980672913778482405238",
"334850375666966076944213098547100215634"
],
"threshold": 0.9
},
"deprecated": false,
"target": {
"file": "net/tipc/crypto.c"
},
"signature_type": "Line",
"id": "CVE-2022-49017-ecdb5dd2",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1daec0815655e110c6f206c5e777a4af8168ff58"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "50728155377820334047749792303191327343",
"length": 2347.0
},
"deprecated": false,
"target": {
"file": "net/tipc/crypto.c",
"function": "tipc_crypto_rcv_complete"
},
"signature_type": "Function",
"id": "CVE-2022-49017-f3642504",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1daec0815655e110c6f206c5e777a4af8168ff58"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"307659943125488272382884835378254761896",
"319359191484677911980672913778482405238",
"334850375666966076944213098547100215634"
],
"threshold": 0.9
},
"deprecated": false,
"target": {
"file": "net/tipc/crypto.c"
},
"signature_type": "Line",
"id": "CVE-2022-49017-fc1c788c",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e128190adb2edfd5042105b5d1ed4553f295f5ef"
}
]