diff options
| author | Peter Collingbourne <[email protected]> | 2026-05-05 03:38:16 -0700 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-05-11 12:18:56 -0600 |
| commit | d5888d509cc43942ec98d993f2d129f5c8ddc432 (patch) | |
| tree | d986a6207a1a6c4879144915c0880f989c526466 /tests/scripts | |
| parent | 22a285380e35a31d0a882af66278bc1edc1b917e (diff) | |
fs: ubifs: fix bugs involving symlinks in ubifs_findfile
When encountering a symlink pointing to an absolute path, ubifs_findfile
would return the target of the symlink as the result instead of resolving
any following components in the original path. Fix it by following the
same code path that is used for relative paths except that we set the
next inode to the root if we see a leading slash.
The existing code used memcpy and sprintf to copy the symlink target
into a fixed size stack buffer and was therefore vulnerable to buffer
overflows with a sufficiently long symlink target. Fix it by using a
heap buffer for the temporary path during path resolution.
Signed-off-by: Peter Collingbourne <[email protected]>
Fixes: 9d7952e4c636 ("ubifs: Add support for looking up directory and relative symlinks")
Diffstat (limited to 'tests/scripts')
0 files changed, 0 insertions, 0 deletions
