Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

podman crashes processing --device arg if the middle part is empty #19335

Closed
dfr opened this issue Jul 24, 2023 · 1 comment · Fixed by #19339
Closed

podman crashes processing --device arg if the middle part is empty #19335

dfr opened this issue Jul 24, 2023 · 1 comment · Fixed by #19339
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@dfr
Copy link
Contributor

dfr commented Jul 24, 2023

Issue Description

The podman create (and run) command supports adding device nodes to the container using the '--device' argument. The argument value can have up to three parts to specify host path, container path and access modes. If the second part is empty, podman crashes:

sudo podman run --rm -ti --device /dev/mem::rw alpine sh
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
panic({0x555c7801d600, 0xc000681038})
	/usr/lib/golang/src/runtime/panic.go:987 +0x3ba fp=0xc0008ca8d0 sp=0xc0008ca810 pc=0x555c766cda7a
runtime.goPanicIndex(0x0, 0x0)
	/usr/lib/golang/src/runtime/panic.go:113 +0x7f fp=0xc0008ca910 sp=0xc0008ca8d0 pc=0x555c766cb93f
github.com/containers/podman/pkg/specgen/generate.ParseDevice({0xc0007913d0, 0xc})
	/builddir/build/BUILD/podman-4.5.0/_build/src/github.com/containers/podman/pkg/specgen/generate/config_linux.go:196 +0x4a5 fp=0xc0008caa80 sp=0xc0008ca910 pc=0x555c775cc6a5
github.com/containers/podman/pkg/specgen/generate.addDevice(0xc0008caf80, {0xc0007913d0?, 0x3?})
	/builddir/build/BUILD/podman-4.5.0/_build/src/github.com/containers/podman/pkg/specgen/generate/config_linux.go:141 +0x45 fp=0xc0008cacb8 sp=0xc0008caa80 pc=0x555c775cb7c5
github.com/containers/podman/pkg/specgen/generate.DevicesFromPath(0xc0008caf80, {0xc0002e4cf0, 0xc})
	/builddir/build/BUILD/podman-4.5.0/_build/src/github.com/containers/podman/pkg/specgen/generate/config_linux.go:88 +0x4b1 fp=0xc0008cae00 sp=0xc0008cacb8 pc=0x555c775ca871
github.com/containers/podman/pkg/specgen/generate.SpecGenToOCI({0x0?, 0x0?}, 0xc000614800, 0x0?, 0xc000122800, 0x0?, {0x555c78e49600, 0x0, 0x0}, 0x0, ...)
	/builddir/build/BUILD/podman-4.5.0/_build/src/github.com/containers/podman/pkg/specgen/generate/oci_linux.go:250 +0x1c9d fp=0xc0008cbad0 sp=0xc0008cae00 pc=0x555c775e239d
github.com/containers/podman/pkg/specgen/generate.MakeContainer({0x555c78109e48, 0xc0006ed5f0}, 0xc0003ea1e0, 0xc000614800, 0x0, 0x0)
	/builddir/build/BUILD/podman-4.5.0/_build/src/github.com/containers/podman/pkg/specgen/generate/container_create.go:223 +0x1b0c fp=0xc0008cc168 sp=0xc0008cbad0 pc=0x555c775d2e4c
github.com/containers/podman/pkg/domain/infra/abi.(*ContainerEngine).ContainerRun(0xc0000cb2e0, {0x555c78109e48, 0xc0006ed5f0}, {{0x0, 0x0}, 0x0, {0x555c779b6c67, 0xd}, 0xc0001a4010, 0xc0001a4000, ...})
	/builddir/build/BUILD/podman-4.5.0/_build/src/github.com/containers/podman/pkg/domain/infra/abi/containers.go:1096 +0x410 fp=0xc0008cc458 sp=0xc0008cc168 pc=0x555c77625f30
