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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK8P3a1EAWoqNxaJOSPsLdCF82QNAA-YWpYwA13cex_UC1iLyQ@mail.gmail.com>
Date:   Tue, 5 Jan 2021 14:53:15 +0100
From:   Arnd Bergmann <arnd@...nel.org>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     kbuild@...ts.01.org, Arnd Bergmann <arnd@...db.de>,
        kbuild test robot <lkp@...el.com>, kbuild-all@...ts.01.org,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1056
 vchiq_get_user_ptr() error: uninitialized symbol 'ptr'.

On Mon, Jan 4, 2021 at 11:54 AM Dan Carpenter <dan.carpenter@...cle.com> wrote:

>
> 5d240a54be7e592 Arnd Bergmann 2020-09-18  1044  static inline int vchiq_get_user_ptr(void __user **buf, void __user *ubuf, int index)
> 5d240a54be7e592 Arnd Bergmann 2020-09-18  1045  {
> 5d240a54be7e592 Arnd Bergmann 2020-09-18  1046          int ret;
> 5d240a54be7e592 Arnd Bergmann 2020-09-18  1047
> 5d240a54be7e592 Arnd Bergmann 2020-09-18  1048          if (in_compat_syscall()) {
> 4184da4f316a549 Arnd Bergmann 2020-09-25  1049                  compat_uptr_t ptr32;
> 5d240a54be7e592 Arnd Bergmann 2020-09-18  1050                  compat_uptr_t __user *uptr = ubuf;
> 4184da4f316a549 Arnd Bergmann 2020-09-25  1051                  ret = get_user(ptr32, uptr + index);
> 5d240a54be7e592 Arnd Bergmann 2020-09-18  1052                  *buf = compat_ptr(ptr32);
> 5d240a54be7e592 Arnd Bergmann 2020-09-18  1053          } else {
> 4184da4f316a549 Arnd Bergmann 2020-09-25  1054                  uintptr_t ptr, __user *uptr = ubuf;
> 4184da4f316a549 Arnd Bergmann 2020-09-25  1055                  ret = get_user(ptr, uptr + index);
> 4184da4f316a549 Arnd Bergmann 2020-09-25 @1056                  *buf = (void __user *)ptr;
>
> If get_user() fails then this is uninitialized.  This will trigger a
> runtime error if the UBSan uninitialized behavior tool is enabled.

Thanks for the report, I sent a fix now.

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