In the Linux kernel, the following vulnerability has been resolved:
afunix: Fix data-races around user->unixinflight.
user->unixinflight is changed under spinlock(unixgclock), but toomanyunix_fds() reads it locklessly.
Let's annotate the write/read accesses to user->unix_inflight.
BUG: KCSAN: data-race in unixattachfds / unix_inflight
write to 0xffffffff8546f2d0 of 8 bytes by task 44798 on cpu 1: unixinflight+0x157/0x180 net/unix/scm.c:66 unixattachfds+0x147/0x1e0 net/unix/scm.c:123 unixscmtoskb net/unix/afunix.c:1827 [inline] unixdgramsendmsg+0x46a/0x14f0 net/unix/afunix.c:1950 unixseqpacketsendmsg net/unix/afunix.c:2308 [inline] unixseqpacketsendmsg+0xba/0x130 net/unix/afunix.c:2292 socksendmsgnosec net/socket.c:725 [inline] socksendmsg+0x148/0x160 net/socket.c:748 syssendmsg+0x4e4/0x610 net/socket.c:2494 syssendmsg+0xc6/0x140 net/socket.c:2548 _syssendmsg+0x94/0x140 net/socket.c:2577 _dosyssendmsg net/socket.c:2586 [inline] _sesyssendmsg net/socket.c:2584 [inline] _x64syssendmsg+0x45/0x50 net/socket.c:2584 dosyscallx64 arch/x86/entry/common.c:50 [inline] dosyscall64+0x3b/0x90 arch/x86/entry/common.c:80 entrySYSCALL64after_hwframe+0x6e/0xd8
read to 0xffffffff8546f2d0 of 8 bytes by task 44814 on cpu 0: toomanyunixfds net/unix/scm.c:101 [inline] unixattachfds+0x54/0x1e0 net/unix/scm.c:110 unixscmtoskb net/unix/afunix.c:1827 [inline] unixdgramsendmsg+0x46a/0x14f0 net/unix/afunix.c:1950 unixseqpacketsendmsg net/unix/afunix.c:2308 [inline] unixseqpacketsendmsg+0xba/0x130 net/unix/afunix.c:2292 socksendmsgnosec net/socket.c:725 [inline] socksendmsg+0x148/0x160 net/socket.c:748 syssendmsg+0x4e4/0x610 net/socket.c:2494 syssendmsg+0xc6/0x140 net/socket.c:2548 _syssendmsg+0x94/0x140 net/socket.c:2577 _dosyssendmsg net/socket.c:2586 [inline] _sesyssendmsg net/socket.c:2584 [inline] _x64syssendmsg+0x45/0x50 net/socket.c:2584 dosyscallx64 arch/x86/entry/common.c:50 [inline] dosyscall64+0x3b/0x90 arch/x86/entry/common.c:80 entrySYSCALL64after_hwframe+0x6e/0xd8
value changed: 0x000000000000000c -> 0x000000000000000d
Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 44814 Comm: systemd-coredum Not tainted 6.4.0-11989-g6843306689af #6 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53204.json",
"cna_assigner": "Linux"
}"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-53204.json"
[
{
"id": "CVE-2023-53204-117d9793",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ac92f239a079678a035c0faad9089354a874aede",
"target": {
"file": "net/unix/scm.c",
"function": "too_many_unix_fds"
},
"digest": {
"function_hash": "212816309880797101551032379418621423257",
"length": 245.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53204-152018a5",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9151ed4b006125cba7c06c79df504340ea4e9386",
"target": {
"file": "net/unix/scm.c",
"function": "too_many_unix_fds"
},
"digest": {
"function_hash": "212816309880797101551032379418621423257",
"length": 245.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53204-2ac5e5f3",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@03d133dfbcec9d439729cc64706c7eb6d1663a24",
"target": {
"file": "net/unix/scm.c",
"function": "too_many_unix_fds"
},
"digest": {
"function_hash": "212816309880797101551032379418621423257",
"length": 245.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53204-41a5e0c9",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b401d7e485b0a234cf8fe9a6ae99dbcd20863138",
"target": {
"file": "net/unix/scm.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"261226927451744912561975079752849652638",
"122440904227274423456896039531049603645",
"4564330519125234373465946368936889200",
"260194860324212319310483767880219178236",
"290824579484857241857404864413685960089",
"25047175018265297160779171482809517665",
"227126492362033269783509495233081909756",
"294379981433702945369672178027303569704",
"113223909399411803101685073180172864673",
"89254276115521887580920577654104593747",
"313050238953548730414147619253247546678",
"178328600371494402513145488234110217802"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line"
},
{
"id": "CVE-2023-53204-4233cb8e",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@adcf4e069358cdee8593663650ea447215a1c49e",
"target": {
"file": "net/unix/scm.c",
"function": "unix_inflight"
},
"digest": {
"function_hash": "283889983344803029949512901565166663926",
"length": 467.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53204-4300a929",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@03d133dfbcec9d439729cc64706c7eb6d1663a24",
"target": {
"file": "net/unix/scm.c",
"function": "unix_notinflight"
},
"digest": {
"function_hash": "54188308215796110158742170536997316044",
"length": 437.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53204-4534926b",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ac92f239a079678a035c0faad9089354a874aede",
"target": {
"file": "net/unix/scm.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"261226927451744912561975079752849652638",
"122440904227274423456896039531049603645",
"4564330519125234373465946368936889200",
"260194860324212319310483767880219178236",
"290824579484857241857404864413685960089",
"25047175018265297160779171482809517665",
"227126492362033269783509495233081909756",
"294379981433702945369672178027303569704",
"113223909399411803101685073180172864673",
"89254276115521887580920577654104593747",
"313050238953548730414147619253247546678",
"178328600371494402513145488234110217802"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line"
},
{
"id": "CVE-2023-53204-45cee5fa",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@adcf4e069358cdee8593663650ea447215a1c49e",
"target": {
"file": "net/unix/scm.c",
"function": "too_many_unix_fds"
},
"digest": {
"function_hash": "212816309880797101551032379418621423257",
"length": 245.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53204-48c3b2d5",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0bc36c0650b21df36fbec8136add83936eaf0607",
"target": {
"file": "net/unix/scm.c",
"function": "too_many_unix_fds"
},
"digest": {
"function_hash": "212816309880797101551032379418621423257",
"length": 245.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53204-59b23cfb",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b9cdbb38e030fc2fe97fe27b54cbb6b4fbff250f",
"target": {
"file": "net/unix/scm.c",
"function": "too_many_unix_fds"
},
"digest": {
"function_hash": "212816309880797101551032379418621423257",
"length": 245.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53204-62fa7651",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9151ed4b006125cba7c06c79df504340ea4e9386",
"target": {
"file": "net/unix/scm.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"261226927451744912561975079752849652638",
"122440904227274423456896039531049603645",
"4564330519125234373465946368936889200",
"260194860324212319310483767880219178236",
"290824579484857241857404864413685960089",
"25047175018265297160779171482809517665",
"227126492362033269783509495233081909756",
"294379981433702945369672178027303569704",
"113223909399411803101685073180172864673",
"89254276115521887580920577654104593747",
"313050238953548730414147619253247546678",
"178328600371494402513145488234110217802"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line"
},
{
"id": "CVE-2023-53204-63827781",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b401d7e485b0a234cf8fe9a6ae99dbcd20863138",
"target": {
"file": "net/unix/scm.c",
"function": "too_many_unix_fds"
},
"digest": {
"function_hash": "212816309880797101551032379418621423257",
"length": 245.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53204-6aaf94bc",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@03d133dfbcec9d439729cc64706c7eb6d1663a24",
"target": {
"file": "net/unix/scm.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"261226927451744912561975079752849652638",
"122440904227274423456896039531049603645",
"4564330519125234373465946368936889200",
"260194860324212319310483767880219178236",
"290824579484857241857404864413685960089",
"25047175018265297160779171482809517665",
"227126492362033269783509495233081909756",
"294379981433702945369672178027303569704",
"113223909399411803101685073180172864673",
"89254276115521887580920577654104593747",
"313050238953548730414147619253247546678",
"178328600371494402513145488234110217802"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line"
},
{
"id": "CVE-2023-53204-6f4ab075",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0bc36c0650b21df36fbec8136add83936eaf0607",
"target": {
"file": "net/unix/scm.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"261226927451744912561975079752849652638",
"122440904227274423456896039531049603645",
"4564330519125234373465946368936889200",
"260194860324212319310483767880219178236",
"290824579484857241857404864413685960089",
"25047175018265297160779171482809517665",
"227126492362033269783509495233081909756",
"294379981433702945369672178027303569704",
"113223909399411803101685073180172864673",
"89254276115521887580920577654104593747",
"313050238953548730414147619253247546678",
"178328600371494402513145488234110217802"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line"
},
{
"id": "CVE-2023-53204-7c105215",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b401d7e485b0a234cf8fe9a6ae99dbcd20863138",
"target": {
"file": "net/unix/scm.c",
"function": "unix_inflight"
},
"digest": {
"function_hash": "283889983344803029949512901565166663926",
"length": 467.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53204-83723f00",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0bc36c0650b21df36fbec8136add83936eaf0607",
"target": {
"file": "net/unix/scm.c",
"function": "unix_notinflight"
},
"digest": {
"function_hash": "54188308215796110158742170536997316044",
"length": 437.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53204-873c6240",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b9cdbb38e030fc2fe97fe27b54cbb6b4fbff250f",
"target": {
"file": "net/unix/scm.c",
"function": "unix_inflight"
},
"digest": {
"function_hash": "283889983344803029949512901565166663926",
"length": 467.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53204-980ee9ef",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@df97b5ea9f3ac9308c3a633524dab382cd59d9e5",
"target": {
"file": "net/unix/scm.c",
"function": "unix_notinflight"
},
"digest": {
"function_hash": "54188308215796110158742170536997316044",
"length": 437.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53204-a590b794",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ac92f239a079678a035c0faad9089354a874aede",
"target": {
"file": "net/unix/scm.c",
"function": "unix_inflight"
},
"digest": {
"function_hash": "283889983344803029949512901565166663926",
"length": 467.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53204-a9bc3639",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@df97b5ea9f3ac9308c3a633524dab382cd59d9e5",
"target": {
"file": "net/unix/scm.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"261226927451744912561975079752849652638",
"122440904227274423456896039531049603645",
"4564330519125234373465946368936889200",
"260194860324212319310483767880219178236",
"290824579484857241857404864413685960089",
"25047175018265297160779171482809517665",
"227126492362033269783509495233081909756",
"294379981433702945369672178027303569704",
"113223909399411803101685073180172864673",
"89254276115521887580920577654104593747",
"313050238953548730414147619253247546678",
"178328600371494402513145488234110217802"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line"
},
{
"id": "CVE-2023-53204-aee4bcf1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b9cdbb38e030fc2fe97fe27b54cbb6b4fbff250f",
"target": {
"file": "net/unix/scm.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"261226927451744912561975079752849652638",
"122440904227274423456896039531049603645",
"4564330519125234373465946368936889200",
"260194860324212319310483767880219178236",
"290824579484857241857404864413685960089",
"25047175018265297160779171482809517665",
"227126492362033269783509495233081909756",
"294379981433702945369672178027303569704",
"113223909399411803101685073180172864673",
"89254276115521887580920577654104593747",
"313050238953548730414147619253247546678",
"178328600371494402513145488234110217802"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line"
},
{
"id": "CVE-2023-53204-b558084e",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b401d7e485b0a234cf8fe9a6ae99dbcd20863138",
"target": {
"file": "net/unix/scm.c",
"function": "unix_notinflight"
},
"digest": {
"function_hash": "54188308215796110158742170536997316044",
"length": 437.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53204-be6310b5",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ac92f239a079678a035c0faad9089354a874aede",
"target": {
"file": "net/unix/scm.c",
"function": "unix_notinflight"
},
"digest": {
"function_hash": "54188308215796110158742170536997316044",
"length": 437.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53204-cbce8637",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@df97b5ea9f3ac9308c3a633524dab382cd59d9e5",
"target": {
"file": "net/unix/scm.c",
"function": "too_many_unix_fds"
},
"digest": {
"function_hash": "212816309880797101551032379418621423257",
"length": 245.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53204-cd9f97e0",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9151ed4b006125cba7c06c79df504340ea4e9386",
"target": {
"file": "net/unix/scm.c",
"function": "unix_inflight"
},
"digest": {
"function_hash": "283889983344803029949512901565166663926",
"length": 467.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53204-d49df049",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b9cdbb38e030fc2fe97fe27b54cbb6b4fbff250f",
"target": {
"file": "net/unix/scm.c",
"function": "unix_notinflight"
},
"digest": {
"function_hash": "54188308215796110158742170536997316044",
"length": 437.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53204-e7808b3d",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@03d133dfbcec9d439729cc64706c7eb6d1663a24",
"target": {
"file": "net/unix/scm.c",
"function": "unix_inflight"
},
"digest": {
"function_hash": "283889983344803029949512901565166663926",
"length": 467.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53204-ea8b93dd",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@adcf4e069358cdee8593663650ea447215a1c49e",
"target": {
"file": "net/unix/scm.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"261226927451744912561975079752849652638",
"122440904227274423456896039531049603645",
"4564330519125234373465946368936889200",
"260194860324212319310483767880219178236",
"290824579484857241857404864413685960089",
"25047175018265297160779171482809517665",
"227126492362033269783509495233081909756",
"294379981433702945369672178027303569704",
"113223909399411803101685073180172864673",
"89254276115521887580920577654104593747",
"313050238953548730414147619253247546678",
"178328600371494402513145488234110217802"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line"
},
{
"id": "CVE-2023-53204-edc5f56b",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0bc36c0650b21df36fbec8136add83936eaf0607",
"target": {
"file": "net/unix/scm.c",
"function": "unix_inflight"
},
"digest": {
"function_hash": "283889983344803029949512901565166663926",
"length": 467.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53204-f8a5f81a",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9151ed4b006125cba7c06c79df504340ea4e9386",
"target": {
"file": "net/unix/scm.c",
"function": "unix_notinflight"
},
"digest": {
"function_hash": "54188308215796110158742170536997316044",
"length": 437.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53204-f9725c03",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@adcf4e069358cdee8593663650ea447215a1c49e",
"target": {
"file": "net/unix/scm.c",
"function": "unix_notinflight"
},
"digest": {
"function_hash": "54188308215796110158742170536997316044",
"length": 437.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2023-53204-fff4d3f5",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@df97b5ea9f3ac9308c3a633524dab382cd59d9e5",
"target": {
"file": "net/unix/scm.c",
"function": "unix_inflight"
},
"digest": {
"function_hash": "283889983344803029949512901565166663926",
"length": 467.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
}
]