In the Linux kernel, the following vulnerability has been resolved:
tipc: fix an information leak in tipctopsrvkern_subscr
Use a 8-byte write to initialize sub.usrhandle in tipctopsrvkernsubscr(), otherwise four bytes remain uninitialized when issuing setsockopt(..., SOL_TIPC, ...). This resulted in an infoleak reported by KMSAN when the packet was received:
===================================================== BUG: KMSAN: kernel-infoleak in copyout+0xbc/0x100 lib/ioviter.c:169 instrumentcopytouser ./include/linux/instrumented.h:121 copyout+0xbc/0x100 lib/ioviter.c:169 copytoiter+0x5c0/0x20a0 lib/ioviter.c:527 copytoiter ./include/linux/uio.h:176 simplecopytoiter+0x64/0xa0 net/core/datagram.c:513 __skbdatagramiter+0x123/0xdc0 net/core/datagram.c:419 skbcopydatagramiter+0x58/0x200 net/core/datagram.c:527 skbcopydatagrammsg ./include/linux/skbuff.h:3903 packetrecvmsg+0x521/0x1e70 net/packet/afpacket.c:3469 ____sys_recvmsg+0x2c4/0x810 net/socket.c:? ___sys_recvmsg+0x217/0x840 net/socket.c:2743 __sys_recvmsg net/socket.c:2773 __dosysrecvmsg net/socket.c:2783 __sesysrecvmsg net/socket.c:2780 _x64sysrecvmsg+0x364/0x540 net/socket.c:2780 dosyscallx64 arch/x86/entry/common.c:50 dosyscall64+0x3d/0xb0 arch/x86/entry/common.c:80 entrySYSCALL64afterhwframe+0x63/0xcd arch/x86/entry/entry64.S:120
...
Uninit was stored to memory at: tipcsubsubscribe+0x42d/0xb50 net/tipc/subscr.c:156 tipcconnrcvsub+0x246/0x620 net/tipc/topsrv.c:375 tipctopsrvkernsubscr+0x2e8/0x400 net/tipc/topsrv.c:579 tipcgroupcreate+0x4e7/0x7d0 net/tipc/group.c:190 tipcskjoin+0x2a8/0x770 net/tipc/socket.c:3084 tipc_setsockopt+0xae5/0xe40 net/tipc/socket.c:3201 __sys_setsockopt+0x87f/0xdc0 net/socket.c:2252 __dosyssetsockopt net/socket.c:2263 __sesyssetsockopt net/socket.c:2260 _x64syssetsockopt+0xe0/0x160 net/socket.c:2260 dosyscallx64 arch/x86/entry/common.c:50 dosyscall64+0x3d/0xb0 arch/x86/entry/common.c:80 entrySYSCALL64afterhwframe+0x63/0xcd arch/x86/entry/entry64.S:120
Local variable sub created at: tipctopsrvkernsubscr+0x57/0x400 net/tipc/topsrv.c:562 tipcgroup_create+0x4e7/0x7d0 net/tipc/group.c:190
Bytes 84-87 of 88 are uninitialized Memory access of size 88 starts at ffff88801ed57cd0 Data copied to user address 0000000020000400 ... =====================================================
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50531.json"
}[
{
"digest": {
"length": 588.0,
"function_hash": "30498218158137583594875086984815377548"
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"id": "CVE-2022-50531-0e854c4a",
"target": {
"function": "tipc_topsrv_kern_subscr",
"file": "net/tipc/topsrv.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e558e148938442dd49628cd7ef61c360832bef31"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"112583745571457364622546855887379958759",
"59058201557061034708398594011595822490",
"97076799488978146147224822074747486467",
"139038466413365651762404988940817074126"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"id": "CVE-2022-50531-1917437d",
"target": {
"file": "net/tipc/topsrv.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@777ecaabd614d47c482a5c9031579e66da13989a"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"112583745571457364622546855887379958759",
"59058201557061034708398594011595822490",
"97076799488978146147224822074747486467",
"139038466413365651762404988940817074126"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"id": "CVE-2022-50531-1e4ac36f",
"target": {
"file": "net/tipc/topsrv.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@567f8de358b61015dcfb8878a1f06c5369a45f54"
},
{
"digest": {
"length": 588.0,
"function_hash": "30498218158137583594875086984815377548"
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"id": "CVE-2022-50531-5f7e0131",
"target": {
"function": "tipc_topsrv_kern_subscr",
"file": "net/tipc/topsrv.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3d1b83ff7b6575a4e41283203e6b2e25ea700cd7"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"112583745571457364622546855887379958759",
"59058201557061034708398594011595822490",
"97076799488978146147224822074747486467",
"139038466413365651762404988940817074126"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"id": "CVE-2022-50531-68b1e20b",
"target": {
"file": "net/tipc/topsrv.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fef70f978bc289642501d88d2a3f5e841bd31a67"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"112583745571457364622546855887379958759",
"59058201557061034708398594011595822490",
"97076799488978146147224822074747486467",
"139038466413365651762404988940817074126"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"id": "CVE-2022-50531-8f8117fd",
"target": {
"file": "net/tipc/topsrv.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dbc01c0a4e202a7e925dad1d4b7c1d6eb0c81154"
},
{
"digest": {
"length": 588.0,
"function_hash": "30498218158137583594875086984815377548"
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"id": "CVE-2022-50531-b8614c80",
"target": {
"function": "tipc_topsrv_kern_subscr",
"file": "net/tipc/topsrv.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fef70f978bc289642501d88d2a3f5e841bd31a67"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"112583745571457364622546855887379958759",
"59058201557061034708398594011595822490",
"97076799488978146147224822074747486467",
"139038466413365651762404988940817074126"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"id": "CVE-2022-50531-d2ce07e9",
"target": {
"file": "net/tipc/topsrv.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3d1b83ff7b6575a4e41283203e6b2e25ea700cd7"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"112583745571457364622546855887379958759",
"59058201557061034708398594011595822490",
"97076799488978146147224822074747486467",
"139038466413365651762404988940817074126"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line",
"id": "CVE-2022-50531-d978b651",
"target": {
"file": "net/tipc/topsrv.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e558e148938442dd49628cd7ef61c360832bef31"
},
{
"digest": {
"length": 588.0,
"function_hash": "30498218158137583594875086984815377548"
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"id": "CVE-2022-50531-da52b48b",
"target": {
"function": "tipc_topsrv_kern_subscr",
"file": "net/tipc/topsrv.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dbc01c0a4e202a7e925dad1d4b7c1d6eb0c81154"
},
{
"digest": {
"length": 588.0,
"function_hash": "30498218158137583594875086984815377548"
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"id": "CVE-2022-50531-defd3bac",
"target": {
"function": "tipc_topsrv_kern_subscr",
"file": "net/tipc/topsrv.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@777ecaabd614d47c482a5c9031579e66da13989a"
},
{
"digest": {
"length": 588.0,
"function_hash": "30498218158137583594875086984815377548"
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function",
"id": "CVE-2022-50531-e5bf06c0",
"target": {
"function": "tipc_topsrv_kern_subscr",
"file": "net/tipc/topsrv.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@567f8de358b61015dcfb8878a1f06c5369a45f54"
}
]
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50531.json"