]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
fs/ntfs3: increase CLIENT_REC name field size
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Thu, 19 Mar 2026 13:29:26 +0000 (14:29 +0100)
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Tue, 24 Mar 2026 17:51:17 +0000 (18:51 +0100)
This patch increases the size of the CLIENT_REC name field from 32 utf-16
chars to 64 utf-16 chars. It fixes the buffer overflow problem in
log_replay() reported by Robbert Morris.

Reported-by: <rtm@csail.mit.edu>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
fs/ntfs3/fslog.c

index 272e452761436e495113c64760e4e191ae4d17ed..10dbe9922bf1325ee3062d3b878194a49ca4a461 100644 (file)
@@ -45,10 +45,10 @@ struct CLIENT_REC {
        __le16 seq_num;     // 0x14:
        u8 align[6];        // 0x16:
        __le32 name_bytes;  // 0x1C: In bytes.
-       __le16 name[32];    // 0x20: Name of client.
+       __le16 name[64];    // 0x20: Name of client.
 };
 
-static_assert(sizeof(struct CLIENT_REC) == 0x60);
+static_assert(sizeof(struct CLIENT_REC) == 0xa0);
 
 /* Two copies of these will exist at the beginning of the log file */
 struct RESTART_AREA {