public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: PlusOneSecond <plusonesecond@foxmail.com>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: net: ax25: %x specifier misuse in kernel?
Date: Thu, 18 Apr 2019 20:02:30 -0700	[thread overview]
Message-ID: <5b376d2b-9fdb-9043-5bc6-48fb2e4cb821@gmail.com> (raw)
In-Reply-To: <tencent_3A04033395F30A3361F8A78F814E1FF92B07@qq.com>



On 04/18/2019 07:01 PM, PlusOneSecond wrote:
> In ax25_info_show of af_ax25.c:1891, linux-5.1.
> The pointer ax25 is cast to long type to print out.
> 
> Why it prints the a pointer 'ax25' use %8.8lx rather than %p?
> If it really want to print the value of ax25, it should use %px.

I guess nobody cared enough abut this security issue.

Please send a patch, thanks.

> 
> Also, I  scan the kernel code and notice that most of the pointers cast to long or unsigned long type to print out are marked with __iomem.
> Is it a misuse of %x?
> 
> 
> Thanks.
> 

      reply	other threads:[~2019-04-19  3:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-19  2:01 net: ax25: %x specifier misuse in kernel? PlusOneSecond
2019-04-19  3:02 ` Eric Dumazet [this message]

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=5b376d2b-9fdb-9043-5bc6-48fb2e4cb821@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=plusonesecond@foxmail.com \
    /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