Sandy Huang 260b32e594 drm/bridge: synopsys: dw-hdmi: destroy connector and encoder
connector and encoder should be removed when bind failed, otherwise will
lead to system panic when enable SLUB and SLUB_DEBUG:

[    1.071801] rockchip-drm display-subsystem: failed to bind ff960000.dsi (ops dw_mipi_dsi_ops): -517
[    1.073943] Unable to handle kernel paging request at virtual address 006b6b6b6b6b6b73
……
[    1.442300] pc : drm_mode_config_cleanup+0x4c/0x2f8
[    1.447179] lr : rockchip_drm_bind+0x610/0x1c38

after enable KASAN, we can see the UAF error:

[    3.862556] BUG: KASAN: use-after-free in rockchip_drm_bind+0x474/0x2b58
[    3.862611] Read of size 4 at addr ffffffc00a21f55c by task swapper/0/1
[    3.862691] CPU: 4 PID: 1 Comm: swapper/0 Not tainted 4.19.101 #1820
[    3.862737] Hardware name: Rockchip rk3368 808 evb board (DT)
[    3.862782] Call trace:
[    3.862853]  dump_backtrace+0x0/0x240
[    3.862905]  show_stack+0x14/0x20
[    3.863146]  kasan_report+0xc/0x18
[    3.863265]  rockchip_drm_bind+0x474/0x2b58
……
[    3.864314] Allocated by task 1:
[    3.864376]  __kasan_kmalloc.isra.0+0x100/0x1b8
[    3.864435]  kasan_slab_alloc+0x14/0x20
[    3.864493]  __kmalloc_track_caller+0x154/0x368
[    3.864550]  devm_kmalloc+0x30/0xb0
[    3.864611]  dw_hdmi_rockchip_bind+0xcc/0xa28
[    3.864668]  component_bind_all+0x1d8/0x450
[    3.864728]  rockchip_drm_bind+0x450/0x2b58
……
[    3.865787] Freed by task 1:
[    3.865851]  __kasan_slab_free+0x118/0x220
[    3.865897]  kasan_slab_free+0x10/0x18
[    3.865952]  kfree+0x7c/0x308
[    3.866012]  release_nodes+0x248/0x4a0
[    3.866070]  devres_release_group+0xd4/0x148
[    3.866127]  component_unbind.isra.7+0x98/0xc8
[    3.866183]  component_bind_all+0x3b0/0x450
[    3.866247]  rockchip_drm_bind+0x450/0x2b58

Change-Id: I6378bf34d8b953fb770badfafdd3fe44628505f7
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-03-27 10:24:34 +08:00
2019-02-10 00:33:21 +08:00
2020-03-03 07:33:01 +01:00
2019-02-10 00:33:21 +08:00
2019-02-10 00:33:21 +08:00
2019-08-29 19:45:37 +08:00
2019-08-29 19:45:37 +08:00
2020-03-03 07:33:01 +01:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
No description provided
Readme 7.9 GiB
Languages
C 97.7%
Assembly 1.6%
Makefile 0.3%
Perl 0.1%