mcumgr image upload panic: runtime error: slice bounds out of range [:-62]

Getting an error from mcumgr and I'm not sure where I should start debugging this. 

My environment:

nRF Connect version 2.1.0
Board: nrf52840 DK and nrf52832 DK
Host: MacOS 12.6
Go: 1.19.2
mcumgr: 0.0.0-dev

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
(base) ?2 v2.1.0 % ~/go/bin/mcumgr --conntype ble --connstring peer_name='Zephyr' image upload build/zephyr/app_update.bin
0 / 212128 [----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 0.00%panic: runtime error: slice bounds out of range [:-62]
goroutine 1 [running]:
mynewt.apache.org/newtmgr/nmxact/xact.encodeUploadReq({0x100545678?, 0xc0001b0000?}, {0xc0001602e0?, 0x1002cb266?, 0xe2c37d8d0ce485cd?}, 0x98?, {0xc000280000?, 0x0?, 0x42190000000000?}, 0x0, ...)
/Users/mjc/go/pkg/mod/mynewt.apache.org/newtmgr@v0.0.0-20201028150837-60b2da78788c/nmxact/xact/image.go:120 +0x146
mynewt.apache.org/newtmgr/nmxact/xact.findChunkLen({0x100545678, 0xc0001b0000}, {0xc0001602e0, 0x20, 0x20}, 0x0?, {0xc000280000, 0x33ca0, 0x33ca1}, 0x0, ...)
/Users/mjc/go/pkg/mod/mynewt.apache.org/newtmgr@v0.0.0-20201028150837-60b2da78788c/nmxact/xact/image.go:139 +0x131
mynewt.apache.org/newtmgr/nmxact/xact.nextImageUploadReq({0x100545678, 0xc0001b0000}, 0x0?, {0xc000280000, 0x33ca0, 0x33ca1}, 0x0, 0x0?)
/Users/mjc/go/pkg/mod/mynewt.apache.org/newtmgr@v0.0.0-20201028150837-60b2da78788c/nmxact/xact/image.go:177 +0x1eb
mynewt.apache.org/newtmgr/nmxact/xact.(*ImageUploadCmd).Run(0xc000132780, {0x100545678, 0xc0001b0000})
/Users/mjc/go/pkg/mod/mynewt.apache.org/newtmgr@v0.0.0-20201028150837-60b2da78788c/nmxact/xact/image.go:353 +0x24e
mynewt.apache.org/newtmgr/nmxact/xact.(*ImageUpgradeCmd).runUpload(0xc000132680, {0x100545678, 0xc0001b0000})
/Users/mjc/go/pkg/mod/mynewt.apache.org/newtmgr@v0.0.0-20201028150837-60b2da78788c/nmxact/xact/image.go:510 +0x1cb
mynewt.apache.org/newtmgr/nmxact/xact.(*ImageUpgradeCmd).Run(0x304a7c763?, {0x100545678?, 0xc0001b0000?})
/Users/mjc/go/pkg/mod/mynewt.apache.org/newtmgr@v0.0.0-20201028150837-60b2da78788c/nmxact/xact/image.go:536 +0x6a
mynewt.apache.org/newtmgr/newtmgr/cli.imageUploadCmd(0xc00019ea00?, {0xc000138190?, 0x5?, 0x8?})
/Users/mjc/go/pkg/mod/mynewt.apache.org/newtmgr@v0.0.0-20201028150837-60b2da78788c/newtmgr/cli/image.go:212 +0x317
github.com/spf13/cobra.(*Command).execute(0xc00019ea00, {0xc000132480, 0x5, 0x8})
/Users/mjc/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:830 +0x663
github.com/spf13/cobra.(*Command).ExecuteC(0xc000126c80)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The app image comes from the Zephyr sample project called SMP Server Sample. The instructions are here:
http://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.1.0/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/README.html

I haven't made any changes to the sample project. I get the same error on Intel Mac and M1 Mac.