| Summary: | zfs promote corrupted df/mount output of device names of UFS filesystems | ||
|---|---|---|---|
| Product: | Base System | Reporter: | ota |
| Component: | kern | Assignee: | freebsd-fs (Nobody) <fs> |
| Status: | New --- | ||
| Severity: | Affects Only Me | CC: | avg, martin |
| Priority: | --- | ||
| Version: | CURRENT | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
ota
2019-08-12 08:55:41 UTC
The code leading up to https://svnweb.freebsd.org/base/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c?view=markup#l3128 looks suspicious to me. Unless I'm misreading it, oldname is allocated but never filled with a name, so if the first byte is null then it will rename all mounts whose f_mntfromname starts with /. (In reply to martin from comment #1) Good catch! Comparing dsl_dataset_promote_sync to dsl_dataset_rename_snapshot_sync_impl, it seems that the former is missing some snprintf-s. |