In the Linux kernel, the following vulnerability has been resolved:
cifs: Fix memory leak on the deferred close
xfstests on smb21 report kmemleak as below:
unreferenced object 0xffff8881767d6200 (size 64): comm "xfsio", pid 1284, jiffies 4294777434 (age 20.789s) hex dump (first 32 bytes): 80 5a d0 11 81 88 ff ff 78 8a aa 63 81 88 ff ff .Z......x..c.... 00 71 99 76 81 88 ff ff 00 00 00 00 00 00 00 00 .q.v............ backtrace: [<00000000ad04e6ea>] cifsclose+0x92/0x2c0 [<0000000028b93c82>] _fput+0xff/0x3f0 [<00000000d8116851>] taskworkrun+0x85/0xc0 [<0000000027e14f9e>] doexit+0x5e5/0x1240 [<00000000fb492b95>] dogroupexit+0x58/0xe0 [<00000000129a32d9>] _x64sysexitgroup+0x28/0x30 [<00000000e3f7d8e9>] dosyscall64+0x35/0x80 [<00000000102e8a0b>] entrySYSCALL64afterhwframe+0x46/0xb0
When cancel the deferred close work, we should also cleanup the struct cifsdeferredclose.
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50076.json",
"cna_assigner": "Linux"
}"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50076.json"
[
{
"id": "CVE-2022-50076-1473f3f4",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@60b6d38add7b9c17d6e5d49ee8e930ea1a5650c5",
"target": {
"file": "fs/cifs/misc.c",
"function": "cifs_close_all_deferred_files"
},
"digest": {
"function_hash": "36129818457575071138937390778713068330",
"length": 661.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2022-50076-18ba55c1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@60b6d38add7b9c17d6e5d49ee8e930ea1a5650c5",
"target": {
"file": "fs/cifs/misc.c",
"function": "cifs_close_deferred_file_under_dentry"
},
"digest": {
"function_hash": "155241540771740092616788113679763834040",
"length": 834.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2022-50076-1b01b549",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@60b6d38add7b9c17d6e5d49ee8e930ea1a5650c5",
"target": {
"file": "fs/cifs/misc.c",
"function": "cifs_close_deferred_file"
},
"digest": {
"function_hash": "75045080155040282829041268210907742800",
"length": 655.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2022-50076-23a29592",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@860efae127888ae535bc4eda1b7f27642727c69e",
"target": {
"file": "fs/cifs/misc.c",
"function": "cifs_close_all_deferred_files"
},
"digest": {
"function_hash": "36129818457575071138937390778713068330",
"length": 661.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2022-50076-28f02000",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ca08d0eac020d48a3141dbec0a3cf64fbdb17cde",
"target": {
"file": "fs/cifs/misc.c",
"function": "cifs_close_deferred_file_under_dentry"
},
"digest": {
"function_hash": "71606218403122769500310150453629234853",
"length": 791.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2022-50076-4b95a4c4",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ca08d0eac020d48a3141dbec0a3cf64fbdb17cde",
"target": {
"file": "fs/cifs/misc.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"29134190917169243664232362616006648409",
"14524113919669772176068455830637790421",
"77664610638593603170349084074313319519",
"136953666681688377832559509334820819947",
"285750680610627081845061497086499176063",
"338055070447266817813499551567853365810",
"77664610638593603170349084074313319519",
"136953666681688377832559509334820819947",
"225477886513411109397004434505331022065",
"127947805288724091185827903399292408179",
"77664610638593603170349084074313319519",
"136953666681688377832559509334820819947"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line"
},
{
"id": "CVE-2022-50076-54e9dcb2",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@860efae127888ae535bc4eda1b7f27642727c69e",
"target": {
"file": "fs/cifs/misc.c",
"function": "cifs_close_deferred_file"
},
"digest": {
"function_hash": "75045080155040282829041268210907742800",
"length": 655.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2022-50076-749ea445",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@860efae127888ae535bc4eda1b7f27642727c69e",
"target": {
"file": "fs/cifs/misc.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"29134190917169243664232362616006648409",
"14524113919669772176068455830637790421",
"77664610638593603170349084074313319519",
"136953666681688377832559509334820819947",
"36035426528347468582775714521843892576",
"79813047022863768785301297676862280007",
"77664610638593603170349084074313319519",
"136953666681688377832559509334820819947",
"225477886513411109397004434505331022065",
"127947805288724091185827903399292408179",
"77664610638593603170349084074313319519",
"136953666681688377832559509334820819947"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line"
},
{
"id": "CVE-2022-50076-85b7193e",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@60b6d38add7b9c17d6e5d49ee8e930ea1a5650c5",
"target": {
"file": "fs/cifs/misc.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"29134190917169243664232362616006648409",
"14524113919669772176068455830637790421",
"77664610638593603170349084074313319519",
"136953666681688377832559509334820819947",
"36035426528347468582775714521843892576",
"79813047022863768785301297676862280007",
"77664610638593603170349084074313319519",
"136953666681688377832559509334820819947",
"225477886513411109397004434505331022065",
"127947805288724091185827903399292408179",
"77664610638593603170349084074313319519",
"136953666681688377832559509334820819947"
]
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Line"
},
{
"id": "CVE-2022-50076-8acedcf5",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ca08d0eac020d48a3141dbec0a3cf64fbdb17cde",
"target": {
"file": "fs/cifs/misc.c",
"function": "cifs_close_all_deferred_files"
},
"digest": {
"function_hash": "282441861161355077054991932690279573819",
"length": 618.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2022-50076-8b65f5d2",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ca08d0eac020d48a3141dbec0a3cf64fbdb17cde",
"target": {
"file": "fs/cifs/misc.c",
"function": "cifs_close_deferred_file"
},
"digest": {
"function_hash": "75045080155040282829041268210907742800",
"length": 655.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
},
{
"id": "CVE-2022-50076-fa4196f3",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@860efae127888ae535bc4eda1b7f27642727c69e",
"target": {
"file": "fs/cifs/misc.c",
"function": "cifs_close_deferred_file_under_dentry"
},
"digest": {
"function_hash": "155241540771740092616788113679763834040",
"length": 834.0
},
"signature_version": "v1",
"deprecated": false,
"signature_type": "Function"
}
]