🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.dist
1 messages
1 total messages Started by Antonio Terceiro Wed, 25 Nov 2026 23:10
Bug#1155387: trixie-pu: package debci/3.12+deb13u1
#6223
Author: Antonio Terceiro
Date: Wed, 25 Nov 2026 23:10
232 lines
9781 bytes
--jaRXn+N0j9y7o2xC
Content-Type: multipart/mixed; boundary="yivHOqSweoVlHCDN"
Content-Disposition: inline

--yivHOqSweoVlHCDN
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Package: release.debian.org
Severity: normal
Tags: trixie
X-Debbugs-Cc: debci@packages.debian.org
Control: affects -1 + src:debci
User: release.debian.org@packages.debian.org
Usertags: pu

[ Reason ]
This update fixes an information leak vulnerability. By enumerating
sequential ids, an attacker can obtain information about the existence
of embargoed updates. ci.debian.net is already fixed, and debci 4.5 has
been uploaded to unstable including the fix. All debci instances that I
know were notified in private but weren't using private jobs. The
security team doesn't think this is relevant enough for a DSA, thus I
want to fix this in a regular stable update.

[ Impact ]
debci instances using private jobs could have information about them
leaked by using the retry page URL with sequential job ids. The attacker
needs to be logged in to the instance with a valid user account.

[ Tests ]
The patch fixing the vulnerability includes automated tests, which fail
if I revert the fixes, and pass during the build and under autopkgtest.

[ Risks ]
The fix is pretty straightforward and I see no relevant risks.

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

[ Changes ]
The retry endpoints have been modified to only allow the owner of
private jobs to both see the retry page and request retries.

[ Other info ]
As this is a targetted fix that consists only of a patch cherry-picked
=66rom the master branch, I have already uploaded it.

--yivHOqSweoVlHCDN
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename=debci.diff
Content-Transfer-Encoding: quoted-printable

diff --git c/debian/changelog w/debian/changelog
index 4c18b4f1..dde266ad 100644
--- c/debian/changelog
+++ w/debian/changelog
@@ -1,3 +1,9 @@
+debci (3.12+deb13u1) trixie; urgency=3Dmedium
+
+  * self_service: deny access to private jobs owned by others
+
+ -- Antonio Terceiro <terceiro@debian.org>  Wed, 25 Nov 2026 18:18:23 -0300
+
 debci (3.12) unstable; urgency=3Dmedium
=20
   * debian/changelog: fix typo found by codespell
diff --git c/lib/debci/job.rb w/lib/debci/job.rb
index 6a41d603..e83934ad 100644
--- c/lib/debci/job.rb
+++ w/lib/debci/job.rb
@@ -373,6 +373,14 @@ module Debci
       !always_failing?
     end
=20
+    def public?
+      !is_private?
+    end
+
+    def accessible_to?(user)
+      public? || user.id =3D=3D requestor.id
+    end
+
   end
 end
=20
diff --git c/lib/debci/self_service.rb w/lib/debci/self_service.rb
index 76b1b036..80763643 100644
--- c/lib/debci/self_service.rb
+++ w/lib/debci/self_service.rb
@@ -141,8 +141,12 @@ module Debci
         run_id =3D params[:run_id]
         redirect "user/#{@user.username}/retry/#{run_id}" if params[:user]=
 =3D=3D ":user"
         @original_job =3D get_job_to_retry(run_id)
-        @same_jobs =3D get_same_pending_jobs(@original_job).count
-        erb :retry
+        if @original_job.accessible_to?(@user)
+          @same_jobs =3D get_same_pending_jobs(@original_job).count
+          erb :retry
+        else
+          [403, erb(:forbidden)]
+        end
       else
         [403, erb(:cant_retry)]
       end
@@ -151,8 +155,12 @@ module Debci
     post '/:user/retry/:run_id' do
       run_id =3D params[:run_id]
       j =3D get_job_to_retry(run_id)
-      j.retry
-      201
+      if j.accessible_to?(@user)
+        j.retry
+        201
+      else
+        403
+      end
     end
=20
     get '/:user/getkey' do
diff --git c/spec/debci/self_service_spec.rb w/spec/debci/self_service_spec=
=2Erb
index 0655e5fd..51d1b374 100644
--- c/spec/debci/self_service_spec.rb
+++ w/spec/debci/self_service_spec.rb
@@ -527,6 +527,49 @@ describe Debci::SelfService do
         expect(last_response.status).to eq(200)
         expect(last_response.content_type).to match('text/html')
       end
