lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAH2r5mvA3i8E-KAuQ=+10gfzF1q8dWwB2KQiY3W1FBw_gscurQ@mail.gmail.com>
Date:	Thu, 18 Aug 2011 11:55:22 -0500
From:	Steve French <smfrench@...il.com>
To:	"J. R. Okajima" <hooanon05@...oo.co.jp>
Cc:	linux-cifs@...r.kernel.org, linux-kernel@...r.kernel.org,
	kirk w <kirkpuppy@...oo.com>
Subject: Re: Q: cifs, freeing volume_info->UNCip

merged

On Mon, Aug 15, 2011 at 6:22 PM, J. R. Okajima <hooanon05@...oo.co.jp> wrote:
>
> Hello,
>
> CIFS cleanup_volume_info_contents() looks like having a memory
> corruption problem.
> When UNCip is set to "&vol->UNC[2]" in cifs_parse_mount_options(), it
> should not be kfree()-ed in cleanup_volume_info_contents().
>
> If it is correct and the code in mainline is not fixed yet, then here is
> a patch.
>
> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> index ccc1afa..e0ea721 100644
> --- a/fs/cifs/connect.c
> +++ b/fs/cifs/connect.c
> @@ -2838,7 +2838,8 @@ cleanup_volume_info_contents(struct smb_vol *volume_info)
>        kfree(volume_info->username);
>        kzfree(volume_info->password);
>        kfree(volume_info->UNC);
> -       kfree(volume_info->UNCip);
> +       if (volume_info->UNCip != volume_info->UNC + 2)
> +               kfree(volume_info->UNCip);
>        kfree(volume_info->domainname);
>        kfree(volume_info->iocharset);
>        kfree(volume_info->prepath);
>
>
> J. R. Okajima
>



-- 
Thanks,

Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