Blame SOURCES/e2fsprogs-1.44.6-debugfs-fix-printing-of-xattrs-with-ea_in_inode-valu.patch
|
|
a2a4bc |
From 563d63dbf762c41f908b5e10deb1b115def93bcc Mon Sep 17 00:00:00 2001
|
|
|
a2a4bc |
From: Theodore Ts'o <tytso@mit.edu>
|
|
|
a2a4bc |
Date: Tue, 26 Mar 2019 09:36:53 -0400
|
|
|
a2a4bc |
Subject: [PATCH 4/4] debugfs: fix printing of xattrs with ea_in_inode values
|
|
|
a2a4bc |
|
|
|
a2a4bc |
Due to a missing "else" debugfs was printing (garbage) from the xattr
|
|
|
a2a4bc |
buffer which could potentially overrun the end of the buffer.
|
|
|
a2a4bc |
|
|
|
a2a4bc |
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
a2a4bc |
---
|
|
|
a2a4bc |
debugfs/xattrs.c | 2 +-
|
|
|
a2a4bc |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
a2a4bc |
|
|
|
a2a4bc |
diff --git a/debugfs/xattrs.c b/debugfs/xattrs.c
|
|
|
a2a4bc |
index c29761ec..dde9af2f 100644
|
|
|
a2a4bc |
--- a/debugfs/xattrs.c
|
|
|
a2a4bc |
+++ b/debugfs/xattrs.c
|
|
|
a2a4bc |
@@ -448,7 +448,7 @@ static void dump_xattr_raw_entries(FILE *f, unsigned char *buf,
|
|
|
a2a4bc |
else if (ent.e_value_offs >= len ||
|
|
|
a2a4bc |
(vstart + ent.e_value_size) > len)
|
|
|
a2a4bc |
fprintf(f, "<runs off end>");
|
|
|
a2a4bc |
- if (is_mostly_printable((char *)(buf + vstart),
|
|
|
a2a4bc |
+ else if (is_mostly_printable((char *)(buf + vstart),
|
|
|
a2a4bc |
ent.e_value_size))
|
|
|
a2a4bc |
safe_print(f, (char *)(buf + vstart),
|
|
|
a2a4bc |
ent.e_value_size);
|
|
|
a2a4bc |
--
|
|
|
a2a4bc |
2.20.1
|
|
|
a2a4bc |
|