diff --git a/go.mod b/go.mod
index 6870ab5706..9e88528e45 100644
--- a/go.mod
+++ b/go.mod
@@ -13,7 +13,7 @@ require (
 	github.com/containernetworking/cni v1.1.2
 	github.com/containernetworking/plugins v1.2.0
 	github.com/containers/buildah v1.30.0
-	github.com/containers/common v0.53.0
+	github.com/containers/common v0.53.1-0.20230502134647-9cd0cc23c80f
 	github.com/containers/conmon v2.0.20+incompatible
 	github.com/containers/image/v5 v5.25.0
 	github.com/containers/libhvee v0.0.5
diff --git a/go.sum b/go.sum
index ac9453107b..2541e91f93 100644
--- a/go.sum
+++ b/go.sum
@@ -239,8 +239,8 @@ github.com/containernetworking/plugins v1.2.0 h1:SWgg3dQG1yzUo4d9iD8cwSVh1VqI+bP
 github.com/containernetworking/plugins v1.2.0/go.mod h1:/VjX4uHecW5vVimFa1wkG4s+r/s9qIfPdqlLF4TW8c4=
 github.com/containers/buildah v1.30.0 h1:mdp2COGKFFEZNEGP8VZ5ITuUFVNPFoH+iK2sSesNfTA=
 github.com/containers/buildah v1.30.0/go.mod h1:lyMLZIevpAa6zSzjRl7z4lFJMCMQLFjfo56YIefaB/U=
-github.com/containers/common v0.53.0 h1:Ax814cLeX5VXSnkKUdxz762g+27fJj1st4UvKoXmkKs=
-github.com/containers/common v0.53.0/go.mod h1:pABPxJwlTE8oYk9/2BW0e0mumkuhJHIPsABHTGRXN3w=
+github.com/containers/common v0.53.1-0.20230502134647-9cd0cc23c80f h1:NGr0tr+qnavYQ3m+ajnrCLCp7y/YlGj14OXsYD5RhqY=
+github.com/containers/common v0.53.1-0.20230502134647-9cd0cc23c80f/go.mod h1:uG5iTo9KbPxcyj3nsq0OPbBRTrSsrXKIMNRw4D6rt/w=
 github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6JXHGTUje2ZYobNrkg=
 github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I=
 github.com/containers/image/v5 v5.25.0 h1:TJ0unmalbU+scd0i3Txap2wjGsAnv06MSCwgn6bsizk=
diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go
index 4e4ec294dd..0ba9471c2e 100644
--- a/pkg/domain/infra/abi/images.go
+++ b/pkg/domain/infra/abi/images.go
@@ -92,15 +92,16 @@ func (ir *ImageEngine) Prune(ctx context.Context, opts entities.ImagePruneOption
 }
 
 func toDomainHistoryLayer(layer *libimage.ImageHistory) entities.ImageHistoryLayer {
-	l := entities.ImageHistoryLayer{}
-	l.ID = layer.ID
+	l := entities.ImageHistoryLayer{
+		Comment:   layer.Comment,
+		CreatedBy: layer.CreatedBy,
+		ID:        layer.ID,
+		Size:      layer.Size,
+		Tags:      layer.Tags,
+	}
 	if layer.Created != nil {
 		l.Created = *layer.Created
 	}
-	l.CreatedBy = layer.CreatedBy
-	copy(l.Tags, layer.Tags)
-	l.Size = layer.Size
-	l.Comment = layer.Comment
 	return l
 }
 
diff --git a/test/apiv2/10-images.at b/test/apiv2/10-images.at
index 8f52a321f4..8eb0235ba7 100644
--- a/test/apiv2/10-images.at
+++ b/test/apiv2/10-images.at
@@ -73,7 +73,7 @@ for i in $iid ${iid:0:12} $PODMAN_TEST_IMAGE_NAME; do
   t GET libpod/images/$i/history 200 \
     .[0].Id=$iid \
     .[0].Created~[0-9]\\{10\\} \
-    .[0].Tags=null \
+    .[0].Tags[0]="$IMAGE" \
     .[0].Size=0 \
     .[0].Comment=
 done
@@ -82,7 +82,7 @@ for i in $iid ${iid:0:12} $PODMAN_TEST_IMAGE_NAME; do
   t GET images/$i/history 200 \
     .[0].Id="sha256:"$iid \
     .[0].Created~[0-9]\\{10\\} \
-    .[0].Tags=null \
+    .[0].Tags[0]="$IMAGE" \
     .[0].Size=0 \
     .[0].Comment=
 done
diff --git a/test/system/110-history.bats b/test/system/110-history.bats
index 47ad83ef8e..dbb97aacb0 100644
--- a/test/system/110-history.bats
+++ b/test/system/110-history.bats
@@ -27,6 +27,9 @@ load helpers
     while IFS= read -r row; do
         is "$row" ".*	.*$"
     done <<<$output
+
+    run_podman history --format "{{.Tags}}" $IMAGE
+    is "$output" "\[$IMAGE\].*" "podman history sets tags"
 }
 
 @test "podman history - json" {
diff --git a/vendor/github.com/containers/common/libimage/history.go b/vendor/github.com/containers/common/libimage/history.go
index 46252df106..ad989b528a 100644
--- a/vendor/github.com/containers/common/libimage/history.go
+++ b/vendor/github.com/containers/common/libimage/history.go
@@ -51,7 +51,6 @@ func (i *Image) History(ctx context.Context) ([]ImageHistory, error) {
 		}
 
 		if layer != nil {
-			history.Tags = layer.Names
 			if !ociImage.History[x].EmptyLayer {
 				history.Size = layer.UncompressedSize
 			}
@@ -64,8 +63,13 @@ func (i *Image) History(ctx context.Context) ([]ImageHistory, error) {
 					history.ID = id
 					usedIDs[id] = true
 				}
+				for i := range node.images {
+					history.Tags = append(history.Tags, node.images[i].Names()...)
+				}
 			}
-			if layer.Parent != "" && !ociImage.History[x].EmptyLayer {
+			if layer.Parent == "" {
+				layer = nil
+			} else if !ociImage.History[x].EmptyLayer {
 				layer, err = i.runtime.store.Layer(layer.Parent)
 				if err != nil {
 					return nil, err
diff --git a/vendor/github.com/containers/common/pkg/sysinfo/numcpu_linux.go b/vendor/github.com/containers/common/pkg/sysinfo/numcpu_linux.go
index c10d69c79c..d77e52f603 100644
--- a/vendor/github.com/containers/common/pkg/sysinfo/numcpu_linux.go
+++ b/vendor/github.com/containers/common/pkg/sysinfo/numcpu_linux.go
@@ -8,14 +8,11 @@ import "golang.org/x/sys/unix"
 // numCPU queries the system for the count of threads available
 // for use to this process.
 //
-// Issues two syscalls.
 // Returns 0 on errors. Use |runtime.NumCPU| in that case.
 func numCPU() int {
 	// Gets the affinity mask for a process: The very one invoking this function.
-	pid := unix.Getpid()
-
 	var mask unix.CPUSet
-	err := unix.SchedGetaffinity(pid, &mask)
+	err := unix.SchedGetaffinity(0, &mask)
 	if err != nil {
 		return 0
 	}
diff --git a/vendor/github.com/containers/common/version/version.go b/vendor/github.com/containers/common/version/version.go
index 8bd54871c0..9f33b9c73a 100644
--- a/vendor/github.com/containers/common/version/version.go
+++ b/vendor/github.com/containers/common/version/version.go
@@ -1,4 +1,4 @@
 package version
 
 // Version is the version of the build.
-const Version = "0.53.0"
+const Version = "0.54.0-dev"
diff --git a/vendor/modules.txt b/vendor/modules.txt
index b8068c286f..77e2e3fc96 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -125,7 +125,7 @@ github.com/containers/buildah/pkg/rusage
 github.com/containers/buildah/pkg/sshagent
 github.com/containers/buildah/pkg/util
 github.com/containers/buildah/util
-# github.com/containers/common v0.53.0
+# github.com/containers/common v0.53.1-0.20230502134647-9cd0cc23c80f
 ## explicit; go 1.18
 github.com/containers/common/libimage
 github.com/containers/common/libimage/define