Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:Update
mdadm.5365
0197-super1-Clear-memory-allocated-for-superblo...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0197-super1-Clear-memory-allocated-for-superblock-bitmap-.patch of Package mdadm.5365
From 1dcee1c9cbcf9592275914706b76b1931490092c Mon Sep 17 00:00:00 2001 From: Jes Sorensen <Jes.Sorensen@redhat.com> Date: Wed, 6 Apr 2016 16:13:59 -0400 Subject: [PATCH 263/359] super1: Clear memory allocated for superblock + bitmap before use References: bsc#1081910 load_super1() did not clear memory allocated for the superblock + bitmap. This causes issues if the superblock does not contain a bitmap as later checks of bitmap features would rely on the bits being cleared. This bug has been around for a long time, but was only exposed in mdadm-3.4 with the introduction of the clustering code. Reported-by: Jan Stodola <jstodola@redhat.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Coly Li <colyli@suse.de> --- super1.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/super1.c b/super1.c index d6f3c93..8d5543f 100644 --- a/super1.c +++ b/super1.c @@ -2016,6 +2016,8 @@ static int load_super1(struct supertype *st, int fd, char *devname) return 1; } + memset(super, 0, SUPER1_SIZE); + if (aread(&afd, super, MAX_SB_SIZE) != MAX_SB_SIZE) { if (devname) pr_err("Cannot read superblock on %s\n", -- 2.16.1
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