Patch "binder: replace "%p" with "%pK"" has been added to the 4.14-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
binder: replace "%p" with "%pK"
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
binder-replace-p-with-pk.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
8ca86f1639ec5890d400fff9211aca22d0a392ebMon Sep 17 00:00:00 2001
From: Todd Kjos <[email protected]>
Date: Wed, 7 Feb 2018 13:57:37 -0800
Subject: binder: replace "%p" with "%pK"
From: Todd Kjos <[email protected]>
commit 8ca86f1639ec5890d400fff9211aca22d0a392eb upstream.
The format specifier "%p" can leak kernel addresses. Use "%pK" instead. There were 4 remaining cases in binder.c.
--- drivers/android/binder.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/android/binder.c +4 -4
@@ -2141,7 +2141,7 @@ static void binder_transaction_buffer_reint debug_id = buffer->debug_id;binder_debug (BINDER_DEBUG_TRANSACTION , -"%d buffer release %d, size %zd-%zd, failed at %p\n" , +"%d buffer release %d, size %zd-%zd, failed at %pK\n" , proc->pid, buffer->debug_id, buffer->data_size, buffer->offsets_size, failed_at);
@@ -3653,7 +3653,7 @@ static int binder_thread_write(struct bi } }binder_debug (BINDER_DEBUG_DEAD_BINDER , -"%d:%d BC_DEAD_BINDER_DONE %016llx found %p\n" , +"%d:%d BC_DEAD_BINDER_DONE %016llx found %pK\n" , proc->pid, thread->pid, (u64 )cookie, death);if (death ==NULL ) {
@@ -4991,7 +4991,7 @@ static void print_binder_transaction_ilospin_lock (&t->lock); to_proc = t->to_proc; seq_printf(m, - "%s %d: %p from %d:%d to %d:%d code %x flags %x pri %ld r%d", + "%s %d: %pK from %d:%d to %d:%d code %x flags %x pri %ld r%d", prefix, t->debug_id, t, t->from ? t->from->proc->pid : 0, t->from ? t->from->pid : 0,
@@ -5015,7 +5015,7 @@ static void print_binder_transaction_ilo }if (buffer->target_node)seq_printf (m," node %d" , buffer->target_node->debug_id); -seq_printf (m," size %zd:%zd data %p\n" , +seq_printf (m," size %zd:%zd data %pK\n" , buffer->data_size, buffer->offsets_size, buffer->data); }
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/android-binder-remove-warn-for-redundant-txn-error.patch queue-4.14/binder-replace-p-with-pk.patch