lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220821180400.8198-2-fmdefrancesco@gmail.com>
Date:   Sun, 21 Aug 2022 20:03:58 +0200
From:   "Fabio M. De Francesco" <fmdefrancesco@...il.com>
To:     "Matthew Wilcox (Oracle)" <willy@...radead.org>,
        Ira Weiny <ira.weiny@...el.com>,
        Jeff Layton <jlayton@...nel.org>,
        Damien Le Moal <damien.lemoal@...nsource.wdc.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Christian Brauner <brauner@...nel.org>,
        Arnd Bergmann <arnd@...db.de>, Jens Axboe <axboe@...nel.dk>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        Chaitanya Kulkarni <kch@...dia.com>,
        Kees Cook <keescook@...omium.org>,
        Muchun Song <songmuchun@...edance.com>,
        Roman Gushchin <roman.gushchin@...ux.dev>,
        "Theodore Ts'o" <tytso@....edu>, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     "Fabio M. De Francesco" <fmdefrancesco@...il.com>,
        Viacheslav Dubeyko <slava@...eyko.com>
Subject: [RESEND PATCH 1/3] hfs: Unmap the page in the "fail_page" label

Several paths within hfs_btree_open() jump to the "fail_page" label
where put_page() is called while the page is still mapped.

Call kunmap() to unmap the page soon before put_page().

Reviewed-by: Ira Weiny <ira.weiny@...el.com>
Reviewed-by: Viacheslav Dubeyko <slava@...eyko.com>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@...il.com>
---
 fs/hfs/btree.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/hfs/btree.c b/fs/hfs/btree.c
index 19017d296173..56c6782436e9 100644
--- a/fs/hfs/btree.c
+++ b/fs/hfs/btree.c
@@ -124,6 +124,7 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id, btree_keycmp ke
 	return tree;
 
 fail_page:
+	kunmap(page);
 	put_page(page);
 free_inode:
 	tree->inode->i_mapping->a_ops = &hfs_aops;
-- 
2.37.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