+
+      it 'displays public jobs by someone else' do
+        package =3D Debci::Package.create!(name: 'mypackage')
+        requestor =3D Debci::User.create!(username: 'security@example.com')
+        trigger =3D 'mypackage/0.0.1'
+        pin_packages =3D ['src:mypackage', 'unstable']
+        extra_apt_sources =3D ['bullseye-fasttrack']
+        job =3D Debci::Job.create(
+          package: package,
+          suite: suite,
+          arch: arch,
+          requestor: requestor,
+          trigger: trigger,
+          pin_packages: pin_packages,
+          is_private: false,
+          extra_apt_sources: extra_apt_sources
+        )
+        get "/user/foo@bar.com/retry/#{job.id}"
+        expect(last_response.status).to eq(200)
+        expect(last_response.body).to match(trigger)
+      end
+
+      it 'denies access to private jobs by someone else' do
+        package =3D Debci::Package.create!(name: 'mypackage')
+        requestor =3D Debci::User.create!(username: 'security@example.com')
+        trigger =3D 'mypackage/0.0.1'
+        pin_packages =3D ['src:mypackage', 'unstable']
+        extra_apt_sources =3D ['bullseye-fasttrack']
+        job =3D Debci::Job.create(
+          package: package,
+          suite: suite,
+          arch: arch,
+          requestor: requestor,
+          trigger: trigger,
+          pin_packages: pin_packages,
+          is_private: true,
+          extra_apt_sources: extra_apt_sources
+        )
+        get "/user/foo@bar.com/retry/#{job.id}"
+        expect(last_response.status).to eq(403)
+        expect(last_response.body).to_not match(trigger)
+      end
+
       it 'can retrigger a valid request with key' do
         package =3D Debci::Package.create!(name: 'mypackage')
         user =3D Debci::User.find_by(username: 'foo@bar.com')
@@ -622,6 +665,27 @@ describe Debci::SelfService do
=20
         expect(last_response.status).to eq(403)
       end
+
+      it 'denies retrying private jobs by someone else' do
+        package =3D Debci::Package.create!(name: 'mypackage')
+        requestor =3D Debci::User.create!(username: 'security@example.com')
+        trigger =3D 'mypackage/0.0.1'
+        pin_packages =3D ['src:mypackage', 'unstable']
+        extra_apt_sources =3D ['bullseye-fasttrack']
+        job =3D Debci::Job.create(
+          package: package,
+          suite: suite,
+          arch: arch,
+          requestor: requestor,
+          trigger: trigger,
+          pin_packages: pin_packages,
+          is_private: true,
+          extra_apt_sources: extra_apt_sources
+        )
+
+        post "/user/foo@bar.com/retry/#{job.run_id}"
+        expect(last_response.status).to eq(403)
+      end
     end
   end
=20

--yivHOqSweoVlHCDN--

--jaRXn+N0j9y7o2xC
Content-Type: application/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEst7mYDbECCn80PEM/A2xu81GC94FAmsHaScACgkQ/A2xu81G
C94bMhAAi47SCtrzoCU0QwOc6TeGs+WZY6qmE21hTabp5jTAGH9b74gUa6xo6FZv
h91QlfUJooxD4GtWCPU3xoEYIf9YQCmlA1yTcXy50emFq8PqB3rOB4g5nrS5hvyT
gPpVFS67p0/knRDa9v++yItDaP3kAqCOnWu0Wgen276tdylhRF6UOR5CJymd0tdz
SEeo68wgBT6Xiu9QOycwaqVr9wzcOox+FUMlBvyUqgSKC+TWQWyBTnMe6S/5PEj3
3Yi6yFhPyZ7uS5kUiF6DgYftUPIEqeV8y3xjbZ5sr4Wv8ZT3omwcj4vlo4oOMIuM
D7gEqk6yeopq+Fk6yH4HLJH4CbHpyA2ctZnqIkPQv8UIdzv3/0K39DwXojpNxsR1
zyd6kN8VVBt5Im018dweaBP+9p5ptTC5Wcn6n4MxdIGfds8+9Lq+KydezsL8+e8l
TIX0oFfPT6uml6fQIo4dVkQ0vZytprpXML7DFUqFZo1RBYNCu+ORaNv2yzkfThOO
NLtBhBwApqbbSaZuDp52GRumNkGscsOTfkANuk9CN73O+w61xqgi9YslqQEKcgNA
eEKNRwwvghYWtcjIhliPyMlBpeE+Awh5G+58eo8pQuQdUVfYgjha1TC3A0qrmD/h
hq1wLZIXnIYNv/ewIq4VQduaCdzTrlZOuWyRBn2SdQc0rPcvgOs=
=Zv6b
-----END PGP SIGNATURE-----

--jaRXn+N0j9y7o2xC--
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads