fs/ntfs3: terminate the cached volume label after UTF-8 conversion
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 82cae269cfa953032fbb8980a7d554d60fb00b17 · < 5cd0707b81cb4589f00aec5c4c1288bd0980d2a4| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
fs/ntfs3: terminate the cached volume label after UTF-8 conversion
ntfs_fill_super() loads the on-disk volume label with utf16s_to_utf8s() and stores the result in sbi->volume.label. The converted label is later exposed through ntfs3_label_show() using %s, but utf16s_to_utf8s() only returns the number of bytes written and does not add a trailing NUL.
If the converted label fills the entire fixed buffer, ntfs3_label_show() can read past the end of sbi->volume.label while looking for a terminator.
Terminate the cached label explicitly after a successful conversion and clamp the exact-full case to the last byte of the buffer.
From the CVE record · Linux
The ntfs3 filesystem driver does not terminate a converted volume label before exposing it as a string. If the label fills its fixed buffer, reading the label can read past the buffer's end. The input does not specify whether exploitation requires authentication or user interaction.
Engineers running Linux kernels with the ntfs3 filesystem driver should check their versions; affected versions were not provided.