https://github.com/torvalds/linux
Revision 0f89abf56abbd0e1c6e3cef9813e6d9f05383c1e authored by Christian Engelmayer on 20 October 2015, 22:50:06 UTC, committed by Chris Mason on 22 October 2015, 01:10:02 UTC
Commit 8eb934591f8b ("btrfs: check unsupported filters in balance
arguments") adds a jump to exit label out_bargs in case the argument
check fails. At this point in addition to the bargs memory, the
memory for struct btrfs_balance_control has already been allocated.
Ownership of bctl is passed to btrfs_balance() in the good case,
thus the memory is not freed due to the introduced jump. Make sure
that the memory gets freed in any case as necessary. Detected by
Coverity CID 1328378.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
1 parent 0f6925f
History
Tip revision: 0f89abf56abbd0e1c6e3cef9813e6d9f05383c1e authored by Christian Engelmayer on 20 October 2015, 22:50:06 UTC
btrfs: fix possible leak in btrfs_ioctl_balance()
Tip revision: 0f89abf
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 1.2 KB
.mailmap -rw-r--r-- 5.3 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 94.7 KB
Kbuild -rw-r--r-- 2.6 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 313.7 KB
Makefile -rw-r--r-- 53.1 KB
README -rw-r--r-- 18.2 KB
REPORTING-BUGS -rw-r--r-- 7.3 KB

README

back to top