diff options
| author | Zihan Xi <zihanx@nebusec.ai> | 2026-09-16 15:29:25 +0000 |
|---|---|---|
| committer | Paulo Alcantara <pc@manguebit.org> | 2026-09-21 21:40:17 -0300 |
| commit | fa2e9900dd2a3f5a1e7ef5a8c5e8d435feedbfcc (patch) | |
| tree | f65eed844ce32ccefe840661e3e54b225696e783 /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | 67f4c1c6a1b51e203d986779299824d1c2c590a6 (diff) | |
| download | linux-next-fa2e9900dd2a3f5a1e7ef5a8c5e8d435feedbfcc.tar.gz linux-next-fa2e9900dd2a3f5a1e7ef5a8c5e8d435feedbfcc.zip | |
smb: client: validate POSIX create context length
parse_posix_ctxt() reads the fixed nlink, reparse_tag, and mode fields
before checking that the POSIX create context contains them. A short
context can pass the generic checks and still make these fixed-width
reads run past its declared data.
The current in-tree smb2_open_file() path passes a NULL posix pointer,
so this handler is not reached on the ordinary open path. Still require
the POSIX data to cover all three fields before reading them because the
helper performs those unguarded reads. Keep the existing soft-failure
behavior so malformed optional metadata does not fail the open.
Fixes: 69dda3059e7a ("cifs: add SMB2_open() arg to return POSIX data")
Cc: stable@vger.kernel.org
Reported-by: Vega <vega@nebusec.ai>
Assisted-by: LLM
Co-developed-by: Luxing Yin <root@tr0jan.top>
Signed-off-by: Luxing Yin <root@tr0jan.top>
Signed-off-by: Zihan Xi <zihanx@nebusec.ai>
Tested-by: Frank Sorenson <sorenson@redhat.com>
Signed-off-by: Paulo Alcantara <pc@manguebit.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions
