Message ID | 20240722210348.30814-1-bethany.jamison@canonical.com |
---|---|
Headers | show |
Series | CVE-2024-26929 | expand |
On Mon, Jul 22, 2024 at 04:03:47PM -0500, Bethany Jamison wrote: > [Impact] > > scsi: qla2xxx: Fix double free of fcport > > The server was crashing after LOGO because fcport was getting freed twice. > > -----------[ cut here ]----------- > kernel BUG at mm/slub.c:371! > invalid opcode: 0000 1 SMP PTI > CPU: 35 PID: 4610 Comm: bash Kdump: loaded Tainted: G OE --------- - - 4.18.0-425.3.1.el8.x86_64 #1 > Hardware name: HPE ProLiant DL360 Gen10/ProLiant DL360 Gen10, BIOS U32 09/03/2021 > RIP: 0010:set_freepointer.part.57+0x0/0x10 > RSP: 0018:ffffb07107027d90 EFLAGS: 00010246 > RAX: ffff9cb7e3150000 RBX: ffff9cb7e332b9c0 RCX: ffff9cb7e3150400 > RDX: 0000000000001f37 RSI: 0000000000000000 RDI: ffff9cb7c0005500 > RBP: fffff693448c5400 R08: 0000000080000000 R09: 0000000000000009 > R10: 0000000000000000 R11: 0000000000132af0 R12: ffff9cb7c0005500 > R13: ffff9cb7e3150000 R14: ffffffffc06990e0 R15: ffff9cb7ea85ea58 > FS: 00007ff6b79c2740(0000) GS:ffff9cb8f7ec0000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > CR2: 000055b426b7d700 CR3: 0000000169c18002 CR4: 00000000007706e0 > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 > PKRU: 55555554 > Call Trace: > kfree+0x238/0x250 > qla2x00_els_dcmd_sp_free+0x20/0x230 [qla2xxx] > ? qla24xx_els_dcmd_iocb+0x607/0x690 [qla2xxx] > qla2x00_issue_logo+0x28c/0x2a0 [qla2xxx] > ? qla2x00_issue_logo+0x28c/0x2a0 [qla2xxx] > ? kernfs_fop_write+0x11e/0x1a0 > > Remove one of the free calls and add check for valid fcport. Also use > function qla2x00_free_fcport() instead of kfree(). > > [Fix] > > Noble: released > Jammy: released > Focal: Backported - I replaced 'qla2x000_free_fcport(fcport)' with > 'kfree(sp->fcport)' because qla2x000_free_fcport is not defined > in Focal and is not easily added, kfree should be a good > substitute for the original intension of the fix change > Bionic: fix sent to esm ML > Xenial: fix already sent to esm ML > Trusty: not going to be fixed by us > > [Test Case] > > Compiled > > [Where problems could occur] > > This fix affects those who use the QLogic Fibre Channel HBA Driver, > an issue with this fix would be visible to the user via undefined > behavior or a system crash. > > Saurav Kashyap (1): > scsi: qla2xxx: Fix double free of fcport > > drivers/scsi/qla2xxx/qla_iocb.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > -- > 2.34.1 > > > -- > kernel-team mailing list > kernel-team@lists.ubuntu.com > https://lists.ubuntu.com/mailman/listinfo/kernel-team Acked-by: Noah Wager <noah.wager@canonical.com>
On 22-07-2024 23:03, Bethany Jamison wrote: > [Impact] > > scsi: qla2xxx: Fix double free of fcport > > The server was crashing after LOGO because fcport was getting freed twice. > > -----------[ cut here ]----------- > kernel BUG at mm/slub.c:371! > invalid opcode: 0000 1 SMP PTI > CPU: 35 PID: 4610 Comm: bash Kdump: loaded Tainted: G OE --------- - - 4.18.0-425.3.1.el8.x86_64 #1 > Hardware name: HPE ProLiant DL360 Gen10/ProLiant DL360 Gen10, BIOS U32 09/03/2021 > RIP: 0010:set_freepointer.part.57+0x0/0x10 > RSP: 0018:ffffb07107027d90 EFLAGS: 00010246 > RAX: ffff9cb7e3150000 RBX: ffff9cb7e332b9c0 RCX: ffff9cb7e3150400 > RDX: 0000000000001f37 RSI: 0000000000000000 RDI: ffff9cb7c0005500 > RBP: fffff693448c5400 R08: 0000000080000000 R09: 0000000000000009 > R10: 0000000000000000 R11: 0000000000132af0 R12: ffff9cb7c0005500 > R13: ffff9cb7e3150000 R14: ffffffffc06990e0 R15: ffff9cb7ea85ea58 > FS: 00007ff6b79c2740(0000) GS:ffff9cb8f7ec0000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > CR2: 000055b426b7d700 CR3: 0000000169c18002 CR4: 00000000007706e0 > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 > PKRU: 55555554 > Call Trace: > kfree+0x238/0x250 > qla2x00_els_dcmd_sp_free+0x20/0x230 [qla2xxx] > ? qla24xx_els_dcmd_iocb+0x607/0x690 [qla2xxx] > qla2x00_issue_logo+0x28c/0x2a0 [qla2xxx] > ? qla2x00_issue_logo+0x28c/0x2a0 [qla2xxx] > ? kernfs_fop_write+0x11e/0x1a0 > > Remove one of the free calls and add check for valid fcport. Also use > function qla2x00_free_fcport() instead of kfree(). > > [Fix] > > Noble: released > Jammy: released > Focal: Backported - I replaced 'qla2x000_free_fcport(fcport)' with > 'kfree(sp->fcport)' because qla2x000_free_fcport is not defined > in Focal and is not easily added, kfree should be a good > substitute for the original intension of the fix change > Bionic: fix sent to esm ML > Xenial: fix already sent to esm ML > Trusty: not going to be fixed by us > > [Test Case] > > Compiled > > [Where problems could occur] > > This fix affects those who use the QLogic Fibre Channel HBA Driver, > an issue with this fix would be visible to the user via undefined > behavior or a system crash. > > Saurav Kashyap (1): > scsi: qla2xxx: Fix double free of fcport > > drivers/scsi/qla2xxx/qla_iocb.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > Acked-by: Thibault Ferrante <thibault.ferrante@canonical.com> -- Thibault
On 22/07/2024 23:03, Bethany Jamison wrote: > [Impact] > > scsi: qla2xxx: Fix double free of fcport > > The server was crashing after LOGO because fcport was getting freed twice. > > -----------[ cut here ]----------- > kernel BUG at mm/slub.c:371! > invalid opcode: 0000 1 SMP PTI > CPU: 35 PID: 4610 Comm: bash Kdump: loaded Tainted: G OE --------- - - 4.18.0-425.3.1.el8.x86_64 #1 > Hardware name: HPE ProLiant DL360 Gen10/ProLiant DL360 Gen10, BIOS U32 09/03/2021 > RIP: 0010:set_freepointer.part.57+0x0/0x10 > RSP: 0018:ffffb07107027d90 EFLAGS: 00010246 > RAX: ffff9cb7e3150000 RBX: ffff9cb7e332b9c0 RCX: ffff9cb7e3150400 > RDX: 0000000000001f37 RSI: 0000000000000000 RDI: ffff9cb7c0005500 > RBP: fffff693448c5400 R08: 0000000080000000 R09: 0000000000000009 > R10: 0000000000000000 R11: 0000000000132af0 R12: ffff9cb7c0005500 > R13: ffff9cb7e3150000 R14: ffffffffc06990e0 R15: ffff9cb7ea85ea58 > FS: 00007ff6b79c2740(0000) GS:ffff9cb8f7ec0000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > CR2: 000055b426b7d700 CR3: 0000000169c18002 CR4: 00000000007706e0 > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 > PKRU: 55555554 > Call Trace: > kfree+0x238/0x250 > qla2x00_els_dcmd_sp_free+0x20/0x230 [qla2xxx] > ? qla24xx_els_dcmd_iocb+0x607/0x690 [qla2xxx] > qla2x00_issue_logo+0x28c/0x2a0 [qla2xxx] > ? qla2x00_issue_logo+0x28c/0x2a0 [qla2xxx] > ? kernfs_fop_write+0x11e/0x1a0 > > Remove one of the free calls and add check for valid fcport. Also use > function qla2x00_free_fcport() instead of kfree(). > > [Fix] > > Noble: released > Jammy: released > Focal: Backported - I replaced 'qla2x000_free_fcport(fcport)' with > 'kfree(sp->fcport)' because qla2x000_free_fcport is not defined > in Focal and is not easily added, kfree should be a good > substitute for the original intension of the fix change > Bionic: fix sent to esm ML > Xenial: fix already sent to esm ML > Trusty: not going to be fixed by us > > [Test Case] > > Compiled > > [Where problems could occur] > > This fix affects those who use the QLogic Fibre Channel HBA Driver, > an issue with this fix would be visible to the user via undefined > behavior or a system crash. > > Saurav Kashyap (1): > scsi: qla2xxx: Fix double free of fcport > > drivers/scsi/qla2xxx/qla_iocb.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > Applied to focal:linux master-next branch. Thanks!