public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] kallsyms_show_value-fix updates for v5.9-rc1
@ 2020-08-07 19:55 Kees Cook
  2020-08-07 20:16 ` Shuah Khan
  2020-08-07 20:40 ` pr-tracker-bot
  0 siblings, 2 replies; 3+ messages in thread
From: Kees Cook @ 2020-08-07 19:55 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Greg Kroah-Hartman, Jessica Yu, kernel test robot,
	Shuah Khan

Hi Linus,

Please pull this fix to my kallsyms_show_value() refactoring for
v5.9-rc1. About a month after the original refactoring landed, 0day
noticed that there was a path through the kernfs binattr read handlers
that did not have PAGE_SIZEd buffers, and the module "sections" read
handler made a bad assumption about this, resulting in it stomping on
memory when reached through small-sized splice() calls. I've added a set
of tests to find these kinds of regressions more quickly in the future
as well.

Thanks!

-Kees

The following changes since commit bcf876870b95592b52519ed4aafcf9d95999bc9c:

  Linux 5.8 (2020-08-02 14:21:45 -0700)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/kallsyms_show_value-fix-v5.9-rc1

for you to fetch changes up to 9af47666cb0f331bfcd76799ee368cdfcb00882c:

  selftests: splice: Check behavior of full and short splices (2020-08-07 10:50:11 -0700)

----------------------------------------------------------------
Fix sysfs module section output overflow

----------------------------------------------------------------
Kees Cook (2):
      module: Correctly truncate sysfs sections output
      selftests: splice: Check behavior of full and short splices

 kernel/module.c                                    | 22 +++++++--
 tools/testing/selftests/splice/.gitignore          |  1 +
 tools/testing/selftests/splice/Makefile            |  4 +-
 tools/testing/selftests/splice/config              |  1 +
 tools/testing/selftests/splice/settings            |  1 +
 .../testing/selftests/splice/short_splice_read.sh  | 56 +++++++++++++++++++++
 tools/testing/selftests/splice/splice_read.c       | 57 ++++++++++++++++++++++
 7 files changed, 137 insertions(+), 5 deletions(-)
 create mode 100644 tools/testing/selftests/splice/config
 create mode 100644 tools/testing/selftests/splice/settings
 create mode 100755 tools/testing/selftests/splice/short_splice_read.sh
 create mode 100644 tools/testing/selftests/splice/splice_read.c

-- 
Kees Cook

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [GIT PULL] kallsyms_show_value-fix updates for v5.9-rc1
  2020-08-07 19:55 [GIT PULL] kallsyms_show_value-fix updates for v5.9-rc1 Kees Cook
@ 2020-08-07 20:16 ` Shuah Khan
  2020-08-07 20:40 ` pr-tracker-bot
  1 sibling, 0 replies; 3+ messages in thread
From: Shuah Khan @ 2020-08-07 20:16 UTC (permalink / raw)
  To: Kees Cook, Linus Torvalds
  Cc: linux-kernel, Greg Kroah-Hartman, Jessica Yu, kernel test robot,
	Shuah Khan, Shuah Khan

On 8/7/20 1:55 PM, Kees Cook wrote:
> Hi Linus,
> 
> Please pull this fix to my kallsyms_show_value() refactoring for
> v5.9-rc1. About a month after the original refactoring landed, 0day
> noticed that there was a path through the kernfs binattr read handlers
> that did not have PAGE_SIZEd buffers, and the module "sections" read
> handler made a bad assumption about this, resulting in it stomping on
> memory when reached through small-sized splice() calls. I've added a set
> of tests to find these kinds of regressions more quickly in the future
> as well.
> 

Awesome. Thanks Kees.

> 
> The following changes since commit bcf876870b95592b52519ed4aafcf9d95999bc9c:
> 
>    Linux 5.8 (2020-08-02 14:21:45 -0700)
> 
> are available in the Git repository at:
> 
>    https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/kallsyms_show_value-fix-v5.9-rc1
> 
> for you to fetch changes up to 9af47666cb0f331bfcd76799ee368cdfcb00882c:
> 
>    selftests: splice: Check behavior of full and short splices (2020-08-07 10:50:11 -0700)
> 
> ----------------------------------------------------------------
> Fix sysfs module section output overflow
> 
> ----------------------------------------------------------------
> Kees Cook (2):
>        module: Correctly truncate sysfs sections output
>        selftests: splice: Check behavior of full and short splices
> 
>   kernel/module.c                                    | 22 +++++++--
>   tools/testing/selftests/splice/.gitignore          |  1 +
>   tools/testing/selftests/splice/Makefile            |  4 +-
>   tools/testing/selftests/splice/config              |  1 +
>   tools/testing/selftests/splice/settings            |  1 +
>   .../testing/selftests/splice/short_splice_read.sh  | 56 +++++++++++++++++++++
>   tools/testing/selftests/splice/splice_read.c       | 57 ++++++++++++++++++++++
>   7 files changed, 137 insertions(+), 5 deletions(-)
>   create mode 100644 tools/testing/selftests/splice/config
>   create mode 100644 tools/testing/selftests/splice/settings
>   create mode 100755 tools/testing/selftests/splice/short_splice_read.sh
>   create mode 100644 tools/testing/selftests/splice/splice_read.c
> 

For selftests part.

Acked-by: Shuah Khan <skhan@linuxfoundation.org>

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [GIT PULL] kallsyms_show_value-fix updates for v5.9-rc1
  2020-08-07 19:55 [GIT PULL] kallsyms_show_value-fix updates for v5.9-rc1 Kees Cook
  2020-08-07 20:16 ` Shuah Khan
@ 2020-08-07 20:40 ` pr-tracker-bot
  1 sibling, 0 replies; 3+ messages in thread
From: pr-tracker-bot @ 2020-08-07 20:40 UTC (permalink / raw)
  To: Kees Cook
  Cc: Linus Torvalds, linux-kernel, Greg Kroah-Hartman, Jessica Yu,
	kernel test robot, Shuah Khan

The pull request you sent on Fri, 7 Aug 2020 12:55:32 -0700:

> https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/kallsyms_show_value-fix-v5.9-rc1

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/6ba0d2e4fc2f3e8544f40fb1165c668f78fe951c

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-07 20:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-07 19:55 [GIT PULL] kallsyms_show_value-fix updates for v5.9-rc1 Kees Cook
2020-08-07 20:16 ` Shuah Khan
2020-08-07 20:40 ` pr-tracker-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox