From: Alexander Grund <theflamefire89@gmail.com>
To: cip-dev@lists.cip-project.org
Cc: uli+cip@fpond.eu
Subject: [PATCH 4.4 0/4] Bluetooth: hci_sock: Fix possible OOB write in create_monitor_event
Date: Thu, 11 Jan 2024 20:06:54 +0100 [thread overview]
Message-ID: <20240111190658.153488-1-theflamefire89@gmail.com> (raw)
From: Alexander Grund <flamefire89@gmail.com>
This basically fixes the `memcpy(dst, src, strlen(src))`
where dst is a fixed size array and hence the copy can overflow it.
The changes to string[.h] introduce the required function.
The first commit (initially introducing it) uses some fortification
checks & macros not available in 4.4 which I kept in as the get
removed in the very next commit.
I also included the fixup commit moving it out of the header although
I'm not sure this is strictly required in 4.4. But it doesn't hurt either.
Guenter Roeck (1):
string: uninline memcpy_and_pad
Kees Cook (1):
Bluetooth: hci_sock: Correctly bounds check and pad HCI_MON_NEW_INDEX
name
Martin Wilck (2):
string.h: add memcpy_and_pad()
string.h: un-fortify memcpy_and_pad
include/linux/string.h | 3 +++
lib/string_helpers.c | 20 ++++++++++++++++++++
net/bluetooth/hci_sock.c | 3 ++-
3 files changed, 25 insertions(+), 1 deletion(-)
--
2.40.1
next reply other threads:[~2024-01-11 19:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 19:06 Alexander Grund [this message]
2024-01-11 19:06 ` [PATCH 4.4 1/4] string.h: add memcpy_and_pad() Alexander Grund
2024-01-11 19:06 ` [PATCH 4.4 2/4] string.h: un-fortify memcpy_and_pad Alexander Grund
2024-01-11 19:06 ` [PATCH 4.4 3/4] string: uninline memcpy_and_pad Alexander Grund
2024-01-11 19:06 ` [PATCH 4.4 4/4] Bluetooth: hci_sock: Correctly bounds check and pad HCI_MON_NEW_INDEX name Alexander Grund
2024-01-15 19:50 ` [cip-dev] " Pavel Machek
2024-01-15 20:05 ` [cip-dev] [PATCH 4.4 0/4] Bluetooth: hci_sock: Fix possible OOB write in create_monitor_event Pavel Machek
2024-01-29 2:06 ` Ulrich Hecht
2024-01-29 2:04 ` Ulrich Hecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240111190658.153488-1-theflamefire89@gmail.com \
--to=theflamefire89@gmail.com \
--cc=cip-dev@lists.cip-project.org \
--cc=uli+cip@fpond.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox