In the Linux kernel, the following vulnerability has been resolved:
ksmbd: unset the binding mark of a reused connection
Steve French reported null pointer dereference error from sha256 lib. cifs.ko can send session setup requests on reused connection. If reused connection is used for binding session, conn->binding can still remain true and generatepreauthhash() will not set sess->PreauthHashValue and it will be NULL. It is used as a material to create an encryption key in ksmbdgensmb311encryptionkey. ->PreauthHashValue cause null pointer dereference error from cryptoshash_update().
BUG: kernel NULL pointer dereference, address: 0000000000000000
PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP PTI CPU: 8 PID: 429254 Comm: kworker/8:39 Hardware name: LENOVO 20MAS08500/20MAS08500, BIOS N2CET69W (1.52 ) Workqueue: ksmbd-io handleksmbdwork [ksmbd] RIP: 0010:libsha256basedoupdate.isra.0+0x11e/0x1d0 [sha256ssse3] <TASK> ? showregs+0x6d/0x80 ? _die+0x24/0x80 ? pagefaultoops+0x99/0x1b0 ? douseraddrfault+0x2ee/0x6b0 ? excpagefault+0x83/0x1b0 ? asmexcpagefault+0x27/0x30 ? _pfxsha256transformrorx+0x10/0x10 [sha256ssse3] ? libsha256basedoupdate.isra.0+0x11e/0x1d0 [sha256ssse3] ? _pfxsha256transformrorx+0x10/0x10 [sha256ssse3] ? _pfxsha256transformrorx+0x10/0x10 [sha256ssse3] _sha256update+0x77/0xa0 [sha256ssse3] sha256avx2update+0x15/0x30 [sha256ssse3] cryptoshashupdate+0x1e/0x40 hmacupdate+0x12/0x20 cryptoshashupdate+0x1e/0x40 generatekey+0x234/0x380 [ksmbd] generatesmb3encryptionkey+0x40/0x1c0 [ksmbd] ksmbdgensmb311encryptionkey+0x72/0xa0 [ksmbd] ntlmauthenticate.isra.0+0x423/0x5d0 [ksmbd] smb2sesssetup+0x952/0xaa0 [ksmbd] _processrequest+0xa3/0x1d0 [ksmbd] _handleksmbdwork+0x1c4/0x2f0 [ksmbd] handleksmbdwork+0x2d/0xa0 [ksmbd] processonework+0x16c/0x350 workerthread+0x306/0x440 ? _pfxworkerthread+0x10/0x10 kthread+0xef/0x120 ? _pfxkthread+0x10/0x10 retfromfork+0x44/0x70 ? _pfxkthread+0x10/0x10 retfromfork_asm+0x1b/0x30 </TASK>
{ "vanir_signatures": [ { "signature_type": "Line", "target": { "file": "fs/smb/server/smb2pdu.c" }, "signature_version": "v1", "digest": { "threshold": 0.9, "line_hashes": [ "34192052524658546439786353715138847164", "72546139419034437292296048425472462484", "267920009483677326250844541626722031491", "249788002433584359926619934667966931254", "56437587250413414547007411280714475162", "69247267736936506971212634569490977069", "153732854993840620820998404706163666126", "209743323086938786955582537276568982192" ] }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@41bc256da7e47b679df87c7fc7a5b393052b9cce", "id": "CVE-2024-46795-239b3d16" }, { "signature_type": "Function", "target": { "file": "fs/smb/server/smb2pdu.c", "function": "smb2_sess_setup" }, "signature_version": "v1", "digest": { "length": 5245.0, "function_hash": "21262929615224412673880583901800798200" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@93d54a4b59c4b3d803d20aa645ab5ca71f3b3b02", "id": "CVE-2024-46795-2c77fc32" }, { "signature_type": "Function", "target": { "file": "fs/smb/server/smb2pdu.c", "function": "smb2_sess_setup" }, "signature_version": "v1", "digest": { "length": 5245.0, "function_hash": "21262929615224412673880583901800798200" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@41bc256da7e47b679df87c7fc7a5b393052b9cce", "id": "CVE-2024-46795-3ea14c23" }, { "signature_type": "Function", "target": { "file": "fs/ksmbd/smb2pdu.c", "function": "smb2_sess_setup" }, "signature_version": "v1", "digest": { "length": 5245.0, "function_hash": "21262929615224412673880583901800798200" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9914f1bd61d5e838bb1ab15a71076d37a6db65d1", "id": "CVE-2024-46795-4821385b" }, { "signature_type": "Function", "target": { "file": "fs/smb/server/smb2pdu.c", "function": "smb2_sess_setup" }, "signature_version": "v1", "digest": { "length": 5245.0, "function_hash": "21262929615224412673880583901800798200" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@78c5a6f1f630172b19af4912e755e1da93ef0ab5", "id": "CVE-2024-46795-8bab762a" }, { "signature_type": "Line", "target": { "file": "fs/smb/server/smb2pdu.c" }, "signature_version": "v1", "digest": { "threshold": 0.9, "line_hashes": [ "34192052524658546439786353715138847164", "72546139419034437292296048425472462484", "267920009483677326250844541626722031491", "249788002433584359926619934667966931254", "56437587250413414547007411280714475162", "69247267736936506971212634569490977069", "153732854993840620820998404706163666126", "209743323086938786955582537276568982192" ] }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@78c5a6f1f630172b19af4912e755e1da93ef0ab5", "id": "CVE-2024-46795-ae6e8d0b" }, { "signature_type": "Function", "target": { "file": "fs/smb/server/smb2pdu.c", "function": "smb2_sess_setup" }, "signature_version": "v1", "digest": { "length": 5245.0, "function_hash": "21262929615224412673880583901800798200" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4c8496f44f5bb5c06cdef5eb130ab259643392a1", "id": "CVE-2024-46795-b7db9450" }, { "signature_type": "Line", "target": { "file": "fs/ksmbd/smb2pdu.c" }, "signature_version": "v1", "digest": { "threshold": 0.9, "line_hashes": [ "34192052524658546439786353715138847164", "72546139419034437292296048425472462484", "267920009483677326250844541626722031491", "249788002433584359926619934667966931254", "56437587250413414547007411280714475162", "69247267736936506971212634569490977069", "153732854993840620820998404706163666126", "209743323086938786955582537276568982192" ] }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9914f1bd61d5e838bb1ab15a71076d37a6db65d1", "id": "CVE-2024-46795-c203b2ca" }, { "signature_type": "Line", "target": { "file": "fs/smb/server/smb2pdu.c" }, "signature_version": "v1", "digest": { "threshold": 0.9, "line_hashes": [ "34192052524658546439786353715138847164", "72546139419034437292296048425472462484", "267920009483677326250844541626722031491", "249788002433584359926619934667966931254", "56437587250413414547007411280714475162", "69247267736936506971212634569490977069", "153732854993840620820998404706163666126", "209743323086938786955582537276568982192" ] }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4c8496f44f5bb5c06cdef5eb130ab259643392a1", "id": "CVE-2024-46795-c3b6e24e" }, { "signature_type": "Line", "target": { "file": "fs/smb/server/smb2pdu.c" }, "signature_version": "v1", "digest": { "threshold": 0.9, "line_hashes": [ "34192052524658546439786353715138847164", "72546139419034437292296048425472462484", "267920009483677326250844541626722031491", "249788002433584359926619934667966931254", "56437587250413414547007411280714475162", "69247267736936506971212634569490977069", "153732854993840620820998404706163666126", "209743323086938786955582537276568982192" ] }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@93d54a4b59c4b3d803d20aa645ab5ca71f3b3b02", "id": "CVE-2024-46795-e7d77023" } ] }