* [PATCH] audit: session ID should not set arch quick field pointer
@ 2018-02-12 10:04 Richard Guy Briggs
2018-02-14 21:40 ` Paul Moore
0 siblings, 1 reply; 2+ messages in thread
From: Richard Guy Briggs @ 2018-02-12 10:04 UTC (permalink / raw)
To: Linux-Audit Mailing List, LKML
Cc: Paul Moore, Eric Paris, Steve Grubb, Richard Guy Briggs
A bug was introduced in 8fae47705685fcaa75a1fe4c8c3e18300a702979
("audit: add support for session ID user filter")
See: https://github.com/linux-audit/audit-kernel/issues/4
When setting a session ID filter, the session ID filter field overwrote
the quick pointer reference to the arch field, potentially causing the
arch field to be misinterpreted.
Passes audit-testsuite.
Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
---
kernel/auditfilter.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index 4a1758a..739a6d2 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -496,7 +496,6 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data,
if (!gid_valid(f->gid))
goto exit_free;
break;
- case AUDIT_SESSIONID:
case AUDIT_ARCH:
entry->rule.arch_f = f;
break;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] audit: session ID should not set arch quick field pointer
2018-02-12 10:04 [PATCH] audit: session ID should not set arch quick field pointer Richard Guy Briggs
@ 2018-02-14 21:40 ` Paul Moore
0 siblings, 0 replies; 2+ messages in thread
From: Paul Moore @ 2018-02-14 21:40 UTC (permalink / raw)
To: Richard Guy Briggs
Cc: Linux-Audit Mailing List, LKML, Eric Paris, Steve Grubb
On Mon, Feb 12, 2018 at 5:04 AM, Richard Guy Briggs <rgb@redhat.com> wrote:
> A bug was introduced in 8fae47705685fcaa75a1fe4c8c3e18300a702979
> ("audit: add support for session ID user filter")
> See: https://github.com/linux-audit/audit-kernel/issues/4
>
> When setting a session ID filter, the session ID filter field overwrote
> the quick pointer reference to the arch field, potentially causing the
> arch field to be misinterpreted.
>
> Passes audit-testsuite.
>
> Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
> ---
> kernel/auditfilter.c | 1 -
> 1 file changed, 1 deletion(-)
Good catch. Merged.
Looking at the original patch and audit_field_valid(), I think we
should probably look into tightening up what constitutes "valid"
fields. For example, does it make sense to allow anything but
equal/not-equal when comparing AUDIT_SUBJ_TYPE? (note well: this is
just one example, there are many more)
* https://github.com/linux-audit/audit-kernel/issues/73
> diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
> index 4a1758a..739a6d2 100644
> --- a/kernel/auditfilter.c
> +++ b/kernel/auditfilter.c
> @@ -496,7 +496,6 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data,
> if (!gid_valid(f->gid))
> goto exit_free;
> break;
> - case AUDIT_SESSIONID:
> case AUDIT_ARCH:
> entry->rule.arch_f = f;
> break;
> --
> 1.8.3.1
>
--
paul moore
www.paul-moore.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-14 21:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-12 10:04 [PATCH] audit: session ID should not set arch quick field pointer Richard Guy Briggs
2018-02-14 21:40 ` Paul Moore
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.