mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 04:04:06 +00:00
overlayfs fixes for 6.2-rc6
-----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSQHSd0lITzzeNWNm3h3BK/laaZPAUCY9PrPQAKCRDh3BK/laaZ PKk5AP9UUlwGP2XIuCY7hMWvsZKe1FpAXyXzG3jrEmRyBmOEFQD/RMRItvlj330O ntPw7luRC4Us4TO/xc3OqVE0UUnwqQw= =sqlV -----END PGP SIGNATURE----- Merge tag 'ovl-fixes-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs fixes from Miklos Szeredi: "Fix two bugs, a recent one introduced in the last cycle, and an older one from v5.11" * tag 'ovl-fixes-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: fail on invalid uid/gid mapping at copy up ovl: fix tmpfile leak
This commit is contained in:
commit
0acffb235f
1 changed files with 5 additions and 1 deletions
|
@ -792,7 +792,7 @@ static int ovl_copy_up_tmpfile(struct ovl_copy_up_ctx *c)
|
|||
if (!c->metacopy && c->stat.size) {
|
||||
err = ovl_copy_up_file(ofs, c->dentry, tmpfile, c->stat.size);
|
||||
if (err)
|
||||
return err;
|
||||
goto out_fput;
|
||||
}
|
||||
|
||||
err = ovl_copy_up_metadata(c, temp);
|
||||
|
@ -1011,6 +1011,10 @@ static int ovl_copy_up_one(struct dentry *parent, struct dentry *dentry,
|
|||
if (err)
|
||||
return err;
|
||||
|
||||
if (!kuid_has_mapping(current_user_ns(), ctx.stat.uid) ||
|
||||
!kgid_has_mapping(current_user_ns(), ctx.stat.gid))
|
||||
return -EOVERFLOW;
|
||||
|
||||
ctx.metacopy = ovl_need_meta_copy_up(dentry, ctx.stat.mode, flags);
|
||||
|
||||
if (parent) {
|
||||
|
|
Loading…
Add table
Reference in a new issue