Bug 202747
Summary: | sometime kernel crash when kzfree is called in fs/f2fs/xattr.c | ||
---|---|---|---|
Product: | File System | Reporter: | Jiqun Li (jiqun.li) |
Component: | f2fs | Assignee: | Default virtual assignee for f2fs (filesystem_f2fs) |
Status: | RESOLVED CODE_FIX | ||
Severity: | high | CC: | chao |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | f2fs-dev | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Jiqun Li
2019-03-04 13:30:53 UTC
I didn't see many filesystems are using kzfree(), instead, there are many callers come from crypto module, I guess they use the buffer to store ciphertext or crypto key temporarily, so, before freeing those buffer it will be better to clean the data in buffer to avoid confidential data leak. For f2fs, I think there is no such demand, and we just missed to change kzfree to kvfree in below commit: 5222595d093e ("f2fs: use kvmalloc, if kmalloc is failed") The fixing patch has been merged, close this issue. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2a6a7e722e7a78d774ce02b847c5b183a3ff2672 |