# CVE-2024-57895: ksmbd: set ATTR\_CTIME flags when setting mtime

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.1
- **CVSS:** 7.1 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: Low; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.72% (percentile 50, 2026-11-26)
- **Published:** 2025-01-15T13:05:47.632Z
- **Modified:** 2026-08-05T11:46:48.731Z

## Who should check

- Anyone running Linux \>= 0626e6641f6b467447c81dd7678a69c66f7746cf, \< c7ab587bd33ce45e2aa6b6d2d36be7ef0bd16614; \>= 0626e6641f6b467447c81dd7678a69c66f7746cf, \< 1d7ee876b8b96efc14e177a7fe8d45ac25d68849; \>= 0626e6641f6b467447c81dd7678a69c66f7746cf, \< 52cefcff6a4a814f4f8e357422fcfb71fd2ebf75; \>= 0626e6641f6b467447c81dd7678a69c66f7746cf, \< 21e46a79bbe6c4e1aa73b3ed998130f2ff07b128
- Anyone running Linux 5.15

## Description

In the Linux kernel, the following vulnerability has been resolved:

ksmbd: set ATTR\_CTIME flags when setting mtime

David reported that the new warning from setattr\_copy\_mgtime is coming
like the following.

\[  113.215316\] ------------\[ cut here \]------------
\[  113.215974\] WARNING: CPU: 1 PID: 31 at fs/attr.c:300 setattr\_copy+0x1ee/0x200
\[  113.219192\] CPU: 1 UID: 0 PID: 31 Comm: kworker/1:1 Not tainted 6.13.0-rc1+ \#234
\[  113.220127\] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.2-3-gd478f380-rebuilt.opensuse.org 04/01/2014
\[  113.221530\] Workqueue: ksmbd-io handle\_ksmbd\_work \[ksmbd\]
\[  113.222220\] RIP: 0010:setattr\_copy+0x1ee/0x200
\[  113.222833\] Code: 24 28 49 8b 44 24 30 48 89 53 58 89 43 6c 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc 48 89 df e8 77 d6 ff ff e9 cd fe ff ff \<0f\> 0b e9 be fe ff ff 66 0
\[  113.225110\] RSP: 0018:ffffaf218010fb68 EFLAGS: 00010202
\[  113.225765\] RAX: 0000000000000120 RBX: ffffa446815f8568 RCX: 0000000000000003
\[  113.226667\] RDX: ffffaf218010fd38 RSI: ffffa446815f8568 RDI: ffffffff94eb03a0
\[  113.227531\] RBP: ffffaf218010fb90 R08: 0000001a251e217d R09: 00000000675259fa
\[  113.228426\] R10: 0000000002ba8a6d R11: ffffa4468196c7a8 R12: ffffaf218010fd38
\[  113.229304\] R13: 0000000000000120 R14: ffffffff94eb03a0 R15: 0000000000000000
\[  113.230210\] FS:  0000000000000000(0000) GS:ffffa44739d00000(0000) knlGS:0000000000000000
\[  113.231215\] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
\[  113.232055\] CR2: 00007efe0053d27e CR3: 000000000331a000 CR4: 00000000000006b0
\[  113.232926\] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
\[  113.233812\] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
\[  113.234797\] Call Trace:
\[  113.235116\]  \<TASK\>
\[  113.235393\]  ? \_\_warn+0x73/0xd0
\[  113.235802\]  ? setattr\_copy+0x1ee/0x200
\[  113.236299\]  ? report\_bug+0xf3/0x1e0
\[  113.236757\]  ? handle\_bug+0x4d/0x90
\[  113.237202\]  ? exc\_invalid\_op+0x13/0x60
\[  113.237689\]  ? asm\_exc\_invalid\_op+0x16/0x20
\[  113.238185\]  ? setattr\_copy+0x1ee/0x200
\[  113.238692\]  btrfs\_setattr+0x80/0x820 \[btrfs\]
\[  113.239285\]  ? get\_stack\_info\_noinstr+0x12/0xf0
\[  113.239857\]  ? \_\_module\_address+0x22/0xa0
\[  113.240368\]  ? handle\_ksmbd\_work+0x6e/0x460 \[ksmbd\]
\[  113.240993\]  ? \_\_module\_text\_address+0x9/0x50
\[  113.241545\]  ? \_\_module\_address+0x22/0xa0
\[  113.242033\]  ? unwind\_next\_frame+0x10e/0x920
\[  113.242600\]  ? \_\_pfx\_stack\_trace\_consume\_entry+0x10/0x10
\[  113.243268\]  notify\_change+0x2c2/0x4e0
\[  113.243746\]  ? stack\_depot\_save\_flags+0x27/0x730
\[  113.244339\]  ? set\_file\_basic\_info+0x130/0x2b0 \[ksmbd\]
\[  113.244993\]  set\_file\_basic\_info+0x130/0x2b0 \[ksmbd\]
\[  113.245613\]  ? process\_scheduled\_works+0xbe/0x310
\[  113.246181\]  ? worker\_thread+0x100/0x240
\[  113.246696\]  ? kthread+0xc8/0x100
\[  113.247126\]  ? ret\_from\_fork+0x2b/0x40
\[  113.247606\]  ? ret\_from\_fork\_asm+0x1a/0x30
\[  113.248132\]  smb2\_set\_info+0x63f/0xa70 \[ksmbd\]