github.com/containers/podman/cmd/podman/containers.run(0x555c78d12400?, {0xc000100900?, 0x2, 0x6})
	/builddir/build/BUILD/podman-4.5.0/_build/src/github.com/containers/podman/cmd/podman/containers/run.go:205 +0x7d6 fp=0xc0008cdcd0 sp=0xc0008cc458 pc=0x555c7779b496
github.com/containers/podman/vendor/github.com/spf13/cobra.(*Command).execute(0x555c78d12400, {0xc0001a8020, 0x6, 0x6})
	/builddir/build/BUILD/podman-4.5.0/_build/src/github.com/containers/podman/vendor/github.com/spf13/cobra/command.go:940 +0x862 fp=0xc0008cde08 sp=0xc0008cdcd0 pc=0x555c76c2db02
github.com/containers/podman/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x555c78d31840)
	/builddir/build/BUILD/podman-4.5.0/_build/src/github.com/containers/podman/vendor/github.com/spf13/cobra/command.go:1068 +0x3bd fp=0xc0008cdec0 sp=0xc0008cde08 pc=0x555c76c2e37d
github.com/containers/podman/vendor/github.com/spf13/cobra.(*Command).Execute(...)
	/builddir/build/BUILD/podman-4.5.0/_build/src/github.com/containers/podman/vendor/github.com/spf13/cobra/command.go:992
github.com/containers/podman/vendor/github.com/spf13/cobra.(*Command).ExecuteContext(...)
	/builddir/build/BUILD/podman-4.5.0/_build/src/github.com/containers/podman/vendor/github.com/spf13/cobra/command.go:985
main.Execute()
	/builddir/build/BUILD/podman-4.5.0/_build/src/github.com/containers/podman/cmd/podman/root.go:107 +0xcc fp=0xc0008cdf50 sp=0xc0008cdec0 pc=0x555c778b51ec
main.main()
	/builddir/build/BUILD/podman-4.5.0/_build/src/github.com/containers/podman/cmd/podman/main.go:41 +0x7c fp=0xc0008cdf80 sp=0xc0008cdf50 pc=0x555c778b47bc
runtime.main()
	/usr/lib/golang/src/runtime/proc.go:250 +0x213 fp=0xc0008cdfe0 sp=0xc0008cdf80 pc=0x555c766d0713
runtime.goexit()
	/usr/lib/golang/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0008cdfe8 sp=0xc0008cdfe0 pc=0x555c76702c01

