diff options
| author | Fredric Cover <fredric.cover.lkernel@gmail.com> | 2026-11-07 02:02:57 +0000 |
|---|---|---|
| committer | Paulo Alcantara <pc@manguebit.org> | 2026-11-08 15:45:22 -0300 |
| commit | 92509ce64ffff02d05fe9f3c82b889e1cc500076 (patch) | |
| tree | 3e072ae18456aab0ce45eef821d183cda2d55f0b /tools/perf/scripts/python/bin | |
| parent | 86aacc2f3f6ba18e1d87feee24f37c94b3ce863a (diff) | |
smb: client: fix double conversion of DFS path in setup_dfs_ref()
setup_dfs_ref() converts the path from the mount charset to the DFS
cache charset (utf8) via dfs_get_path(), and then passes that already
converted string to dfs_get_referral(). dfs_cache_find() converts its
input again, assuming it is still in the mount charset.
When the mount charset is not utf8 (iocharset=iso8859-1, or a kernel
built with a non-utf8 CONFIG_NLS_DEFAULT) and the DFS path contains
non-ASCII characters, the utf8 bytes are interpreted as mount-charset
characters and encoded a second time. For example, "é" is sent as
c3 83 c2 a9 instead of c3 a9. The server then fails the second-level
referral with STATUS_OBJECT_PATH_NOT_FOUND and the mount fails with
-ENOENT, even though the path exists.
Pass the unconverted path to dfs_get_referral() so that it is converted
exactly once.
Such mounts now get past the second-level referral and reach
dfs_parse_target_referral(), which is why this change depends on
"smb: client: fix out-of-bounds read in dfs_parse_target_referral()".
Tested with a Samba DFS root containing a link named "café", mounted
with iocharset=iso8859-1 and the single Latin-1 byte 0xe9 in the path:
before, the mount failed with -ENOENT; with both patches applied, it
succeeds.
Signed-off-by: Fredric Cover <fredric.cover.lkernel@gmail.com>
Cc: stable@vger.kernel.org
Reviewed-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Paulo Alcantara <pc@manguebit.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
