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  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:   Thu, 27 Aug 2020 11:14:28 -0700
From:   Kees Cook <>
To:     Mrinal Pandey <>
Cc:,,,,,,,,,, Thierry Reding <>
Subject: Re: [PATCH] scripts: Add intended executable mode and SPDX license

On Thu, Aug 27, 2020 at 02:54:05PM +0530, Mrinal Pandey wrote:
> commit eb8305aecb95 ("scripts: Coccinelle script for namespace
> dependencies.") added the file nsdeps, commit 313dd1b62921 ("gcc-plugins:
> Add the randstruct plugin") added the file gcc-plugins/
> and commit 9b4ade226f74 ("xen: build infrastructure for generating
> hypercall depending symbols") added the file without the
> executable bit.
> [...]
>  scripts/gcc-plugins/ | 0
>  scripts/nsdeps                         | 0
>  scripts/              | 1 +
>  scripts/              | 0
>  4 files changed, 1 insertion(+)
>  mode change 100644 => 100755 scripts/gcc-plugins/
>  mode change 100644 => 100755 scripts/nsdeps
>  mode change 100644 => 100755 scripts/
>  mode change 100644 => 100755 scripts/

I can't find "official" guidance on this right now, but I'm pretty sure
this (having execute bits set correctly) wasn't something we could depend
on (i.e. regular "diff" output doesn't support it (just git's diff),
and copies of the tree (or tarballs, etc) may have missed the bits). All
the portions of the kernel that uses these kinds of files explicitly
specify the interpreter (or universally set the execute bit)[1]. As such,
is this change useful?

It might be better to _remove_ execute bits to catch the places where
the build is accidentally depending on them. ;)


[1] These all use CONFIG_SHELL:

  $(CONFIG_SHELL) $(srctree)/$(src)/ $@ $(objtree)/include/generated/randomize_layout_hash.h

       $(Q)$(CONFIG_SHELL) $(srctree)/scripts/nsdeps

quiet_cmd_hypercalls = HYPERCALLS $@
      cmd_hypercalls = $(CONFIG_SHELL) '$<' $@ $(filter-out $<,$^)
$(out)/xen-hypercalls.h: $(srctree)/scripts/
        $(call if_changed,hypercalls)

And I can't even find anything in the kernel that calls
scripts/ :) I think that should likely be moved into
the selftests directory and wired up.

Kees Cook

Powered by blists - more mailing lists