ksmbd is trying to set the atime and mtime via notify\_change without also
setting the ctime. so This patch add ATTR\_CTIME flags when setting mtime
to avoid a warning.

## Affected and fixed versions

- Linux: \>= 0626e6641f6b467447c81dd7678a69c66f7746cf, \< c7ab587bd33ce45e2aa6b6d2d36be7ef0bd16614; \>= 0626e6641f6b467447c81dd7678a69c66f7746cf, \< 1d7ee876b8b96efc14e177a7fe8d45ac25d68849; \>= 0626e6641f6b467447c81dd7678a69c66f7746cf, \< 52cefcff6a4a814f4f8e357422fcfb71fd2ebf75; \>= 0626e6641f6b467447c81dd7678a69c66f7746cf, \< 21e46a79bbe6c4e1aa73b3ed998130f2ff07b128 (cvelist)
- Linux: 5.15 (cvelist)

## Mitigation

- Upgrade Linux to 21e46a79bbe6c4e1aa73b3ed998130f2ff07b128 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-57895. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-57895.md
Affected: Linux >= 0626e6641f6b467447c81dd7678a69c66f7746cf, < c7ab587bd33ce45e2aa6b6d2d36be7ef0bd16614; >= 0626e6641f6b467447c81dd7678a69c66f7746cf, < 1d7ee876b8b96efc14e177a7fe8d45ac25d68849; >= 0626e6641f6b467447c81dd7678a69c66f7746cf, < 52cefcff6a4a814f4f8e357422fcfb71fd2ebf75; >= 0626e6641f6b467447c81dd…
Fixed in: Linux 1d7ee876b8b96efc14e177a7fe8d45ac25d68849, Linux 52cefcff6a4a814f4f8e357422fcfb71fd2ebf75, Linux 21e46a79bbe6c4e1aa73b3ed998130f2ff07b128

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-57895 being exploited?

There is no confirmed exploitation: CVE-2024-57895 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.72% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-57895?

High: CVSS 7.1 (v3.1, scored by CNA). Remote, login needed.

### Which versions are affected by CVE-2024-57895?

Linux \>= 0626e6641f6b467447c81dd7678a69c66f7746cf, \< c7ab587bd33ce45e2aa6b6d2d36be7ef0bd16614; \>= 0626e6641f6b467447c81dd7678a69c66f7746cf, \< 1d7ee876b8b96efc14e177a7fe8d45ac25d68849; \>= 0626e6641f6b467447c81dd7678a69c66f7746cf, \< 52cefcff6a4a814f4f8e357422fcfb71fd2ebf75; \>= 0626e6641f6b467447c81dd7678a69c66f7746cf, \< 21e46a79bbe6c4e1aa73b3ed998130f2ff07b128; Linux 5.15.

### Is there a fix for CVE-2024-57895?

Yes. Fixed in Linux 1d7ee876b8b96efc14e177a7fe8d45ac25d68849, Linux 52cefcff6a4a814f4f8e357422fcfb71fd2ebf75, Linux 21e46a79bbe6c4e1aa73b3ed998130f2ff07b128. Upgrade Linux to 21e46a79bbe6c4e1aa73b3ed998130f2ff07b128 or later.

### How do I check if I'm affected by CVE-2024-57895?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/c7ab587bd33ce45e2aa6b6d2d36be7ef0bd16614>
- patch: <https://git.kernel.org/stable/c/1d7ee876b8b96efc14e177a7fe8d45ac25d68849>
- patch: <https://git.kernel.org/stable/c/52cefcff6a4a814f4f8e357422fcfb71fd2ebf75>
- patch: <https://git.kernel.org/stable/c/21e46a79bbe6c4e1aa73b3ed998130f2ff07b128>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-57895>

HTML: <https://flawdb.com/CVE-2024-57895> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-57895>
