lists.openwall.net   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  linux-cve-announce  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]
Message-ID: <CAHp75VeMvWycVsNPHb1cvMbtVSCiX3m9wUsZk7HkPU+e=VTb3A@mail.gmail.com>
Date:   Fri, 21 Oct 2022 11:33:26 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     cy_huang <u0084500@...il.com>
Cc:     lee@...nel.org, matthias.bgg@...il.com, chiaen_wu@...htek.com,
        cy_huang@...htek.com, linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] mfd: mt6370: Add the out-of-bound check to prevent the
 null pointer

On Fri, Oct 21, 2022 at 5:17 AM cy_huang <u0084500@...il.com> wrote:
>
> From: ChiYuan Huang <cy_huang@...htek.com>
>
> This potential risk could happen at regmap_raw_read() or
> regmap_raw_write() when accessing the over-bound register address.
>
> For testing, I try to reproduce it with a testing attribute file.
> Below's the issue trace log.

It looks like you randomly cut the trace.
It's not what I meant and documentation suggests.

> [41.314358] pc : i2c_smbus_xfer+0x58/0x120
> [41.314371] lr : i2c_smbus_read_i2c_block_data+0x74/0xc0
> [41.399677] Call trace:
> [41.402153]  i2c_smbus_xfer+0x58/0x120
> [41.405956]  i2c_smbus_read_i2c_block_data+0x74/0xc0
> [41.410991]  mt6370_regmap_read+0x40/0x60 [mt6370]
> [41.415855]  _regmap_raw_read+0xe4/0x278
> [41.419834]  regmap_raw_read+0xec/0x240
> [41.423721]  rg_bound_show+0xb0/0x120 [mt6370]
> [41.428226]  dev_attr_show+0x3c/0x80
> [41.431851]  sysfs_kf_seq_show+0xc4/0x150
> [41.435916]  kernfs_seq_show+0x48/0x60
> [41.439718]  seq_read_iter+0x11c/0x450
> [41.443519]  kernfs_fop_read_iter+0x124/0x1c0
> [41.447937]  vfs_read+0x1a8/0x288
> [41.451296]  ksys_read+0x74/0x100
> [41.454654]  __arm64_sys_read+0x24/0x30
> [41.458541]  invoke_syscall+0x54/0x118
> [41.462344]  el0_svc_common.constprop.4+0x94/0x128
> [41.467202]  do_el0_svc+0x3c/0xd0
> [41.470562]  el0_svc+0x20/0x60
> [41.473658]  el0t_64_sync_handler+0x94/0xb8
> [41.477899]  el0t_64_sync+0x15c/0x160
> [41.481614] Code: 54000388 f9401262 aa1303e0 52800041 (f9400042)
> [41.487793] ---[ end trace 0000000000000000 ]---

...

> If there's still something improper, please kindly correct me.

https://www.kernel.org/doc/html/latest/process/submitting-patches.html#backtraces-in-commit-messages

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