CVE-2023-6606: Kernel: out-of-bounds read vulnerability in smbcalcsize
An Out-Of-Bounds Read vulnerability in smbCalcSize in fs/smb/client/netmisc.c in the Linux Kernel. This flaw could allow a local attacker to crash the system or leak internal kernel information.
Refer; https://bugzilla.kernel.org/showbug.cgi?id=218218
[1] Retrieve WordCount and add offset2 to the data part of smb [2] Retrieve a 16-byte value from the calculated pointer
c unsigned int smbCalcSize(void buf) { struct smbhdr ptr = buf; return (sizeof(struct smbhdr) + (2 ptr->WordCount) + 2 / size of the bcc field / + getbcc(ptr)); } ... static inline u16 getbcc(struct smbhdr hdr) { le16 bcptr = (le16 )BCC(hdr);
return getunalignedle16(bcptr);//[2] } ... static inline void BCC(struct smbhdr smb) { return (void )smb + sizeof(smb) + 2 smb->WordCount; //[1] }
[2] cifsdemultiplexthread → standardreceive3 → cifshandlestandard → checkSMB → smbCalcSize
c int checkSMB(char buf, unsigned int totalread, struct TCPServerInfo server) { struct smbhdr smb = (struct smbhdr )buf; u32 rfclen = be32tocpu(smb->smbbuflength); u32 clclen; / calculated length / cifsdbg(FYI, "checkSMB Length: 0x%x, smbbuflength: 0x%x\n", totalread, rfclen);
/ is this frame too small to even get to a BCC? / if (totalread < 2 + sizeof(struct smbhdr)) { ... }
/ otherwise, there is enough to get to the BCC / if (checksmbhdr(smb)) return -EIO; clclen = smbCalcSize(smb);
Other sources
An out-of-bounds read vulnerability was found in smbCalcSize in fs/smb/client/netmisc.c in the Linux Kernel. This issue could allow a local attacker to crash the system or leak internal kernel information.
— Launchpad
Linux Kernel is vulnerable to a denial of service, caused by an out-of-bounds read flaw in the smbCalcSize function in fs/smb/client/netmisc.c. By sending a specially crafted request, a local authenticated attacker could exploit this vulnerability to crash the system or obtain internal kernel information.
— IBM
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the vulnerability ID for this kernel vulnerability?
The vulnerability ID for this kernel vulnerability is CVE-2023-6606.
What is the title of this vulnerability?
The title of this vulnerability is 'Kernel: out-of-bounds read vulnerability in smbcalcsize'.
What is the severity of CVE-2023-6606?
The severity of CVE-2023-6606 is high, with a CVSS score of 7.1.
Where can I find more information about this vulnerability?
You can find more information about this vulnerability at the following references: [Red Hat Security Advisory](https://access.redhat.com/security/cve/CVE-2023-6606), [Kernel Bugzilla](https://bugzilla.kernel.org/show_bug.cgi?id=218218), [Red Hat Bugzilla](https://bugzilla.redhat.com/show_bug.cgi?id=2253611).
How can this vulnerability impact my system?
This vulnerability can allow a local attacker to crash the system or leak internal kernel information.