In the Linux kernel, the following vulnerability has been resolved:
nfsd: under NFSv4.1, fix double svcxprtput on rpc_create failure
On error situation clp->cl_cb_conn.cb_xprt
should not be given
a reference to the xprt otherwise both client cleanup and the
error handling path of the caller call to put it. Better to
delay handing over the reference to a later branch.
[ 72.530665] refcountt: underflow; use-after-free. [ 72.531933] WARNING: CPU: 0 PID: 173 at lib/refcount.c:28 refcountwarnsaturate+0xcf/0x120 [ 72.533075] Modules linked in: nfsd(OE) nfsv4(OE) nfsv3(OE) nfs(OE) lockd(OE) compatnfsssc(OE) nfsacl(OE) rpcsecgsskrb5(OE) authrpcgss(OE) rpcrdma(OE) dnsresolver fscache netfs grace rdmacm iwcm ibcm sunrpc(OE) mlx5ib mlx5core mlxfw pcihypervintf ibuverbs ibcore xtMASQUERADE nfconntracknetlink nftcounter xtaddrtype nftcompat brnetfilter bridge stp llc nftrejectinet nfrejectipv4 nfrejectipv6 nftreject nftct nftchainnat nfnat nfconntrack nfdefragipv6 nfdefragipv4 ipset overlay nftables nfnetlink crct10difpclmul crc32pclmul ghashclmulniintel xfs serioraw virtionet virtioblk netfailover failover fuse [last unloaded: sunrpc] [ 72.540389] CPU: 0 PID: 173 Comm: kworker/u16:5 Tainted: G OE 5.15.82-dan #1 [ 72.541511] Hardware name: Red Hat KVM/RHEL-AV, BIOS 1.16.0-3.module+el8.7.0+1084+97b81f61 04/01/2014 [ 72.542717] Workqueue: nfsd4callbacks nfsd4runcbwork [nfsd] [ 72.543575] RIP: 0010:refcountwarnsaturate+0xcf/0x120 [ 72.544299] Code: 55 00 0f 0b 5d e9 01 50 98 00 80 3d 75 9e 39 08 00 0f 85 74 ff ff ff 48 c7 c7 e8 d1 60 8e c6 05 61 9e 39 08 01 e8 f6 51 55 00 <0f> 0b 5d e9 d9 4f 98 00 80 3d 4b 9e 39 08 00 0f 85 4c ff ff ff 48 [ 72.546666] RSP: 0018:ffffb3f841157cf0 EFLAGS: 00010286 [ 72.547393] RAX: 0000000000000026 RBX: ffff89ac6231d478 RCX: 0000000000000000 [ 72.548324] RDX: ffff89adb7c2c2c0 RSI: ffff89adb7c205c0 RDI: ffff89adb7c205c0 [ 72.549271] RBP: ffffb3f841157cf0 R08: 0000000000000000 R09: c0000000ffefffff [ 72.550209] R10: 0000000000000001 R11: ffffb3f841157ad0 R12: ffff89ac6231d180 [ 72.551142] R13: ffff89ac6231d478 R14: ffff89ac40c06180 R15: ffff89ac6231d4b0 [ 72.552089] FS: 0000000000000000(0000) GS:ffff89adb7c00000(0000) knlGS:0000000000000000 [ 72.553175] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 72.553934] CR2: 0000563a310506a8 CR3: 0000000109a66000 CR4: 0000000000350ef0 [ 72.554874] Call Trace: [ 72.555278] <TASK> [ 72.555614] svcxprtput+0xaf/0xe0 [sunrpc] [ 72.556276] nfsd4processcbupdate.isra.11+0xb7/0x410 [nfsd] [ 72.557087] ? updateloadavg+0x82/0x610 [ 72.557652] ? cpuacctcharge+0x60/0x70 [ 72.558212] ? dequeueentity+0xdb/0x3e0 [ 72.558765] ? queuedspinunlock+0x9/0x20 [ 72.559358] nfsd4runcbwork+0xfc/0x270 [nfsd] [ 72.560031] processonework+0x1df/0x390 [ 72.560600] workerthread+0x37/0x3b0 [ 72.561644] ? processonework+0x390/0x390 [ 72.562247] kthread+0x12f/0x150 [ 72.562710] ? setkthreadstruct+0x50/0x50 [ 72.563309] retfromfork+0x22/0x30 [ 72.563818] </TASK> [ 72.564189] ---[ end trace 031117b1c72ec616 ]--- [ 72.566019] listadd corruption. next->prev should be prev (ffff89ac4977e538), but was ffff89ac4763e018. (next=ffff89ac4763e018). [ 72.567647] ------------[ cut here ]------------
{ "vanir_signatures": [ { "id": "CVE-2022-50401-0090163a", "signature_type": "Function", "target": { "file": "fs/nfsd/nfs4callback.c", "function": "setup_callback_client" }, "signature_version": "v1", "digest": { "length": 1611.0, "function_hash": "305431463026463558416649214338587448983" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fddac3b4578d302ac9e51e7f03a9aae6254ae2a3" }, { "id": "CVE-2022-50401-04964ad8", "signature_type": "Line", "target": { "file": "fs/nfsd/nfs4callback.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "61752893630733646937645191674767362726", "302215218007034788757458014096191037735", "239479188363254508745998612866288265163", "29262813003772333810186951024763035031", "294565668826427497510975892457326368779", "141051800477947766145473315421468519682", "9747272758399283060917371321088446943", "1829243685077298181694310315139581575" ], "threshold": 0.9 }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e2f9f03e4537f3fcc8fd2bdd3248530c3477a371" }, { "id": "CVE-2022-50401-4ad523d4", "signature_type": "Line", "target": { "file": "fs/nfsd/nfs4callback.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "61752893630733646937645191674767362726", "302215218007034788757458014096191037735", "239479188363254508745998612866288265163", "29262813003772333810186951024763035031", "237496749684586750157730372408693228200", "35792624737409715232639890653931586103", "325023369412796730403086990537456543906", "76740192855897333599473205567575191272" ], "threshold": 0.9 }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@707bcca9616002d204091ca7c4d1d91151104332" }, { "id": "CVE-2022-50401-4bee9b1f", "signature_type": "Function", "target": { "file": "fs/nfsd/nfs4callback.c", "function": "setup_callback_client" }, "signature_version": "v1", "digest": { "length": 1747.0, "function_hash": "209406578861395666458476101356901475685" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3bc8edc98bd43540dbe648e4ef91f443d6d20a24" }, { "id": "CVE-2022-50401-5289ea68", "signature_type": "Line", "target": { "file": "fs/nfsd/nfs4callback.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "61752893630733646937645191674767362726", "302215218007034788757458014096191037735", "239479188363254508745998612866288265163", "29262813003772333810186951024763035031", "237496749684586750157730372408693228200", "35792624737409715232639890653931586103", "325023369412796730403086990537456543906", "76740192855897333599473205567575191272" ], "threshold": 0.9 }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@15fc60aa5bdcf6d5f93000d3d00579fc67632ee0" }, { "id": "CVE-2022-50401-64b72885", "signature_type": "Function", "target": { "file": "fs/nfsd/nfs4callback.c", "function": "setup_callback_client" }, "signature_version": "v1", "digest": { "length": 1747.0, "function_hash": "209406578861395666458476101356901475685" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d843ebd860c58a38e45527e8ec6516059f4c97f3" }, { "id": "CVE-2022-50401-7192d89f", "signature_type": "Function", "target": { "file": "fs/nfsd/nfs4callback.c", "function": "setup_callback_client" }, "signature_version": "v1", "digest": { "length": 1747.0, "function_hash": "209406578861395666458476101356901475685" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e2f9f03e4537f3fcc8fd2bdd3248530c3477a371" }, { "id": "CVE-2022-50401-aadda875", "signature_type": "Line", "target": { "file": "fs/nfsd/nfs4callback.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "61752893630733646937645191674767362726", "302215218007034788757458014096191037735", "239479188363254508745998612866288265163", "29262813003772333810186951024763035031", "287942164985596160183418608888502785375", "141051800477947766145473315421468519682", "9747272758399283060917371321088446943", "76740192855897333599473205567575191272" ], "threshold": 0.9 }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fddac3b4578d302ac9e51e7f03a9aae6254ae2a3" }, { "id": "CVE-2022-50401-bb2bdd14", "signature_type": "Line", "target": { "file": "fs/nfsd/nfs4callback.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "61752893630733646937645191674767362726", "302215218007034788757458014096191037735", "239479188363254508745998612866288265163", "29262813003772333810186951024763035031", "294565668826427497510975892457326368779", "141051800477947766145473315421468519682", "9747272758399283060917371321088446943", "1829243685077298181694310315139581575" ], "threshold": 0.9 }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3bc8edc98bd43540dbe648e4ef91f443d6d20a24" }, { "id": "CVE-2022-50401-bde42112", "signature_type": "Function", "target": { "file": "fs/nfsd/nfs4callback.c", "function": "setup_callback_client" }, "signature_version": "v1", "digest": { "length": 1747.0, "function_hash": "209406578861395666458476101356901475685" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a472f069ced8601979f53c13c0cf20236074ed46" }, { "id": "CVE-2022-50401-c1799e4b", "signature_type": "Line", "target": { "file": "fs/nfsd/nfs4callback.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "61752893630733646937645191674767362726", "302215218007034788757458014096191037735", "239479188363254508745998612866288265163", "29262813003772333810186951024763035031", "294565668826427497510975892457326368779", "141051800477947766145473315421468519682", "9747272758399283060917371321088446943", "1829243685077298181694310315139581575" ], "threshold": 0.9 }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a472f069ced8601979f53c13c0cf20236074ed46" }, { "id": "CVE-2022-50401-d0a8f570", "signature_type": "Function", "target": { "file": "fs/nfsd/nfs4callback.c", "function": "setup_callback_client" }, "signature_version": "v1", "digest": { "length": 1601.0, "function_hash": "287753077200639988343010541973131157316" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@707bcca9616002d204091ca7c4d1d91151104332" }, { "id": "CVE-2022-50401-d80ee0e2", "signature_type": "Line", "target": { "file": "fs/nfsd/nfs4callback.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "61752893630733646937645191674767362726", "302215218007034788757458014096191037735", "239479188363254508745998612866288265163", "29262813003772333810186951024763035031", "294565668826427497510975892457326368779", "141051800477947766145473315421468519682", "9747272758399283060917371321088446943", "1829243685077298181694310315139581575" ], "threshold": 0.9 }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d843ebd860c58a38e45527e8ec6516059f4c97f3" }, { "id": "CVE-2022-50401-dcf06def", "signature_type": "Function", "target": { "file": "fs/nfsd/nfs4callback.c", "function": "setup_callback_client" }, "signature_version": "v1", "digest": { "length": 1601.0, "function_hash": "220543254004139175734177060898684291498" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@15fc60aa5bdcf6d5f93000d3d00579fc67632ee0" }, { "id": "CVE-2022-50401-f2ae376a", "signature_type": "Line", "target": { "file": "fs/nfsd/nfs4callback.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "61752893630733646937645191674767362726", "302215218007034788757458014096191037735", "239479188363254508745998612866288265163", "29262813003772333810186951024763035031", "237496749684586750157730372408693228200", "35792624737409715232639890653931586103", "325023369412796730403086990537456543906", "76740192855897333599473205567575191272" ], "threshold": 0.9 }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9b4ae8c42d2ff09ed7c5832ccce5684c55e5ed23" }, { "id": "CVE-2022-50401-f7fe05bd", "signature_type": "Function", "target": { "file": "fs/nfsd/nfs4callback.c", "function": "setup_callback_client" }, "signature_version": "v1", "digest": { "length": 1601.0, "function_hash": "220543254004139175734177060898684291498" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9b4ae8c42d2ff09ed7c5832ccce5684c55e5ed23" } ] }