Re: Send international text with mail(1) - proposal and patches

2023-09-24 Thread Walter Alejandro Iglesias
On Sun, Sep 24, 2023 at 09:47:41AM +0200, Stefan Sperling wrote: > In the UTF-8 locale I can trigger an error message with your program > by sending the latin1 code for a-acute to stdin. I suppose your test > command didn't actually send latin1 to stdin for some reason? > > $ perl -e 'printf

Re: malloc write after free error checking

2023-09-24 Thread Otto Moerbeek
On Wed, Sep 20, 2023 at 08:08:23AM +0200, Otto Moerbeek wrote: > On Sun, Sep 03, 2023 at 09:21:18AM +0200, Otto Moerbeek wrote: > > > Hello, > > > > I'm seeing some reports of "write after free" reported by malloc by > > peolpe running current. Malloc has become more strict since begining > >

adding support for Meinberg PZF180PEX

2023-09-24 Thread Maurice Janssen
Hi, The following diff adds support for the Meinberg PZF180PEX card. With this diff, the card is recognized and functions as expected: mbg0 at pci13 dev 0 function 0 "Meinberg Funkuhren PZF180PEX" rev 0x01: synchronized $ ntpctl -s S sensor wt gd st next poll offset correction

update bsd.regress.mk(5)

2023-09-24 Thread Claudio Jeker
Try to document how REGRESS_LOG and REGRESS_FAIL_EARLY interact. -- :wq Claudio Index: bsd.regress.mk.5 === RCS file: /cvs/src/share/man/man5/bsd.regress.mk.5,v retrieving revision 1.24 diff -u -p -r1.24 bsd.regress.mk.5 ---

Re: Send international text with mail(1) - proposal and patches

