<feed xmlns='http://www.w3.org/2005/Atom'>
<title>procd/trace, branch master</title>
<subtitle>OpenWrt service / process manager</subtitle>
<id>https://git.openwrt.org/project/procd/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/project/procd/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/'/>
<updated>2024-12-22T16:04:11Z</updated>
<entry>
<title>jail/seccomp: add support for loongarch64</title>
<updated>2024-12-22T16:04:11Z</updated>
<author>
<name>Weijie Gao</name>
</author>
<published>2024-12-22T10:28:12Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=42d3937654508b04da64969f9d764ac2ec411904'/>
<id>urn:sha1:42d3937654508b04da64969f9d764ac2ec411904</id>
<content type='text'>
Add support for loongarch64 in utrace and ujail.

Signed-off-by: Weijie Gao &lt;hackpascal@gmail.com&gt;
</content>
</entry>
<entry>
<title>trace: use standard POSIX header for basename()</title>
<updated>2024-03-30T21:30:41Z</updated>
<author>
<name>Tony Ambardar</name>
</author>
<published>2024-03-06T00:27:42Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=946552a7b598a0b88db6101e864679554ec4f221'/>
<id>urn:sha1:946552a7b598a0b88db6101e864679554ec4f221</id>
<content type='text'>
The musl libc only implements POSIX basename() but provided a GNU header
kludge in &lt;string.h&gt;, which was removed in musl 1.2.5 [1]. Use the standard
&lt;libgen.h&gt; header to avoid compilation errors like:

trace/trace.c: In function 'main':
trace/trace.c:435:64: error: implicit declaration of function 'basename';
did you mean 'rename'? [-Werror=implicit-function-declaration]
  435 | if (asprintf(&amp;json, "/tmp/%s.%u.json", basename(*argv), child) &lt; 0)
      |                                        ^~~~~~~~
      |                                        rename
cc1: all warnings being treated as errors

Link 1: https://git.musl-libc.org/cgit/musl/log/?qt=grep&amp;q=basename

Signed-off-by: Tony Ambardar &lt;itugrok@yahoo.com&gt;
</content>
</entry>
<entry>
<title>utrace: fix memory leak</title>
<updated>2022-06-27T09:52:10Z</updated>
<author>
<name>Junnan Xu</name>
</author>
<published>2022-06-17T07:20:04Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=a68088ef3160d75f02bb6af5f552ca507e51df56'/>
<id>urn:sha1:a68088ef3160d75f02bb6af5f552ca507e51df56</id>
<content type='text'>
Fixes following memory leak:

  14 bytes in 1 blocks are definitely lost in loss record 1 of 5
     at 0x4079514: malloc (vg_replace_malloc.c:309)
     by 0x4049A04: vasprintf (vasprintf.c:13)
     by 0x4046354: asprintf (asprintf.c:10)
     by 0x80491A9: main (in /root/utrace)

  134 bytes in 1 blocks are definitely lost in loss record 3 of 5
     at 0x4079514: malloc (vg_replace_malloc.c:309)
     by 0x4049A04: vasprintf (vasprintf.c:13)
     by 0x4046354: asprintf (asprintf.c:10)
     by 0x8049208: main (in /root/utrace)

Signed-off-by: Junnan Xu &lt;junnanx.xu@gmail.com&gt;
Reviewed-by: Rui Salvaterra &lt;rsalvaterra@gmail.com&gt;
</content>
</entry>
<entry>
<title>trace: don't leak file descriptor in error path</title>
<updated>2021-09-15T20:43:16Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2021-09-05T13:22:33Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=8a60e7e066cb0b364cae13c524dce16743633b0a'/>
<id>urn:sha1:8a60e7e066cb0b364cae13c524dce16743633b0a</id>
<content type='text'>
Coverity CID: 1491022 Resource leak
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>trace: preload: avoid NULL-dereference here as well</title>
<updated>2021-08-30T23:46:59Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2021-08-30T23:44:29Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=269c9e4c7e5b6a726712abf939255980f03266c5'/>
<id>urn:sha1:269c9e4c7e5b6a726712abf939255980f03266c5</id>
<content type='text'>
Fix potential NULL-pointer derefence in trace/preload.c similar to how
it was fixed in jail/preload.c by commit b824a89
("jail: preload: avoid NULL-dereference in case things go wrong").

Coverity CID: 1446096 Dereference after null check
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>trace: fix potential use-after-free occurence</title>
<updated>2021-08-30T21:15:10Z</updated>
<author>
<name>Nick Hainke</name>
</author>
<published>2021-08-30T20:37:10Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=96d8bf2c7b6773636efb8b175993e5d17ff7d0bf'/>
<id>urn:sha1:96d8bf2c7b6773636efb8b175993e5d17ff7d0bf</id>
<content type='text'>
char* tmp is used in the fprintf function altough it is already freed.

Fixes: e5b38fd1 ("trace: free memory allocated by blobmsg_format_json_indent()")

Signed-off-by: Nick Hainke &lt;vincent@systemli.org&gt;
</content>
</entry>
<entry>
<title>trace: free memory allocated by blobmsg_format_json_indent()</title>
<updated>2021-08-30T19:30:43Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2021-08-30T19:20:49Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=e5b38fd1298cec50f68b01568fcecf5e626cd286'/>
<id>urn:sha1:e5b38fd1298cec50f68b01568fcecf5e626cd286</id>
<content type='text'>
Only one out of two occurances have been addressed previously.
Close the other one now.

Coverity CID: 1446205
Fixes: 51f1cd23 ("trace: free string returned by blobmsg_format_json_indent()")
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>trace: handle open() return value and make sure string is terminated</title>
<updated>2021-08-24T17:32:01Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2021-08-23T17:11:08Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=d716cb5ca3c27e7bff2ab6f793aa4b827fdd3290'/>
<id>urn:sha1:d716cb5ca3c27e7bff2ab6f793aa4b827fdd3290</id>
<content type='text'>
Coverity CID: 1446154 Argument cannot be negative

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>trace: free string returned by blobmsg_format_json_indent()</title>
<updated>2021-08-24T17:31:56Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2021-08-23T17:07:19Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=51f1cd2366ebfc1f4ebbbfc819d36086ed3b5eb9'/>
<id>urn:sha1:51f1cd2366ebfc1f4ebbbfc819d36086ed3b5eb9</id>
<content type='text'>
Coverity CID: 1446205 Resource leak

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>trace: fix build on aarch64</title>
<updated>2021-03-19T22:25:15Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2021-03-19T22:22:44Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=c23d8bf81624469ed97449af7bf9497ee2c351c2'/>
<id>urn:sha1:c23d8bf81624469ed97449af7bf9497ee2c351c2</id>
<content type='text'>
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
</feed>
