[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 09/21: ext2fs: Fix potential block leak.
From: |
Samuel Thibault |
Subject: |
[hurd] 09/21: ext2fs: Fix potential block leak. |
Date: |
Sat, 04 Mar 2017 21:10:58 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 109f842edae5297ad9c9ec3c8d88e2c74c9b0ca0
Author: Justus Winter <address@hidden>
Date: Sat Oct 8 18:34:26 2016 +0200
ext2fs: Fix potential block leak.
* ext2fs/xattr.c (ext2_set_xattr): We allocate a block, but only
register it as the inodes acl block on success. Make sure to
deallocate the block otherwise.
---
ext2fs/xattr.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ext2fs/xattr.c b/ext2fs/xattr.c
index c5771fe..1366884 100644
--- a/ext2fs/xattr.c
+++ b/ext2fs/xattr.c
@@ -867,6 +867,10 @@ ext2_set_xattr (struct node *np, const char *name, const
char *value,
cleanup:
if (block)
disk_cache_block_deref (block);
+ if (ei->i_file_acl == 0 && blkno != 0)
+ /* We allocated a block, but for some reason we did not register
+ it. */
+ ext2_free_blocks (blkno, 1);
dino_deref (ei);
return err;
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch upstream updated (cef4f1d -> db7dd39), Samuel Thibault, 2017/03/04
- [hurd] 03/21: ext2fs: Fix typo., Samuel Thibault, 2017/03/04
- [hurd] 06/21: ext2fs: Do not read translator record on Linux filesystems., Samuel Thibault, 2017/03/04
- [hurd] 10/21: ext2fs: fix block reference, Samuel Thibault, 2017/03/04
- [hurd] 16/21: libshouldbeinlibc: Fix NDEBUG build., Samuel Thibault, 2017/03/04
- [hurd] 08/21: ext2fs: Fix block allocation., Samuel Thibault, 2017/03/04
- [hurd] 12/21: ext2fs: fix extended attribute retrieval, Samuel Thibault, 2017/03/04
- [hurd] 11/21: ext2fs: minor cleanup, Samuel Thibault, 2017/03/04
- [hurd] 15/21: Fix mig URL, Samuel Thibault, 2017/03/04
- [hurd] 19/21: boot: Fix failing device lookups in unprivileged mode., Samuel Thibault, 2017/03/04
- [hurd] 09/21: ext2fs: Fix potential block leak.,
Samuel Thibault <=
- [hurd] 14/21: Merge remote-tracking branch 'remotes/darnassus/ext2fs-xattrs', Samuel Thibault, 2017/03/04
- [hurd] 05/21: ext2fs: Fix block leak in xattr code., Samuel Thibault, 2017/03/04
- [hurd] 21/21: Avoid ports_interrupt_rpcs cancel itself, Samuel Thibault, 2017/03/04
- [hurd] 07/21: ext2fs: Require users to opt-in for xattr-based translator records., Samuel Thibault, 2017/03/04
- [hurd] 20/21: boot: Make the halt message nicer., Samuel Thibault, 2017/03/04
- [hurd] 13/21: ext2fs: downgrade warnings about old translator records to debug messages, Samuel Thibault, 2017/03/04
- [hurd] 18/21: boot: Add a verbose option., Samuel Thibault, 2017/03/04
- [hurd] 04/21: ext2fs: Use correct type for sizes., Samuel Thibault, 2017/03/04
- [hurd] 02/21: ext2fs: Use xattr to store passive translator, Samuel Thibault, 2017/03/04
- [hurd] 17/21: boot: Cleanup Makefile., Samuel Thibault, 2017/03/04