goroutine 2 [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/usr/lib/golang/src/runtime/proc.go:363 +0xd6 fp=0xc000064fb0 sp=0xc000064f90 pc=0x555c766d0ad6
runtime.goparkunlock(...)
	/usr/lib/golang/src/runtime/proc.go:369
runtime.forcegchelper()
	/usr/lib/golang/src/runtime/proc.go:302 +0xad fp=0xc000064fe0 sp=0xc000064fb0 pc=0x555c766d096d
runtime.goexit()
	/usr/lib/golang/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000064fe8 sp=0xc000064fe0 pc=0x555c76702c01
created by runtime.init.7
	/usr/lib/golang/src/runtime/proc.go:290 +0x25

goroutine 3 [GC sweep wait]:
runtime.gopark(0x1?, 0x0?, 0x0?, 0x0?, 0x0?)
	/usr/lib/golang/src/runtime/proc.go:363 +0xd6 fp=0xc000065790 sp=0xc000065770 pc=0x555c766d0ad6
runtime.goparkunlock(...)
	/usr/lib/golang/src/runtime/proc.go:369
runtime.bgsweep(0x0?)
	/usr/lib/golang/src/runtime/mgcsweep.go:297 +0xd7 fp=0xc0000657c8 sp=0xc000065790 pc=0x555c766bb3d7
runtime.gcenable.func1()
	/usr/lib/golang/src/runtime/mgc.go:178 +0x26 fp=0xc0000657e0 sp=0xc0000657c8 pc=0x555c766b0026
runtime.goexit()
	/usr/lib/golang/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0000657e8 sp=0xc0000657e0 pc=0x555c76702c01
created by runtime.gcenable
	/usr/lib/golang/src/runtime/mgc.go:178 +0x6b

goroutine 4 [GC scavenge wait]:
runtime.gopark(0xc00007c000?, 0x555c77cb9238?, 0x0?, 0x0?, 0x0?)
	/usr/lib/golang/src/runtime/proc.go:363 +0xd6 fp=0xc000065f70 sp=0xc000065f50 pc=0x555c766d0ad6
runtime.goparkunlock(...)
	/usr/lib/golang/src/runtime/proc.go:369
runtime.(*scavengerState).park(0x555c78e11b00)
	/usr/lib/golang/src/runtime/mgcscavenge.go:389 +0x53 fp=0xc000065fa0 sp=0xc000065f70 pc=0x555c766b9433
runtime.bgscavenge(0x0?)
	/usr/lib/golang/src/runtime/mgcscavenge.go:622 +0x65 fp=0xc000065fc8 sp=0xc000065fa0 pc=0x555c766b9a25
runtime.gcenable.func2()
	/usr/lib/golang/src/runtime/mgc.go:179 +0x26 fp=0xc000065fe0 sp=0xc000065fc8 pc=0x555c766affc6
runtime.goexit()
	/usr/lib/golang/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000065fe8 sp=0xc000065fe0 pc=0x555c76702c01
created by runtime.gcenable
	/usr/lib/golang/src/runtime/mgc.go:179 +0xaa

goroutine 18 [finalizer wait]:
runtime.gopark(0x555c78e13c20?, 0xc0001861a0?, 0x0?, 0x0?, 0xc000064770?)
	/usr/lib/golang/src/runtime/proc.go:363 +0xd6 fp=0xc000064628 sp=0xc000064608 pc=0x555c766d0ad6
runtime.goparkunlock(...)
	/usr/lib/golang/src/runtime/proc.go:369
runtime.runfinq()
	/usr/lib/golang/src/runtime/mfinal.go:180 +0x10f fp=0xc0000647e0 sp=0xc000064628 pc=0x555c766af12f
runtime.goexit()
	/usr/lib/golang/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0000647e8 sp=0xc0000647e0 pc=0x555c76702c01
created by runtime.createfing
	/usr/lib/golang/src/runtime/mfinal.go:157 +0x45

goroutine 34 [GC worker (idle)]:
runtime.gopark(0x2838c6b4ed20e?, 0x0?, 0x0?, 0x0?, 0x0?)
	/usr/lib/golang/src/runtime/proc.go:363 +0xd6 fp=0xc000060750 sp=0xc000060730 pc=0x555c766d0ad6
runtime.gcBgMarkWorker()
	/usr/lib/golang/src/runtime/mgc.go:1235 +0xf1 fp=0xc0000607e0 sp=0xc000060750 pc=0x555c766b2191
runtime.goexit()
	/usr/lib/golang/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0000607e8 sp=0xc0000607e0 pc=0x555c76702c01
created by runtime.gcBgMarkStartWorkers
	/usr/lib/golang/src/runtime/mgc.go:1159 +0x25

goroutine 19 [GC worker (idle)]:
runtime.gopark(0x2838c68fd76c8?, 0x0?, 0x0?, 0x0?, 0x0?)
	/usr/lib/golang/src/runtime/proc.go:363 +0xd6 fp=0xc00028c750 sp=0xc00028c730 pc=0x555c766d0ad6
runtime.gcBgMarkWorker()
	/usr/lib/golang/src/runtime/mgc.go:1235 +0xf1 fp=0xc00028c7e0 sp=0xc00028c750 pc=0x555c766b2191
runtime.goexit()
	/usr/lib/golang/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00028c7e8 sp=0xc00028c7e0 pc=0x555c76702c01
created by runtime.gcBgMarkStartWorkers
	/usr/lib/golang/src/runtime/mgc.go:1159 +0x25

goroutine 5 [GC worker (idle)]:
runtime.gopark(0x2838c6b4ed20e?, 0x0?, 0x0?, 0x0?, 0x0?)
	/usr/lib/golang/src/runtime/proc.go:363 +0xd6 fp=0xc000066750 sp=0xc000066730 pc=0x555c766d0ad6
runtime.gcBgMarkWorker()
	/usr/lib/golang/src/runtime/mgc.go:1235 +0xf1 fp=0xc0000667e0 sp=0xc000066750 pc=0x555c766b2191
runtime.goexit()
	/usr/lib/golang/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0000667e8 sp=0xc0000667e0 pc=0x555c76702c01
created by runtime.gcBgMarkStartWorkers
	/usr/lib/golang/src/runtime/mgc.go:1159 +0x25

goroutine 20 [GC worker (idle)]:
runtime.gopark(0x2838c6b4ed20e?, 0x0?, 0x0?, 0x0?, 0x0?)
	/usr/lib/golang/src/runtime/proc.go:363 +0xd6 fp=0xc00028cf50 sp=0xc00028cf30 pc=0x555c766d0ad6
runtime.gcBgMarkWorker()
	/usr/lib/golang/src/runtime/mgc.go:1235 +0xf1 fp=0xc00028cfe0 sp=0xc00028cf50 pc=0x555c766b2191
runtime.goexit()
	/usr/lib/golang/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00028cfe8 sp=0xc00028cfe0 pc=0x555c76702c01
created by runtime.gcBgMarkStartWorkers
	/usr/lib/golang/src/runtime/mgc.go:1159 +0x25

goroutine 35 [select, locked to thread]:
runtime.gopark(0xc000067fa8?, 0x2?, 0x57?, 0xe?, 0xc000067fa4?)
	/usr/lib/golang/src/runtime/proc.go:363 +0xd6 fp=0xc0004f3e18 sp=0xc0004f3df8 pc=0x555c766d0ad6
runtime.selectgo(0xc0004f3fa8, 0xc000067fa0, 0x0?, 0x0, 0x0?, 0x1)
	/usr/lib/golang/src/runtime/select.go:328 +0x7bc fp=0xc0004f3f58 sp=0xc0004f3e18 pc=0x555c766e0c1c
runtime.ensureSigM.func1()
	/usr/lib/golang/src/runtime/signal_unix.go:991 +0x1b4 fp=0xc0004f3fe0 sp=0xc0004f3f58 pc=0x555c766e5074
runtime.goexit()
	/usr/lib/golang/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0004f3fe8 sp=0xc0004f3fe0 pc=0x555c76702c01
created by runtime.ensureSigM
	/usr/lib/golang/src/runtime/signal_unix.go:974 +0xbd

goroutine 6 [syscall]:
runtime.notetsleepg(0x0?, 0x0?)
	/usr/lib/golang/src/runtime/lock_futex.go:236 +0x34 fp=0xc00028d7a0 sp=0xc00028d768 pc=0x555c766a2414
os/signal.signal_recv()
	/usr/lib/golang/src/runtime/sigqueue.go:152 +0x2f fp=0xc00028d7c0 sp=0xc00028d7a0 pc=0x555c766ff0af
os/signal.loop()
	/usr/lib/golang/src/os/signal/signal_unix.go:23 +0x19 fp=0xc00028d7e0 sp=0xc00028d7c0 pc=0x555c76a454f9
runtime.goexit()
	/usr/lib/golang/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00028d7e8 sp=0xc00028d7e0 pc=0x555c76702c01
created by os/signal.Notify.func1.1
	/usr/lib/golang/src/os/signal/signal.go:151 +0x2a

goroutine 21 [select]:
runtime.gopark(0xc0002887b0?, 0x2?, 0x0?, 0x0?, 0xc0002886ac?)
	/usr/lib/golang/src/runtime/proc.go:363 +0xd6 fp=0xc000075d18 sp=0xc000075cf8 pc=0x555c766d0ad6
runtime.selectgo(0xc000075fb0, 0xc0002886a8, 0x0?, 0x0, 0x0?, 0x1)
	/usr/lib/golang/src/runtime/select.go:328 +0x7bc fp=0xc000075e58 sp=0xc000075d18 pc=0x555c766e0c1c
github.com/containers/podman/libpod/shutdown.Start.func1()
	/builddir/build/BUILD/podman-4.5.0/_build/src/github.com/containers/podman/libpod/shutdown/handler.go:48 +0x93 fp=0xc000075fe0 sp=0xc000075e58 pc=0x555c7740cbd3
runtime.goexit()
	/usr/lib/golang/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000075fe8 sp=0xc000075fe0 pc=0x555c76702c01
created by github.com/containers/podman/libpod/shutdown.Start
	/builddir/build/BUILD/podman-4.5.0/_build/src/github.com/containers/podman/libpod/shutdown/handler.go:47 +0xe7

goroutine 22 [select]:
runtime.gopark(0xc000079ee8?, 0x2?, 0x0?, 0x20?, 0xc000079ea4?)
	/usr/lib/golang/src/runtime/proc.go:363 +0xd6 fp=0xc000079c88 sp=0xc000079c68 pc=0x555c766d0ad6
runtime.selectgo(0xc000079ee8, 0xc000079ea0, 0x0?, 0x0, 0x0?, 0x1)
	/usr/lib/golang/src/runtime/select.go:328 +0x7bc fp=0xc000079dc8 sp=0xc000079c88 pc=0x555c766e0c1c
github.com/containers/podman/libpod.(*Runtime).libimageEvents.func2()
	/builddir/build/BUILD/podman-4.5.0/_build/src/github.com/containers/podman/libpod/runtime.go:765 +0xe9 fp=0xc000079fe0 sp=0xc000079dc8 pc=0x555c775784c9
runtime.goexit()
	/usr/lib/golang/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000079fe8 sp=0xc000079fe0 pc=0x555c76702c01
created by github.com/containers/podman/libpod.(*Runtime).libimageEvents
	/builddir/build/BUILD/podman-4.5.0/_build/src/github.com/containers/podman/libpod/runtime.go:741 +0x10d

goroutine 23 [chan receive]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/usr/lib/golang/src/runtime/proc.go:363 +0xd6 fp=0xc0000616f0 sp=0xc0000616d0 pc=0x555c766d0ad6
runtime.chanrecv(0xc0005e10e0, 0xc0000617c8, 0x1)
	/usr/lib/golang/src/runtime/chan.go:583 +0x49b fp=0xc000061780 sp=0xc0000616f0 pc=0x555c7669ce3b
runtime.chanrecv2(0x0?, 0x0?)
	/usr/lib/golang/src/runtime/chan.go:447 +0x18 fp=0xc0000617a8 sp=0xc000061780 pc=0x555c7669c978
github.com/containers/podman/libpod.(*Runtime).startWorker.func1()
	/builddir/build/BUILD/podman-4.5.0/_build/src/github.com/containers/podman/libpod/runtime_worker.go:6 +0x74 fp=0xc0000617e0 sp=0xc0000617a8 pc=0x555c77593994
runtime.goexit()
	/usr/lib/golang/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0000617e8 sp=0xc0000617e0 pc=0x555c76702c01
created by github.com/containers/podman/libpod.(*Runtime).startWorker
	/builddir/build/BUILD/podman-4.5.0/_build/src/github.com/containers/podman/libpod/runtime_worker.go:5 +0x96
[1]    21416 IOT instruction  sudo podman run --rm -ti --device /dev/mem::rw alpine sh

Steps to reproduce the issue

Steps to reproduce the issue

  1. sudo podman run --rm -ti --device /dev/mem::rw alpine sh

Describe the results you received

Podman crashes

Describe the results you expected

The container should be created with container path for the device the same as the host path

podman info output

podman info
host:
  arch: amd64
  buildahVersion: 1.30.0
  cgroupControllers:
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.7-2.fc37.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.7, commit: '
  cpuUtilization:
    idlePercent: 99.79
    systemPercent: 0.17
    userPercent: 0.03
  cpus: 4
  databaseBackend: boltdb
  distribution:
    distribution: fedora
    variant: server
    version: "37"
  eventLogger: journald
  hostname: fedlab1
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 6.3.7-100.fc37.x86_64
  linkmode: dynamic
  logDriver: journald
  memFree: 571752448
  memTotal: 2046541824
  networkBackend: cni
  ociRuntime:
    name: crun
    package: crun-1.8.5-1.fc37.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.8.5
      commit: b6f80f766c9a89eb7b1440c0a70ab287434b17ed
      rundir: /run/user/1000/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  os: linux
  remoteSocket:
    path: /run/user/1000/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.2.0-8.fc37.x86_64
    version: |-
      slirp4netns version 1.2.0
      commit: 656041d45cfca7a4176f6b7eed9e4fe6c11e8383
      libslirp: 4.7.0
      SLIRP_CONFIG_VERSION_MAX: 4
      libseccomp: 2.5.3
  swapFree: 2044194816
  swapTotal: 2045767680
  uptime: 196h 39m 46.00s (Approximately 8.17 days)
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  configFile: /home/dfr/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/dfr/.local/share/containers/storage
  graphRootAllocated: 16095641600
  graphRootUsed: 12196986880
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 2
  runRoot: /run/user/1000/containers
  transientStore: false
  volumePath: /home/dfr/.local/share/containers/storage/volumes
version:
  APIVersion: 4.5.0
  Built: 1681486976
  BuiltTime: Fri Apr 14 16:42:56 2023
  GitCommit: ""
  GoVersion: go1.19.7
  Os: linux
  OsArch: linux/amd64
  Version: 4.5.0

Podman in a container

No

Privileged Or Rootless

Privileged

Upstream Latest Release

Yes

Additional environment details

No response

Additional information

No response

@dfr dfr added the kind/bug Categorizes issue or PR as related to a bug. label Jul 24, 2023
@dfr
Copy link
Contributor Author

dfr commented Jul 24, 2023

Note: --device /dev/mem:rw works and the code looks like the intention is to set destination path the same as host path if dst is empty. Unfortunately, it checks that destination starts with "/" without checking that it is non-empty first.

dfr added a commit to dfr/podman that referenced this issue Jul 24, 2023
...empty destination path

This fixes a server-side crash for command lines like:

  # podman run -ti --rm --device /dev/mem::rw alpine sh

Fixes containers#19335.
dfr added a commit to dfr/podman that referenced this issue Jul 24, 2023
...empty destination path

This fixes a server-side crash for command lines like:

  # podman run -ti --rm --device /dev/mem::rw alpine sh

Fixes containers#19335.

Signed-off-by: Doug Rabson <dfr@rabson.org>
jakecorrenti pushed a commit to jakecorrenti/podman that referenced this issue Jul 28, 2023
...empty destination path

This fixes a server-side crash for command lines like:

  # podman run -ti --rm --device /dev/mem::rw alpine sh

Fixes containers#19335.

Signed-off-by: Doug Rabson <dfr@rabson.org>
danishprakash pushed a commit to danishprakash/podman that referenced this issue Aug 1, 2023
...empty destination path

This fixes a server-side crash for command lines like:

  # podman run -ti --rm --device /dev/mem::rw alpine sh

Fixes containers#19335.

Signed-off-by: Doug Rabson <dfr@rabson.org>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Oct 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant