[Xenial/Yakkety/Zesty] [SRU] [PATCH] UBUNTU: SAUCE: apparmor: fix link auditing failure due to, uninitialized var

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Xenial/Yakkety/Zesty] [SRU] [PATCH] UBUNTU: SAUCE: apparmor: fix link auditing failure due to, uninitialized var

John Johansen-2
The lperms struct is uninitialized for use with auditing if there is
an early failure due to a path name error. This can result in incorrect
logging or in the extreme case apparmor killing the task with a signal
which results in the failure in the referenced bug.

BugLink: http://bugs.launchpad.net/bugs/1664912
Signed-off-by: John Johansen <[hidden email]>
---
 security/apparmor/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/apparmor/file.c b/security/apparmor/file.c
index ae0b7c7..6a0411c 100644
--- a/security/apparmor/file.c
+++ b/security/apparmor/file.c
@@ -374,7 +374,7 @@ static int profile_path_link(struct aa_profile *profile,
      struct path_cond *cond)
 {
  const char *lname, *tname = NULL;
- struct aa_perms lperms, perms;
+ struct aa_perms lperms = {}, perms;
  const char *info = NULL;
  u32 request = AA_MAY_LINK;
  unsigned int state;
--
2.9.3


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [Xenial/Yakkety/Zesty] [SRU] [PATCH] UBUNTU: SAUCE: apparmor: fix link auditing failure due to, uninitialized var

Stefan Bader-2



--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

ACK: [Xenial/Yakkety/Zesty] [SRU] [PATCH] UBUNTU: SAUCE: apparmor: fix link auditing failure due to, uninitialized var

Tim Gardner-2
In reply to this post by John Johansen-2
On 02/15/2017 04:13 PM, John Johansen wrote:

> The lperms struct is uninitialized for use with auditing if there is
> an early failure due to a path name error. This can result in incorrect
> logging or in the extreme case apparmor killing the task with a signal
> which results in the failure in the referenced bug.
>
> BugLink: http://bugs.launchpad.net/bugs/1664912
> Signed-off-by: John Johansen <[hidden email]>
> ---
>  security/apparmor/file.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/security/apparmor/file.c b/security/apparmor/file.c
> index ae0b7c7..6a0411c 100644
> --- a/security/apparmor/file.c
> +++ b/security/apparmor/file.c
> @@ -374,7 +374,7 @@ static int profile_path_link(struct aa_profile *profile,
>       struct path_cond *cond)
>  {
>   const char *lname, *tname = NULL;
> - struct aa_perms lperms, perms;
> + struct aa_perms lperms = {}, perms;
>   const char *info = NULL;
>   u32 request = AA_MAY_LINK;
>   unsigned int state;
>


--
Tim Gardner [hidden email]

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED to Zesty: [Xenial/Yakkety/Zesty] [SRU] [PATCH] UBUNTU: SAUCE: apparmor: fix link auditing failure due to, uninitialized var

Tim Gardner-2
Reply | Threaded
Open this post in threaded view
|

APPLIED: [Xenial/Yakkety/Zesty] [SRU] [PATCH] UBUNTU: SAUCE: apparmor: fix link auditing failure due to, uninitialized var

Thadeu Lima de Souza Cascardo-3
In reply to this post by John Johansen-2
Applied to xenial and yakkety master-next branches.

Thanks.
Cascardo.

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team