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] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 29 May 2020 11:48:51 +0100
From:   Ian Abbott <abbotti@....co.uk>
To:     Al Viro <viro@...iv.linux.org.uk>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCHES] uaccess comedi compat

On 29/05/2020 01:34, Al Viro wrote:
> 	The way comedi compat ioctls are done is wrong.
> Instead of having ->compat_ioctl() copying the 32bit
> stuff in, then passing the kernel copies to helpers shared
> with native ->ioctl() and doing copyout with conversion if
> needed, it's playing silly buggers with creating a 64bit
> copy on user stack, then calling native ioctl (which copies
> that copy into the kernel), then fetching it from user stack,
> converting to 32bit variant and copying that to user.
> 	Extra headache for no good reason.  And the single
> largest remaining pile of __put_user()/__get_user() this side
> of arch/*.  IMO compat_alloc_user_space() should die...
> 
> 	NOTE: this is only compile-tested - I simply don't
> have the hardware in question.
> 
> 	Anyway, the branch lives in #uaccess.comedi, based
> at v5.7-rc1
> 	
> Al Viro (10):
>        comedi: move compat ioctl handling to native fops
>        comedi: get rid of indirection via translated_ioctl()
>        comedi: get rid of compat_alloc_user_space() mess in COMEDI_CHANINFO compat
>        comedi: get rid of compat_alloc_user_space() mess in COMEDI_RANGEINFO compat
>        comedi: get rid of compat_alloc_user_space() mess in COMEDI_INSN compat
>        comedi: get rid of compat_alloc_user_space() mess in COMEDI_INSNLIST compat
>        comedi: lift copy_from_user() into callers of __comedi_get_user_cmd()
>        comedi: do_cmdtest_ioctl(): lift copyin/copyout into the caller
>        comedi: do_cmd_ioctl(): lift copyin/copyout into the caller
>        comedi: get rid of compat_alloc_user_space() mess in COMEDI_CMD{,TEST} compat

There is a bug in patch 05. Patch 10 doesn't seem to have been sent yet 
(I didn't receive it and I can't see it in the thread in the LKML 
archives). I've signed off on 01-04, 06-09.

These should be Cc'd to Greg KH and to devel@...verdev.osuosl.org.

Cheers,
Ian

-- 
-=( Ian Abbott <abbotti@....co.uk> || Web: www.mev.co.uk )=-
-=( MEV Ltd. is a company registered in England & Wales. )=-
-=( Registered number: 02862268.  Registered address:    )=-
-=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=-

Powered by blists - more mailing lists