Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1639630
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4.4 01/60] 9p: fix a potential acl leak |
| Date | 2017-05-11 16:50 +0200 |
| Message-ID | <tFXzI-7Av-3@gated-at.bofh.it> (permalink) |
| References | <tFXgl-7ta-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cong Wang <xiyou.wangcong@gmail.com>
commit b5c66bab72a6a65edb15beb60b90d3cb84c5763b upstream.
posix_acl_update_mode() could possibly clear 'acl', if so we leak the
memory pointed by 'acl'. Save this pointer before calling
posix_acl_update_mode() and release the memory if 'acl' really gets
cleared.
Link: http://lkml.kernel.org/r/1486678332-2430-1-git-send-email-xiyou.wangcong@gmail.com
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Reported-by: Mark Salyzyn <salyzyn@android.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Greg Kurz <groug@kaod.org>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Cc: Ron Minnich <rminnich@sandia.gov>
Cc: Latchesar Ionkov <lucho@ionkov.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/9p/acl.c | 2 ++
1 file changed, 2 insertions(+)
--- a/fs/9p/acl.c
+++ b/fs/9p/acl.c
@@ -283,6 +283,7 @@ static int v9fs_xattr_set_acl(const stru
case ACL_TYPE_ACCESS:
if (acl) {
struct iattr iattr;
+ struct posix_acl *old_acl = acl;
retval = posix_acl_update_mode(inode, &iattr.ia_mode, &acl);
if (retval)
@@ -293,6 +294,7 @@ static int v9fs_xattr_set_acl(const stru
* by the mode bits. So don't
* update ACL.
*/
+ posix_acl_release(old_acl);
value = NULL;
size = 0;
}
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4.4 00/60] 4.4.68-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 16:40 +0200
[PATCH 4.4 10/60] power: supply: bq24190_charger: Handle fault before status on interrupt Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 16:40 +0200
[PATCH 4.4 05/60] power: supply: bq24190_charger: Fix irq trigger to IRQF_TRIGGER_FALLING Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 16:40 +0200
[PATCH 4.4 49/60] tcp: do not underestimate skb->truesize in tcp_trim_head() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 16:40 +0200
[PATCH 4.4 11/60] leds: ktd2692: avoid harmless maybe-uninitialized warning Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 16:40 +0200
[PATCH 4.4 45/60] brcmfmac: Make skb header writable before use Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 16:40 +0200
[PATCH 4.4 25/60] usb: host: ohci-exynos: Decrese node refcount on exynos_ehci_get_phy() error paths Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 16:40 +0200
[PATCH 4.4 41/60] scsi: mac_scsi: Fix MAC_SCSI=m option when SCSI=m Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 16:40 +0200
[PATCH 4.4 38/60] USB: serial: sierra: fix bogus alternate-setting assumption Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 16:40 +0200
Re: [PATCH 4.4 38/60] USB: serial: sierra: fix bogus alternate-setting assumption Ben Hutchings <ben.hutchings@codethink.co.uk> - 2017-05-12 13:30 +0200
Re: [PATCH 4.4 38/60] USB: serial: sierra: fix bogus alternate-setting assumption Johan Hovold <johan@kernel.org> - 2017-05-12 14:20 +0200
Re: [PATCH 4.4 38/60] USB: serial: sierra: fix bogus alternate-setting assumption Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-12 15:20 +0200
[PATCH 4.4 40/60] serial: 8250_omap: Fix probe and remove for PM runtime Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 16:40 +0200
[PATCH 4.4 02/60] ARM: 8452/3: PJ4: make coprocessor access sequences buildable in Thumb2 mode Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 16:40 +0200
[PATCH 4.4 19/60] kprobes/x86: Fix kernel panic when certain exception-handling addresses are probed Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 16:40 +0200
[PATCH 4.4 44/60] brcmfmac: Ensure pointer correctly set if skb data location changes Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 16:40 +0200
[PATCH 4.4 47/60] staging: emxx_udc: remove incorrect __init annotations Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 16:40 +0200
[PATCH 4.4 18/60] clk: Make x86/ conditional on CONFIG_COMMON_CLK Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 16:40 +0200
[PATCH 4.4 13/60] mwifiex: debugfs: Fix (sometimes) off-by-1 SSID print Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 16:40 +0200
[PATCH 4.4 55/60] ipv6: initialize route null entry in addrconf_init() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 16:40 +0200
[PATCH 4.4 08/60] power: supply: bq24190_charger: Call power_supply_changed() for relevant component Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 16:40 +0200
[PATCH 4.4 50/60] bpf, arm64: fix jit branch offset related to ldimm64 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 16:40 +0200
[PATCH 4.4 15/60] mwifiex: Avoid skipping WEP key deletion for AP Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 16:50 +0200
[PATCH 4.4 01/60] 9p: fix a potential acl leak Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 16:50 +0200
[PATCH 4.4 14/60] mwifiex: remove redundant dma padding in AMSDU Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 16:50 +0200
Re: [PATCH 4.4 00/60] 4.4.68-stable review Guenter Roeck <linux@roeck-us.net> - 2017-05-11 23:10 +0200
Re: [PATCH 4.4 00/60] 4.4.68-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-12 18:00 +0200
Re: [PATCH 4.4 00/60] 4.4.68-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2017-05-12 17:30 +0200
Re: [PATCH 4.4 00/60] 4.4.68-stable review Guenter Roeck <linux@roeck-us.net> - 2017-05-12 21:50 +0200
csiph-web