7.1
CWE
125
EPSS
0.042%
Advisory Published
CVE Published
Updated

CVE-2023-6606: Kernel: out-of-bounds read vulnerability in smbcalcsize

First published: Fri Dec 08 2023(Updated: )

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; <a href="https://bugzilla.kernel.org/show_bug.cgi?id=218218">https://bugzilla.kernel.org/show_bug.cgi?id=218218</a> [1] Retrieve WordCount and add offset*2 to the data part of smb [2] Retrieve a 16-byte value from the calculated pointer ```c unsigned int smbCalcSize(void *buf) { struct smb_hdr *ptr = buf; return (sizeof(struct smb_hdr) + (2 * ptr-&gt;WordCount) + 2 /* size of the bcc field */ + get_bcc(ptr)); } ... static inline __u16 get_bcc(struct smb_hdr *hdr) { __le16 *bc_ptr = (__le16 *)BCC(hdr); return get_unaligned_le16(bc_ptr);//[2] } ... static inline void * BCC(struct smb_hdr *smb) { return (void *)smb + sizeof(*smb) + 2 * smb-&gt;WordCount; //[1] } ``` [2] cifs_demultiplex_thread → standard_receive3 → cifs_handle_standard → checkSMB → smbCalcSize ```c int checkSMB(char *buf, unsigned int total_read, struct TCP_Server_Info *server) { struct smb_hdr *smb = (struct smb_hdr *)buf; __u32 rfclen = be32_to_cpu(smb-&gt;smb_buf_length); __u32 clc_len; /* calculated length */ cifs_dbg(FYI, "checkSMB Length: 0x%x, smb_buf_length: 0x%x\n", total_read, rfclen); /* is this frame too small to even get to a BCC? */ if (total_read &lt; 2 + sizeof(struct smb_hdr)) { ... } /* otherwise, there is enough to get to the BCC */ if (check_smb_hdr(smb)) return -EIO; clc_len = smbCalcSize(smb);

Credit: secalert@redhat.com secalert@redhat.com

Affected SoftwareAffected VersionHow to fix
Linux Linux kernel
Redhat Enterprise Linux=8.0
Redhat Enterprise Linux=9.0
ubuntu/linux<4.15.0-221.232
4.15.0-221.232
ubuntu/linux<5.4.0-170.188
5.4.0-170.188
ubuntu/linux<5.15.0-92.102
5.15.0-92.102
ubuntu/linux<6.5.0-15.15
6.5.0-15.15
ubuntu/linux<4.4.0-250.284
4.4.0-250.284
ubuntu/linux-aws<4.15.0-1164.177
4.15.0-1164.177
ubuntu/linux-aws<5.4.0-1117.127
5.4.0-1117.127
ubuntu/linux-aws<5.15.0-1052.57
5.15.0-1052.57
ubuntu/linux-aws<6.5.0-1012.12
6.5.0-1012.12
ubuntu/linux-aws<4.4.0-1127.133
4.4.0-1127.133
ubuntu/linux-aws<4.4.0-1165.180
4.4.0-1165.180
ubuntu/linux-aws-5.15<5.15.0-1052.57~20.04.1
5.15.0-1052.57~20.04.1
ubuntu/linux-aws-5.4<5.4.0-1117.127~18.04.1
5.4.0-1117.127~18.04.1
ubuntu/linux-aws-6.2<6.2.0-1018.18~22.04.1
6.2.0-1018.18~22.04.1
ubuntu/linux-aws-hwe<4.15.0-1164.177~16.04.1
4.15.0-1164.177~16.04.1
ubuntu/linux-azure<5.4.0-1122.129
5.4.0-1122.129
ubuntu/linux-azure<5.15.0-1054.62
5.15.0-1054.62
ubuntu/linux-azure<6.5.0-1011.11
6.5.0-1011.11
ubuntu/linux-azure<4.15.0-1173.188~14.04.1
4.15.0-1173.188~14.04.1
ubuntu/linux-azure<4.15.0-1173.188~16.04.1
4.15.0-1173.188~16.04.1
ubuntu/linux-azure-4.15<4.15.0-1173.188
4.15.0-1173.188
ubuntu/linux-azure-5.15<5.15.0-1054.62~20.04.1
5.15.0-1054.62~20.04.1
ubuntu/linux-azure-5.4<5.4.0-1122.129~18.04.1
5.4.0-1122.129~18.04.1
ubuntu/linux-azure-6.2<6.2.0-1019.19~22.04.1
6.2.0-1019.19~22.04.1
ubuntu/linux-azure-fde<5.15.0-1054.62.1
5.15.0-1054.62.1
ubuntu/linux-azure-fde-5.15<5.15.0-1054.62~20.04.1.1
5.15.0-1054.62~20.04.1.1
ubuntu/linux-azure-fde-6.2<6.2.0-1019.19~22.04.1.1
6.2.0-1019.19~22.04.1.1
ubuntu/linux-bluefield<5.4.0-1077.83
5.4.0-1077.83
ubuntu/linux-gcp<5.4.0-1121.130
5.4.0-1121.130
ubuntu/linux-gcp<5.15.0-1049.57
5.15.0-1049.57
ubuntu/linux-gcp<6.5.0-1011.11
6.5.0-1011.11
ubuntu/linux-gcp<4.15.0-1158.175~16.04.1
4.15.0-1158.175~16.04.1
ubuntu/linux-gcp-4.15<4.15.0-1158.175
4.15.0-1158.175
ubuntu/linux-gcp-5.15<5.15.0-1049.57~20.04.1
5.15.0-1049.57~20.04.1
ubuntu/linux-gcp-5.4<5.4.0-1121.130~18.04.1
5.4.0-1121.130~18.04.1
ubuntu/linux-gcp-6.2<6.2.0-1021.23~22.04.1
6.2.0-1021.23~22.04.1
ubuntu/linux-gke<5.15.0-1049.54
5.15.0-1049.54
ubuntu/linux-gkeop<5.4.0-1084.88
5.4.0-1084.88
ubuntu/linux-gkeop<5.15.0-1035.41
5.15.0-1035.41
ubuntu/linux-gkeop-5.15<5.15.0-1035.41~20.04.1
5.15.0-1035.41~20.04.1
ubuntu/linux-hwe<4.15.0-221.232~16.04.1
4.15.0-221.232~16.04.1
ubuntu/linux-hwe-5.15<5.15.0-92.102~20.04.1
5.15.0-92.102~20.04.1
ubuntu/linux-hwe-5.4<5.4.0-170.188~18.04.1
5.4.0-170.188~18.04.1
ubuntu/linux-hwe-6.5<6.5.0-15.15~22.04.1
6.5.0-15.15~22.04.1
ubuntu/linux-ibm<5.4.0-1064.69
5.4.0-1064.69
ubuntu/linux-ibm<5.15.0-1045.48
5.15.0-1045.48
ubuntu/linux-ibm-5.15<5.15.0-1045.48~20.04.1
5.15.0-1045.48~20.04.1
ubuntu/linux-ibm-5.4<5.4.0-1064.69~18.04.1
5.4.0-1064.69~18.04.1
ubuntu/linux-intel-iotg<5.15.0-1047.53
5.15.0-1047.53
ubuntu/linux-intel-iotg-5.15<5.15.0-1048.54~20.04.1
5.15.0-1048.54~20.04.1
ubuntu/linux-iot<5.4.0-1029.30
5.4.0-1029.30
ubuntu/linux-kvm<4.15.0-1148.153
4.15.0-1148.153
ubuntu/linux-kvm<5.4.0-1105.112
5.4.0-1105.112
ubuntu/linux-kvm<5.15.0-1049.54
5.15.0-1049.54
ubuntu/linux-kvm<4.4.0-1128.138
4.4.0-1128.138
ubuntu/linux-laptop<6.5.0-1008.11
6.5.0-1008.11
ubuntu/linux-lowlatency<6.5.0-15.15.1
6.5.0-15.15.1
ubuntu/linux-lowlatency-hwe-5.15<5.15.0-92.102~20.04.1
5.15.0-92.102~20.04.1
ubuntu/linux-lowlatency-hwe-6.5<6.5.0-15.15.1.1~22.04.1
6.5.0-15.15.1.1~22.04.1
ubuntu/linux-lts-xenial<4.4.0-250.284~14.04.1
4.4.0-250.284~14.04.1
ubuntu/linux-nvidia<5.15.0-1043.43
5.15.0-1043.43
ubuntu/linux-nvidia-6.2<6.2.0-1015.15
6.2.0-1015.15
ubuntu/linux-oem-6.1<6.1.0-1029.29
6.1.0-1029.29
ubuntu/linux-oem-6.5<6.5.0-1013.14
6.5.0-1013.14
ubuntu/linux-oracle<4.15.0-1127.138
4.15.0-1127.138
ubuntu/linux-oracle<5.4.0-1116.125
5.4.0-1116.125
ubuntu/linux-oracle<5.15.0-1050.56
5.15.0-1050.56
ubuntu/linux-oracle<6.5.0-1014.14
6.5.0-1014.14
ubuntu/linux-oracle<4.15.0-1127.138~16.04.1
4.15.0-1127.138~16.04.1
ubuntu/linux-oracle-5.15<5.15.0-1050.56~20.04.1
5.15.0-1050.56~20.04.1
ubuntu/linux-oracle-5.4<5.4.0-1116.125~18.04.1
5.4.0-1116.125~18.04.1
ubuntu/linux-raspi<5.4.0-1101.113
5.4.0-1101.113
ubuntu/linux-raspi<5.15.0-1045.48
5.15.0-1045.48
ubuntu/linux-raspi<6.5.0-1009.12
6.5.0-1009.12
ubuntu/linux-raspi-5.4<5.4.0-1101.113~18.04.1
5.4.0-1101.113~18.04.1
ubuntu/linux-riscv<6.5.0-15.15.1
6.5.0-15.15.1
ubuntu/linux-riscv-5.15<5.15.0-1048.52~20.04.1
5.15.0-1048.52~20.04.1
ubuntu/linux-starfive<6.5.0-1006.7
6.5.0-1006.7
ubuntu/linux-xilinx-zynqmp<5.4.0-1036.40
5.4.0-1036.40
ubuntu/linux-xilinx-zynqmp<5.15.0-1027.31
5.15.0-1027.31
debian/linux<=4.19.249-2<=5.10.205-2
4.19.304-1
5.10.209-2
6.1.76-1
6.1.85-1
6.6.15-2
6.7.12-1

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Reference Links

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203