Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:GA
xfsprogs.970
0018-metadump-Zero-unused-portions-of-DA_NODE-b...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0018-metadump-Zero-unused-portions-of-DA_NODE-blocks.patch of Package xfsprogs.970
From c83c169e813590d019d1200aa28f461ca275d447 Mon Sep 17 00:00:00 2001 From: Eric Sandeen <sandeen@sandeen.net> Date: Thu, 30 Jul 2015 09:21:08 +1000 Subject: [PATCH 18/20] metadump: Zero unused portions of DA_NODE blocks References: bsc#939367 CVE-2012-2150 Zero out unused portions of interior nodes of DA btrees Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com> Acked-by: Jan Kara <jack@suse.com> --- db/metadump.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/db/metadump.c b/db/metadump.c index 32a2f70369dd..d2935810733b 100644 --- a/db/metadump.c +++ b/db/metadump.c @@ -1483,6 +1483,31 @@ process_single_fsb_objects( if (!obfuscate && !zero_stale_data) goto write; + /* Zero unused part of interior nodes */ + if (zero_stale_data) { + xfs_da_intnode_t *node = iocur_top->data; + int magic = be16_to_cpu(node->hdr.info.magic); + + if (magic == XFS_DA_NODE_MAGIC || + magic == XFS_DA3_NODE_MAGIC) { + struct xfs_da3_icnode_hdr hdr; + int used; + + xfs_da3_node_hdr_from_disk(&hdr, node); + used = xfs_da3_node_hdr_size(node); + + used += hdr.count + * sizeof(struct xfs_da_node_entry); + + if (used < mp->m_sb.sb_blocksize) { + memset((char *)node + used, 0, + mp->m_sb.sb_blocksize - used); + iocur_top->need_crc = 1; + } + } + } + + /* Handle leaf nodes */ dp = iocur_top->data; switch (btype) { case TYP_DIR2: -- 2.1.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor