Re: [GIT PULL] Audit patches for v5.12
The pull request you sent on Mon, 15 Feb 2021 17:10:37 -0500: > git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git > tags/audit-pr-20210215 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/23b6ba45f321bd5c4cddde4b8c85b3f71da3cdb8 Thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html
Re: [GIT PULL] Audit patches for v5.11
The pull request you sent on Mon, 14 Dec 2020 20:57:59 -0500: > git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git > tags/audit-pr-20201214 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/3d5de2ddc6ba924d7c10460a1dc3aae8786b9d52 Thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html
Re: [GIT PULL] Audit patches for v5.10
The pull request you sent on Mon, 12 Oct 2020 20:51:22 -0400: > git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git stable-5.10 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/01fb1e2f42d607ef5eb7a7ca54a0f0901fb5856c Thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html
Re: [GIT PULL] Audit patches for v5.10
On Mon, Oct 12, 2020 at 8:54 PM Paul Moore wrote: > On Mon, Oct 12, 2020 at 8:51 PM Paul Moore wrote: > > > > Hi Linus, > > > > A small set of audit patches for v5.10. There are only three patches > > in total, and all three are trivial fixes that don't really warrant > > any explanations beyond their descriptions. As usual, all three > > patches pass our test suite and as of a few minutes ago they applied > > cleanly to your tree. Please merge for v5.10. > > > > Thanks, > > -Paul > > > > -- > > The following changes since commit 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5: > > > > Linux 5.9-rc1 (2020-08-16 13:04:57 -0700) > > > > are available in the Git repository at: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git > >stable-5.10 > > My apologies, I mistakenly sent the branch and not the signed tag, the > proper PR tag is below: > > git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git > audit-pr-20201012 Today is just not my day, of course the tag reference above is missing the "tags/" prefix. Sorry for all the noise. > > for you to fetch changes up to c07203516439b9cd9f7b3cbed82a77164de5af40: > > > > audit: Remove redundant null check (2020-08-26 09:10:39 -0400) > > > > > > Jules Irenge (2): > > audit: change unnecessary globals into statics > > audit: uninitialize variable audit_sig_sid > > > > Xu Wang (1): > > audit: Remove redundant null check > > > > kernel/audit.c | 9 - > > kernel/audit.h | 4 > > 2 files changed, 4 insertions(+), 9 deletions(-) > > > > -- > > paul moore > > www.paul-moore.com > > > > -- > paul moore > www.paul-moore.com -- paul moore www.paul-moore.com
Re: [GIT PULL] Audit patches for v5.10
On Mon, Oct 12, 2020 at 8:51 PM Paul Moore wrote: > > Hi Linus, > > A small set of audit patches for v5.10. There are only three patches > in total, and all three are trivial fixes that don't really warrant > any explanations beyond their descriptions. As usual, all three > patches pass our test suite and as of a few minutes ago they applied > cleanly to your tree. Please merge for v5.10. > > Thanks, > -Paul > > -- > The following changes since commit 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5: > > Linux 5.9-rc1 (2020-08-16 13:04:57 -0700) > > are available in the Git repository at: > > git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git >stable-5.10 My apologies, I mistakenly sent the branch and not the signed tag, the proper PR tag is below: git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git audit-pr-20201012 > for you to fetch changes up to c07203516439b9cd9f7b3cbed82a77164de5af40: > > audit: Remove redundant null check (2020-08-26 09:10:39 -0400) > > > Jules Irenge (2): > audit: change unnecessary globals into statics > audit: uninitialize variable audit_sig_sid > > Xu Wang (1): > audit: Remove redundant null check > > kernel/audit.c | 9 - > kernel/audit.h | 4 > 2 files changed, 4 insertions(+), 9 deletions(-) > > -- > paul moore > www.paul-moore.com -- paul moore www.paul-moore.com
Re: [GIT PULL] Audit patches for v5.9
The pull request you sent on Mon, 3 Aug 2020 21:00:01 -0400: > git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git > tags/audit-pr-20200803 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/fd76a74d940ae3d6b8b2395cd12914630c7e1739 Thank you! -- Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker
Re: [GIT PULL] Audit patches for v5.8
The pull request you sent on Mon, 1 Jun 2020 20:48:59 -0400: > git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git > tags/audit-pr-20200601 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/9d99b1647fa56805c1cfef2d81ee7b9855359b62 Thank you! -- Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker
Re: [GIT PULL] Audit patches for v5.8
On Mon, Jun 1, 2020 at 5:49 PM Paul Moore wrote: > > Unfortunately I just noticed > that one of the commit subject lines is truncated - sorry about that, > it's my fault not Richard's - but since the important part is there > ("add subj creds to NETFILTER_CFG") I opted to leave it as-is and not > disrupt the git log. If you would rather have the subject line fixed, > let me know and I'll correct it. It looks a bit odd, but not worth the churn of fixing up. Thanks, pulled, Linus
Re: [GIT PULL] Audit patches for v5.3
The pull request you sent on Tue, 2 Jul 2019 13:28:33 -0400: > git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git > tags/audit-pr-20190702 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/61fc5771f5e729a2ce235af42f69c8506725e84a Thank you! -- Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker
Re: [GIT PULL] Audit patches for v5.2
The pull request you sent on Tue, 7 May 2019 13:23:05 -0400: > git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git > tags/audit-pr-20190507 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/02aff8db6438ce29371fd9cd54c57213f4bb4536 Thank you! -- Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker
Re: [GIT PULL] Audit patches for v5.1
The pull request you sent on Tue, 5 Mar 2019 17:35:35 -0500: > git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git > tags/audit-pr-20190305 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/be37f21a08ce65c7632c7f45e1755a4b07f278a0 Thank you! -- Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker
Re: [GIT PULL] Audit patches for v4.21
The pull request you sent on Mon, 24 Dec 2018 11:26:40 -0500: > git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git > tags/audit-pr-20181224 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/047ce6d380e8e66cfb6cbc22e873af89dd0c216c Thank you! -- Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker
[patch 1/1] selinux: always initialize arguments to security_sid_to_context (Was: Re: [GIT PULL] audit patches)
On Thu, 2007-02-22 at 13:19 -0800, Andrew Morton wrote: > > On Thu, 22 Feb 2007 08:22:47 -0500 Stephen Smalley <[EMAIL PROTECTED]> > > wrote: > > On Wed, 2007-02-21 at 16:03 -0800, Andrew Morton wrote: > > > > > > Looking at the changes to audit_receive_msg(): > > > > > > > > > if (sid) { > > > if (selinux_sid_to_string( > > > sid, , )) { > > > audit_log_format(ab, > > > " ssid=%u", sid); > > > /* Maybe call audit_panic? */ > > > } else > > > audit_log_format(ab, > > > " subj=%s", ctx); > > > kfree(ctx); > > > } > > > > > > This is assuming that selinux_sid_to_string() always initialises `ctx'. > > > > > > But AFAICT there are two error paths in security_sid_to_context() which > > > forget to do that, so we end up doing kfree(uninitialised-local). > > > > > > I'd consider that a shortcoming in security_sid_to_context(), so not a > > > problem in this patch, as long as people agree with my blaming above. > > > > I wouldn't assume that the function initializes an argument if it > > returns an error, and at least some of the callers (in auditsc.c) appear > > to correctly initialize ctx to NULL themselves before calling > > selinux_sid_to_string(). But if you'd prefer the function to always > > handle it, we can do that. > > > > Well we now have (at least) one caller which assumes that *ctx is > initialied in error cases. > > And I think it's sane to make it do that: safer, and will simplify coding > in the callers. Ok, patch below. Always initialize *scontext and *scontext_len in security_sid_to_context. Signed-off-by: Stephen Smalley <[EMAIL PROTECTED]> --- security/selinux/ss/services.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index ca9154d..1e52356 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c @@ -609,6 +609,9 @@ int security_sid_to_context(u32 sid, char **scontext, u32 *scontext_len) struct context *context; int rc = 0; + *scontext = NULL; + *scontext_len = 0; + if (!ss_initialized) { if (sid <= SECINITSID_NUM) { char *scontextp; -- Stephen Smalley National Security Agency - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[patch 1/1] selinux: always initialize arguments to security_sid_to_context (Was: Re: [GIT PULL] audit patches)
On Thu, 2007-02-22 at 13:19 -0800, Andrew Morton wrote: On Thu, 22 Feb 2007 08:22:47 -0500 Stephen Smalley [EMAIL PROTECTED] wrote: On Wed, 2007-02-21 at 16:03 -0800, Andrew Morton wrote: Looking at the changes to audit_receive_msg(): if (sid) { if (selinux_sid_to_string( sid, ctx, len)) { audit_log_format(ab, ssid=%u, sid); /* Maybe call audit_panic? */ } else audit_log_format(ab, subj=%s, ctx); kfree(ctx); } This is assuming that selinux_sid_to_string() always initialises `ctx'. But AFAICT there are two error paths in security_sid_to_context() which forget to do that, so we end up doing kfree(uninitialised-local). I'd consider that a shortcoming in security_sid_to_context(), so not a problem in this patch, as long as people agree with my blaming above. I wouldn't assume that the function initializes an argument if it returns an error, and at least some of the callers (in auditsc.c) appear to correctly initialize ctx to NULL themselves before calling selinux_sid_to_string(). But if you'd prefer the function to always handle it, we can do that. Well we now have (at least) one caller which assumes that *ctx is initialied in error cases. And I think it's sane to make it do that: safer, and will simplify coding in the callers. Ok, patch below. Always initialize *scontext and *scontext_len in security_sid_to_context. Signed-off-by: Stephen Smalley [EMAIL PROTECTED] --- security/selinux/ss/services.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index ca9154d..1e52356 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c @@ -609,6 +609,9 @@ int security_sid_to_context(u32 sid, char **scontext, u32 *scontext_len) struct context *context; int rc = 0; + *scontext = NULL; + *scontext_len = 0; + if (!ss_initialized) { if (sid = SECINITSID_NUM) { char *scontextp; -- Stephen Smalley National Security Agency - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [GIT PULL] audit patches
> On Thu, 22 Feb 2007 08:22:47 -0500 Stephen Smalley <[EMAIL PROTECTED]> wrote: > On Wed, 2007-02-21 at 16:03 -0800, Andrew Morton wrote: > > > > Looking at the changes to audit_receive_msg(): > > > > > > if (sid) { > > if (selinux_sid_to_string( > > sid, , )) { > > audit_log_format(ab, > > " ssid=%u", sid); > > /* Maybe call audit_panic? */ > > } else > > audit_log_format(ab, > > " subj=%s", ctx); > > kfree(ctx); > > } > > > > This is assuming that selinux_sid_to_string() always initialises `ctx'. > > > > But AFAICT there are two error paths in security_sid_to_context() which > > forget to do that, so we end up doing kfree(uninitialised-local). > > > > I'd consider that a shortcoming in security_sid_to_context(), so not a > > problem in this patch, as long as people agree with my blaming above. > > I wouldn't assume that the function initializes an argument if it > returns an error, and at least some of the callers (in auditsc.c) appear > to correctly initialize ctx to NULL themselves before calling > selinux_sid_to_string(). But if you'd prefer the function to always > handle it, we can do that. > Well we now have (at least) one caller which assumes that *ctx is initialied in error cases. And I think it's sane to make it do that: safer, and will simplify coding in the callers. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [GIT PULL] audit patches
On Wed, 2007-02-21 at 16:03 -0800, Andrew Morton wrote: > On Sun, 18 Feb 2007 04:01:27 + Al Viro <[EMAIL PROTECTED]> wrote: > > > Misc audit patches (resend again...); the most intrusive one is > > AUDIT_FD_PAIR, > > allowing to log descriptor numbers from syscalls that do not return them in > > usual way (i.e. pipe() and socketpair()). It took some massage of > > the failure exits in sys_socketpair(); the rest is absolutely trivial. > > Please, pull from > > git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current.git/ audit.b37 > > Please send patches to the list for review if practical? In this case it > was. I trust davem has had a look at the non-trivial changes to > sys_socketpair(). > > > > Looking at the changes to audit_receive_msg(): > > > if (sid) { > if (selinux_sid_to_string( > sid, , )) { > audit_log_format(ab, > " ssid=%u", sid); > /* Maybe call audit_panic? */ > } else > audit_log_format(ab, > " subj=%s", ctx); > kfree(ctx); > } > > This is assuming that selinux_sid_to_string() always initialises `ctx'. > > But AFAICT there are two error paths in security_sid_to_context() which > forget to do that, so we end up doing kfree(uninitialised-local). > > I'd consider that a shortcoming in security_sid_to_context(), so not a > problem in this patch, as long as people agree with my blaming above. I wouldn't assume that the function initializes an argument if it returns an error, and at least some of the callers (in auditsc.c) appear to correctly initialize ctx to NULL themselves before calling selinux_sid_to_string(). But if you'd prefer the function to always handle it, we can do that. > > The coding style in there is a bit odd-looking. > > The new __audit_fd_pair() has unneeded braces in it. -- Stephen Smalley National Security Agency - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [GIT PULL] audit patches
On Wed, 2007-02-21 at 16:03 -0800, Andrew Morton wrote: On Sun, 18 Feb 2007 04:01:27 + Al Viro [EMAIL PROTECTED] wrote: Misc audit patches (resend again...); the most intrusive one is AUDIT_FD_PAIR, allowing to log descriptor numbers from syscalls that do not return them in usual way (i.e. pipe() and socketpair()). It took some massage of the failure exits in sys_socketpair(); the rest is absolutely trivial. Please, pull from git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current.git/ audit.b37 Please send patches to the list for review if practical? In this case it was. I trust davem has had a look at the non-trivial changes to sys_socketpair(). Looking at the changes to audit_receive_msg(): if (sid) { if (selinux_sid_to_string( sid, ctx, len)) { audit_log_format(ab, ssid=%u, sid); /* Maybe call audit_panic? */ } else audit_log_format(ab, subj=%s, ctx); kfree(ctx); } This is assuming that selinux_sid_to_string() always initialises `ctx'. But AFAICT there are two error paths in security_sid_to_context() which forget to do that, so we end up doing kfree(uninitialised-local). I'd consider that a shortcoming in security_sid_to_context(), so not a problem in this patch, as long as people agree with my blaming above. I wouldn't assume that the function initializes an argument if it returns an error, and at least some of the callers (in auditsc.c) appear to correctly initialize ctx to NULL themselves before calling selinux_sid_to_string(). But if you'd prefer the function to always handle it, we can do that. The coding style in there is a bit odd-looking. The new __audit_fd_pair() has unneeded braces in it. -- Stephen Smalley National Security Agency - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [GIT PULL] audit patches
On Thu, 22 Feb 2007 08:22:47 -0500 Stephen Smalley [EMAIL PROTECTED] wrote: On Wed, 2007-02-21 at 16:03 -0800, Andrew Morton wrote: Looking at the changes to audit_receive_msg(): if (sid) { if (selinux_sid_to_string( sid, ctx, len)) { audit_log_format(ab, ssid=%u, sid); /* Maybe call audit_panic? */ } else audit_log_format(ab, subj=%s, ctx); kfree(ctx); } This is assuming that selinux_sid_to_string() always initialises `ctx'. But AFAICT there are two error paths in security_sid_to_context() which forget to do that, so we end up doing kfree(uninitialised-local). I'd consider that a shortcoming in security_sid_to_context(), so not a problem in this patch, as long as people agree with my blaming above. I wouldn't assume that the function initializes an argument if it returns an error, and at least some of the callers (in auditsc.c) appear to correctly initialize ctx to NULL themselves before calling selinux_sid_to_string(). But if you'd prefer the function to always handle it, we can do that. Well we now have (at least) one caller which assumes that *ctx is initialied in error cases. And I think it's sane to make it do that: safer, and will simplify coding in the callers. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [GIT PULL] audit patches
On Sun, 18 Feb 2007 04:01:27 + Al Viro <[EMAIL PROTECTED]> wrote: > Misc audit patches (resend again...); the most intrusive one is AUDIT_FD_PAIR, > allowing to log descriptor numbers from syscalls that do not return them in > usual way (i.e. pipe() and socketpair()). It took some massage of > the failure exits in sys_socketpair(); the rest is absolutely trivial. > Please, pull from > git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current.git/ audit.b37 Please send patches to the list for review if practical? In this case it was. I trust davem has had a look at the non-trivial changes to sys_socketpair(). Looking at the changes to audit_receive_msg(): if (sid) { if (selinux_sid_to_string( sid, , )) { audit_log_format(ab, " ssid=%u", sid); /* Maybe call audit_panic? */ } else audit_log_format(ab, " subj=%s", ctx); kfree(ctx); } This is assuming that selinux_sid_to_string() always initialises `ctx'. But AFAICT there are two error paths in security_sid_to_context() which forget to do that, so we end up doing kfree(uninitialised-local). I'd consider that a shortcoming in security_sid_to_context(), so not a problem in this patch, as long as people agree with my blaming above. The coding style in there is a bit odd-looking. The new __audit_fd_pair() has unneeded braces in it. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [GIT PULL] audit patches
On Sun, 18 Feb 2007 04:01:27 + Al Viro [EMAIL PROTECTED] wrote: Misc audit patches (resend again...); the most intrusive one is AUDIT_FD_PAIR, allowing to log descriptor numbers from syscalls that do not return them in usual way (i.e. pipe() and socketpair()). It took some massage of the failure exits in sys_socketpair(); the rest is absolutely trivial. Please, pull from git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current.git/ audit.b37 Please send patches to the list for review if practical? In this case it was. I trust davem has had a look at the non-trivial changes to sys_socketpair(). Looking at the changes to audit_receive_msg(): if (sid) { if (selinux_sid_to_string( sid, ctx, len)) { audit_log_format(ab, ssid=%u, sid); /* Maybe call audit_panic? */ } else audit_log_format(ab, subj=%s, ctx); kfree(ctx); } This is assuming that selinux_sid_to_string() always initialises `ctx'. But AFAICT there are two error paths in security_sid_to_context() which forget to do that, so we end up doing kfree(uninitialised-local). I'd consider that a shortcoming in security_sid_to_context(), so not a problem in this patch, as long as people agree with my blaming above. The coding style in there is a bit odd-looking. The new __audit_fd_pair() has unneeded braces in it. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/