Skip to content

kernelctf: add CVE-2025-38248_cos#327

Open
Varde7918 wants to merge 4 commits intogoogle:masterfrom
Varde7918:master
Open

kernelctf: add CVE-2025-38248_cos#327
Varde7918 wants to merge 4 commits intogoogle:masterfrom
Varde7918:master

Conversation

@Varde7918
Copy link

No description provided.

* kernelctf: add CVE-2025-38248_cos

* kernelctf: add CVE-2025-38248_cos

* kernelctf: add CVE-2025-38248_cos

* kernelctf: add CVE-2025-38248_cos

* kernelctf: add CVE-2025-38248_cos

* kernelctf: add CVE-2025-38248_cos

* kernelctf: add CVE-2025-38248_cos

* kernelctf: add CVE-2025-38248_cos

* kernelctf: add CVE-2025-38248_cos

* kernelctf: add CVE-2025-38248_cos

* kernelctf: add CVE-2025-38248_cos

* kernelctf: add CVE-2025-38248_cos

* kernelctf: add CVE-2025-38248_cos

* kernelctf: add CVE-2025-38248_cos

* kernelctf: add CVE-2025-38248_cos
@google-cla
Copy link

google-cla bot commented Jan 31, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Collaborator

@artmetla artmetla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Varde7918 Please have a look at the comments and introduce necessary changes.

@Varde7918 Varde7918 requested a review from artmetla February 27, 2026 11:48
Copy link
Collaborator

@artmetla artmetla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @Varde7918. Please have another looks at exploit code and check if some extra features of kernelXDK could be utilised

char pad_2[16]; /* 224 - 240 */
} __attribute__((__aligned__(8)));

struct net_bridge_port {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please elaborate why do you need this? When it's added via

st.AddStruct("net_bridge_port", 640, {
      {"multicast_ctx", 304, 240},
  });
  kxdb.AddTarget(st);

char pad_1[96]; /* 544 - 640 */
} __attribute__((__aligned__(8)));

void craft_fake_net_bridge_port(struct net_bridge_port *p,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you use kernelXDK here?

sleep(1);
struct net_bridge_port fake_net_bridge_port;
struct msg_msg *target_msg_msg = (struct msg_msg *)(GUESSED_MSG_ADDR);
craft_fake_net_bridge_port(&fake_net_bridge_port,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check target.GetFieldOffset and rely on it to construct fake object

});
kxdb.AddTarget(st);

auto target = kxdb.GetTarget("kernelctf", "cos-121-18867.294.25");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should autodetect target. In this case it'll run only on cos-121-18867.294.25 as you've added Target st("kernelctf", "cos-121-18867.294.25"); but it's by design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants