Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1419744 > unrolled thread
| Started by | Heinrich Schuchardt <xypron.glpk@gmx.de> |
|---|---|
| First post | 2016-06-10 23:40 +0200 |
| Last post | 2016-06-11 00:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 1/1] apparmor: do not expose kernel stack Heinrich Schuchardt <xypron.glpk@gmx.de> - 2016-06-10 23:40 +0200
Re: [PATCH 1/1] apparmor: do not expose kernel stack John Johansen <john.johansen@canonical.com> - 2016-06-11 00:20 +0200
| From | Heinrich Schuchardt <xypron.glpk@gmx.de> |
|---|---|
| Date | 2016-06-10 23:40 +0200 |
| Subject | [PATCH 1/1] apparmor: do not expose kernel stack |
| Message-ID | <rICjL-28R-7@gated-at.bofh.it> |
Do not copy uninitalized fields th.td_hilen, th.td_data.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
security/apparmor/match.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/security/apparmor/match.c b/security/apparmor/match.c
index 727eb42..1d6dbd8 100644
--- a/security/apparmor/match.c
+++ b/security/apparmor/match.c
@@ -61,7 +61,9 @@ static struct table_header *unpack_table(char *blob, size_t bsize)
table = kvzalloc(tsize);
if (table) {
- *table = th;
+ table->td_id = th.td_id;
+ table->td_flags = th.td_flags;
+ table->td_lolen = th.td_lolen;
if (th.td_flags == YYTD_DATA8)
UNPACK_ARRAY(table->td_data, blob, th.td_lolen,
u8, byte_to_byte);
--
2.1.4
[toc] | [next] | [standalone]
| From | John Johansen <john.johansen@canonical.com> |
|---|---|
| Date | 2016-06-11 00:20 +0200 |
| Message-ID | <rICWu-2P1-27@gated-at.bofh.it> |
| In reply to | #1419744 |
On 06/10/2016 02:34 PM, Heinrich Schuchardt wrote:
> Do not copy uninitalized fields th.td_hilen, th.td_data.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: John Johansen <john.johansen@canonical.com>
I have a queue of patches I need to push this weekend so I
will suck this one in and send it up with the rest
> ---
> security/apparmor/match.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/security/apparmor/match.c b/security/apparmor/match.c
> index 727eb42..1d6dbd8 100644
> --- a/security/apparmor/match.c
> +++ b/security/apparmor/match.c
> @@ -61,7 +61,9 @@ static struct table_header *unpack_table(char *blob, size_t bsize)
>
> table = kvzalloc(tsize);
> if (table) {
> - *table = th;
> + table->td_id = th.td_id;
> + table->td_flags = th.td_flags;
> + table->td_lolen = th.td_lolen;
> if (th.td_flags == YYTD_DATA8)
> UNPACK_ARRAY(table->td_data, blob, th.td_lolen,
> u8, byte_to_byte);
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web