2023-09-24 Thread Crystal Kolipe
On Sun, Sep 24, 2023 at 12:37:08PM +0200, Walter Alejandro Iglesias wrote: > +static int > +not_utf8(FILE *message, int len) > +{ > + int n, ulen; > + unsigned char s[len]; Please re-read Omar's advice about large unbounded arrays.

Re: malloc write after free error checking

2023-09-24 Thread Todd C . Miller
On Sun, 24 Sep 2023 09:58:53 +0200, Otto Moerbeek wrote: > The wayland issue was found as well, using the same method. > I'm working on programming the heuristic that is quite effective into > malloc itself. It currently looks like this for the X case above: > > X(67417) in malloc(): write to

Re: update bsd.regress.mk(5)

2023-09-24 Thread Theo Buehler
On Sun, Sep 24, 2023 at 03:17:11PM +0200, Claudio Jeker wrote: > Try to document how REGRESS_LOG and REGRESS_FAIL_EARLY interact. We could make it fully precise with a few more words. > > -- > :wq Claudio > > Index: bsd.regress.mk.5 >

Re: Send international text with mail(1) - proposal and patches

2023-09-24 Thread Stefan Sperling
On Sun, Sep 24, 2023 at 07:06:35AM +0200, Walter Alejandro Iglesias wrote: > Hi Ingo, > > On Thu, Sep 21, 2023 at 03:04:24PM +0200, Ingo Schwarze wrote: > > In general, the tool for checking the validity of UTF-8 strings > > is a simple loop around mblen(3) if you want to report the precise > >

Re: Send international text with mail(1) - proposal and patches

2023-09-24 Thread Walter Alejandro Iglesias
Hi Stefan, Do you like this? Index: send.c === RCS file: /cvs/src/usr.bin/mail/send.c,v retrieving revision 1.26 diff -u -p -r1.26 send.c --- send.c 8 Mar 2023 04:43:11 - 1.26 +++ send.c 24 Sep 2023 10:33:11

Re: vmt(4): use shared netlock to protect ifnet data within vmt_tclo_broadcastip()

2023-09-24 Thread YASUOKA Masahiko
On Sat, 23 Sep 2023 15:38:40 +0300 Vitaliy Makkoveev wrote: > This makes ifnet protection consistent. Execute vmt_tclo_tick() timeout > handler in process context to allow context switch within > vmt_tclo_broadcastip(). ok yasuoka > Index: sys/dev/pv/vmt.c >

Re: prevent re-upgrade in powerpc64 boot loader

2023-09-24 Thread Visa Hankala
On Sat, Sep 23, 2023 at 02:26:18PM +, Klemens Nanni wrote: > On Sat, Sep 23, 2023 at 01:11:32PM +0200, Mark Kettenis wrote: > > > Date: Thu, 21 Sep 2023 22:30:01 + > > > From: Klemens Nanni > > > > > > In comparison to MI boot which only cares about /bsd.upgrade's x bit, > > > powerpc64

Disklabel Spoofing and the GPT "Required" Partition Attribute

2023-09-24 Thread Philippe Meunier
Hi, So I was using OpenBSD on a USB thumb drive to have a look at the EFI system partition of two laptops (one Windows 10, one Windows 11) when I realized that I couldn't mount the EFI system partition of the Windows 11 laptop at all because there simply wasn't any partition letter defined for

Re: Please test; midi(4): make midi{read,write}_filtops mp safe

2023-09-24 Thread Visa Hankala
On Sun, Sep 24, 2023 at 11:03:54PM +0300, Vitaliy Makkoveev wrote: > Please test this diff, I have no midi(4) devices. > > midi(4) already uses `audio_lock' mutex(9) for filterops, but they are > still kernel locked. Wipe out old selwakeup API and make them MP safe. > knote_locked(9) will not

Re: prevent re-upgrade in powerpc64 boot loader

2023-09-24 Thread Theo de Raadt
Visa Hankala wrote: > On Sat, Sep 23, 2023 at 02:26:18PM +, Klemens Nanni wrote: > > On Sat, Sep 23, 2023 at 01:11:32PM +0200, Mark Kettenis wrote: > > > > Date: Thu, 21 Sep 2023 22:30:01 + > > > > From: Klemens Nanni > > > > > > > > In comparison to MI boot which only cares about

Viable ROP-free roadmap for i386/armv8/riscv64/alpha/sparc64

2023-09-24 Thread Theo de Raadt
20-some years ago I was very much involved in the integration of the stack-protector into OpenBSD. This subsystem was developed as a gcc patch by Hiroaki Etoh. Many years later it adopted and substantially rewritten to incorporate it into mainline gcc. Thus, OpenBSD for a few years was the

dhcpd(8): Parse lease database after dropping privileges

2023-09-24 Thread Stephen Fox
Hello, While reading dhcpd's code, I noticed it parses the lease database file ("/var/db/dhcpd.leases") while the process is running as root. This happens prior to switching to the "_dhcp" user and calling chroot(2) / pledge(2). This is potentially unsafe because the lease database file contains

[POC] external UTF-8 validation for mail(1)

2023-09-24 Thread Crystal Kolipe
Following on from the "Send international text with mail(1)" thread... There is some interest in making mail(1) add relevant MIME headers to allow: * Correctly sending UTF-8 email. * Identifying 7-bit ASCII emails with an appropriate content type. ... and possibly other things in the future.

Please test; midi(4): make midi{read,write}_filtops mp safe

2023-09-24 Thread Vitaliy Makkoveev
Please test this diff, I have no midi(4) devices. midi(4) already uses `audio_lock' mutex(9) for filterops, but they are still kernel locked. Wipe out old selwakeup API and make them MP safe. knote_locked(9) will not grab kernel lock, so call it directly from interrupt handlers instead of

Re: Send international text with mail(1) - proposal and patches

2023-09-24 Thread Walter Alejandro Iglesias
On Sun, Sep 24, 2023 at 11:12:10AM -0300, Crystal Kolipe wrote: > On Sun, Sep 24, 2023 at 12:37:08PM +0200, Walter Alejandro Iglesias wrote: > > +static int > > +not_utf8(FILE *message, int len) > > +{ > > + int n, ulen; > > + unsigned char s[len]; > > Please re-read Omar's advice about large

Re: update bsd.regress.mk(5)

2023-09-24 Thread Claudio Jeker
On Sun, Sep 24, 2023 at 04:22:30PM +0200, Theo Buehler wrote: > On Sun, Sep 24, 2023 at 03:17:11PM +0200, Claudio Jeker wrote: > > Try to document how REGRESS_LOG and REGRESS_FAIL_EARLY interact. > > We could make it fully precise with a few more words. > Done -- :wq Claudio Index: