{"id":"CVE-2023-52531","summary":"wifi: iwlwifi: mvm: Fix a memory corruption issue","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nwifi: iwlwifi: mvm: Fix a memory corruption issue\n\nA few lines above, space is kzalloc()'ed for:\n\tsizeof(struct iwl_nvm_data) +\n\tsizeof(struct ieee80211_channel) +\n\tsizeof(struct ieee80211_rate)\n\n'mvm-\u003envm_data' is a 'struct iwl_nvm_data', so it is fine.\n\nAt the end of this structure, there is the 'channels' flex array.\nEach element is of type 'struct ieee80211_channel'.\nSo only 1 element is allocated in this array.\n\nWhen doing:\n  mvm-\u003envm_data-\u003ebands[0].channels = mvm-\u003envm_data-\u003echannels;\nWe point at the first element of the 'channels' flex array.\nSo this is fine.\n\nHowever, when doing:\n  mvm-\u003envm_data-\u003ebands[0].bitrates =\n\t\t\t(void *)((u8 *)mvm-\u003envm_data-\u003echannels + 1);\nbecause of the \"(u8 *)\" cast, we add only 1 to the address of the beginning\nof the flex array.\n\nIt is likely that we want point at the 'struct ieee80211_rate' allocated\njust after.\n\nRemove the spurious casting so that the pointer arithmetic works as\nexpected.","modified":"2026-04-02T09:43:00.121507Z","published":"2024-03-02T21:52:35.664Z","related":["SUSE-SU-2024:0855-1","SUSE-SU-2024:0856-1","SUSE-SU-2024:0857-1","SUSE-SU-2024:0900-1","SUSE-SU-2024:0900-2","SUSE-SU-2024:0925-1","SUSE-SU-2024:0926-1","SUSE-SU-2024:0975-1","SUSE-SU-2024:0976-1","SUSE-SU-2024:0977-1","SUSE-SU-2024:1466-1","SUSE-SU-2024:1480-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/52xxx/CVE-2023-52531.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/6b3223449c959a8be94a1f042288059e40fcccb0"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7c8faa31080342aec4903c9acb20caf82fcca1ef"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8ba438ef3cacc4808a63ed0ce24d4f0942cfe55d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f06cdd8d4ba5252986f51f80cc30263636397128"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/52xxx/CVE-2023-52531.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-52531"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"8ca151b568b67a7b72dcfc6ee6ea7c107ddd795c"},{"fixed":"7c8faa31080342aec4903c9acb20caf82fcca1ef"},{"fixed":"6b3223449c959a8be94a1f042288059e40fcccb0"},{"fixed":"f06cdd8d4ba5252986f51f80cc30263636397128"},{"fixed":"8ba438ef3cacc4808a63ed0ce24d4f0942cfe55d"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-52531.json"}}],"schema_version":"1.7.5"}